aboutsummaryrefslogtreecommitdiffstats
path: root/spec/features/journey_pattern_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/journey_pattern_spec.rb')
-rw-r--r--spec/features/journey_pattern_spec.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/features/journey_pattern_spec.rb b/spec/features/journey_pattern_spec.rb
index 9bddcf3bc..470d74a99 100644
--- a/spec/features/journey_pattern_spec.rb
+++ b/spec/features/journey_pattern_spec.rb
@@ -11,7 +11,7 @@ describe "JourneyPatterns", :type => :feature do
describe "from routes page to a journey_pattern page" do
it "display route's journey_patterns" do
visit referential_line_route_path(referential,line,route)
- click_link "Liste des missions"
+ click_link I18n.t('routes.show.journey_patterns')
expect(page).to have_content(journey_pattern.name)
end
end
@@ -19,8 +19,8 @@ describe "JourneyPatterns", :type => :feature do
describe "from route's page to journey_pattern's page" do
it "display journey_pattern properties" do
visit referential_line_route_path(referential,line,route)
- click_link "Liste des missions"
- click_link "#{journey_pattern.name}"
+ click_link I18n.t('routes.show.journey_patterns')
+ click_link journey_pattern.name
expect(page).to have_content(journey_pattern.published_name)
expect(page).to have_content(journey_pattern.comment)
expect(page).to have_content(journey_pattern.registration_number)
@@ -30,10 +30,10 @@ describe "JourneyPatterns", :type => :feature do
describe "from route's page, create a new journey_pattern" do
it "return to route's page that display new journey_pattern" do
visit referential_line_route_path(referential,line,route)
- click_link "Ajouter une mission"
- fill_in "Nom", :with => "A to B"
- fill_in "Comment", :with => "AB"
- click_button("Créer mission")
+ click_link I18n.t("journey_patterns.actions.new")
+ fill_in "journey_pattern[name]", :with => "A to B"
+ fill_in "journey_pattern[comment]", :with => "AB"
+ click_button(I18n.t('formtastic.create',model: I18n.t('activerecord.models.journey_pattern.one')))
expect(page).to have_content("A to B")
end
end
@@ -41,10 +41,10 @@ describe "JourneyPatterns", :type => :feature do
describe "from route's page, select a journey_pattern and delete it" do
it "return to route's page without journey_pattern name" do
visit referential_line_route_path(referential,line,route)
- click_link "Liste des missions"
- click_link "#{journey_pattern.name}"
- click_link "Supprimer cette mission"
- click_link "Liste des missions"
+ click_link I18n.t('routes.show.journey_patterns')
+ click_link journey_pattern.name
+ click_link I18n.t('journey_patterns.actions.destroy')
+ click_link I18n.t('routes.show.journey_patterns')
expect(page).not_to have_content(journey_pattern.name)
end
end