diff options
| author | Alban Peignier | 2016-05-15 10:25:11 +0200 | 
|---|---|---|
| committer | Alban Peignier | 2016-05-15 10:25:11 +0200 | 
| commit | 297727032a0c1fddfbb9d8864deda1ec24ea36f6 (patch) | |
| tree | 62868de1770546b748b5fec3c59e806cbe5c8f21 /spec/features/routes_spec.rb | |
| parent | affbacfcd955230f66badb261dcc462cca9cd0b9 (diff) | |
| download | chouette-core-297727032a0c1fddfbb9d8864deda1ec24ea36f6.tar.bz2 | |
Associate StopAreaReferential to Referential. Create ReferentialStopAreas to manage lines in Referential. Refs #822
Diffstat (limited to 'spec/features/routes_spec.rb')
| -rw-r--r-- | spec/features/routes_spec.rb | 97 | 
1 files changed, 46 insertions, 51 deletions
| diff --git a/spec/features/routes_spec.rb b/spec/features/routes_spec.rb index 25bb1680c..c50ff50bc 100644 --- a/spec/features/routes_spec.rb +++ b/spec/features/routes_spec.rb @@ -10,61 +10,56 @@ describe "Routes", :type => :feature do    #let!(:stop_areas) { Array.new(4) { create(:stop_area) } }    let!(:stop_points) { Array.new(4) { create(:stop_point, :route => route) } } -  # FIXME #825 -  # describe "from lines page to a line page" do -  #   it "display line's routes" do -  #     visit referential_lines_path(referential) -  #     click_link "#{line.name}" -  #     expect(page).to have_content(route.name) -  #     expect(page).to have_content(route2.name) -  #   end -  # end +  describe "from lines page to a line page" do +    it "display line's routes" do +      visit referential_lines_path(referential) +      click_link "#{line.name}" +      expect(page).to have_content(route.name) +      expect(page).to have_content(route2.name) +    end +  end -  # FIXME #825 -  # describe "from line's page to route's page" do -  #   it "display route properties" do -  #     visit referential_line_path(referential,line) -  #     click_link "#{route.name}" -  #     expect(page).to have_content(route.name) -  #     expect(page).to have_content(route.number) -  #   end -  # end +  describe "from line's page to route's page" do +    it "display route properties" do +      visit referential_line_path(referential,line) +      click_link "#{route.name}" +      expect(page).to have_content(route.name) +      expect(page).to have_content(route.number) +    end +  end -  # FIXME #825 -  # describe "from line's page, create a new route" do -  #   it "return to line's page that display new route" do -  #     visit referential_line_path(referential,line) -  #     click_link "Ajouter une séquence d'arrêts" -  #     fill_in "route_name", :with => "A to B" -  #     fill_in "Indice", :with => "AB" -  #     select 'aller', :from => "route_direction_code" -  #     select 'aller', :from => "route_wayback_code" -  #     click_button("Créer séquence d'arrêts") -  #     expect(page).to have_content("A to B") -  #   end -  # end +  describe "from line's page, create a new route" do +    it "return to line's page that display new route" do +      visit referential_line_path(referential,line) +      click_link "Ajouter une séquence d'arrêts" +      fill_in "route_name", :with => "A to B" +      fill_in "Indice", :with => "AB" +      select 'aller', :from => "route_direction_code" +      select 'aller', :from => "route_wayback_code" +      click_button("Créer séquence d'arrêts") +      expect(page).to have_content("A to B") +    end +  end -  # FIXME #825 -  # describe "from line's page, select a route and edit it" do -  #   it "return to line's page with changed name" do -  #     visit referential_line_path(referential,line) -  #     click_link "#{route.name}" -  #     click_link "Modifier cette séquence d'arrêts" -  #     fill_in "route_name", :with => "#{route.name}-changed" -  #     click_button("Modifier séquence d'arrêts") -  #     expect(page).to have_content("#{route.name}-changed") -  #   end -  # end +  describe "from line's page, select a route and edit it" do +    it "return to line's page with changed name" do +      visit referential_line_path(referential,line) +      click_link "#{route.name}" +      click_link "Modifier cette séquence d'arrêts" +      fill_in "route_name", :with => "#{route.name}-changed" +      click_button("Modifier séquence d'arrêts") +      expect(page).to have_content("#{route.name}-changed") +    end +  end -  # FIXME #825 -  # describe "from line's page, select a route and delete it" do -  #   it "return to line's page without route name" do -  #     visit referential_line_path(referential,line) -  #     click_link "#{route.name}" -  #     click_link "Supprimer cette séquence d'arrêts" -  #     expect(page).not_to have_content(route.name) -  #   end -  # end +  describe "from line's page, select a route and delete it" do +    it "return to line's page without route name" do +      visit referential_line_path(referential,line) +      click_link "#{route.name}" +      click_link "Supprimer cette séquence d'arrêts" +      expect(page).not_to have_content(route.name) +    end +  end    describe "from route's page, select edit boarding/alighting and update it" do      it "Edits boarding/alighting properties on route stops" do | 
