aboutsummaryrefslogtreecommitdiffstats
path: root/spec
AgeCommit message (Collapse)Author
2018-01-19Add missing spec on VehicleJourneyAtStopZog
2018-01-19Merge pull request #247 from ↵Luc Donnet
af83/5592-workbenches-show--filter-by-workgroup-on-initial-load 5592 workbenches show filter by workgroup on initial load
2018-01-19Merge pull request #248 from af83/5623-fix-schedule-when-jp-is-prefilledLuc Donnet
5623 fix schedule when jp is prefilled
2018-01-19Fix compliance check sets breadcrumb, locales and datas displayLuc Donnet
2018-01-17Refs #5614 @0.5h; Fix schedule computation when departure minutes are not set5614-fix-schedule-computationZog
2018-01-17offer_workbenches/show.html.erb_spec: Give workbenches same workgroup5592-workbenches-show--filter-by-workgroup-on-initial-loadTeddy Wing
I was getting the following test failures after having modified `Workbench#all_referentials` in 93b60066cc49d699171d6a50798c5939a4644eea: Failures: 1) workbenches/show should include #<Referential id: 5, name: "Test 4", slug: "test_4", created_at: "2018-01-17 10:18:47", updated_at: "...from_id: nil, ready: true, referential_suite_id: nil, objectid_format: "stif_netex", merged_at: nil> Failure/Error: expect(workbench.all_referentials).to include different_organisation_referential expected #<ActiveRecord::AssociationRelation [#<Referential id: 3, name: "Test 2", slug: "test_2", created_at:...om_id: nil, ready: true, referential_suite_id: nil, objectid_format: "stif_netex", merged_at: nil>]> to include #<Referential id: 5, name: "Test 4", slug: "test_4", created_at: "2018-01-17 10:18:47", updated_at: "...from_id: nil, ready: true, referential_suite_id: nil, objectid_format: "stif_netex", merged_at: nil> Diff: @@ -1,2 +1,25 @@ -[#<Referential id: 5, name: "Test 4", slug: "test_4", created_at: "2018-01-17 10:18:47", updated_at: "2018-01-17 10:18:49", prefix: "organisation_5", projection_type: nil, time_zone: "Europe/Paris", bounds: nil, organisation_id: 6, geographical_bounds: nil, user_id: nil, user_name: nil, data_format: "netex", line_referential_id: 14, stop_area_referential_id: 10, workbench_id: 3, archived_at: nil, created_from_id: nil, ready: true, referential_suite_id: nil, objectid_format: "stif_netex", merged_at: nil>] +[#<Referential:0x007fd30e897428 + id: 3, + name: "Test 2", + slug: "test_2", + created_at: Wed, 17 Jan 2018 11:18:42 CET +01:00, + updated_at: Wed, 17 Jan 2018 11:18:44 CET +01:00, + prefix: "organisation_3", + projection_type: nil, + time_zone: "Europe/Paris", + bounds: nil, + organisation_id: 4, + geographical_bounds: nil, + user_id: nil, + user_name: nil, + data_format: "netex", + line_referential_id: 4, + stop_area_referential_id: 4, + workbench_id: 2, + archived_at: nil, + created_from_id: nil, + ready: true, + referential_suite_id: nil, + objectid_format: "stif_netex", + merged_at: nil>] # ./spec/views/offer_workbenches/show.html.erb_spec.rb:37:in `block (2 levels) in <top (required)>' # .../.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `load' # .../.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `block in load' # .../.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in `load_dependency' # .../.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `load' # .../.gem/ruby/2.3.3/gems/spring-commands-rspec-1.0.4/lib/spring/commands/rspec.rb:18:in `call' # -e:1:in `<main>' 2) workbenches/show without permission should disable all the checkboxes Failure/Error: expect(workbench.all_referentials).to include different_organisation_referential expected #<ActiveRecord::AssociationRelation [#<Referential id: 7, name: "Test 6", slug: "test_6", created_at:...om_id: nil, ready: true, referential_suite_id: nil, objectid_format: "stif_netex", merged_at: nil>]> to include #<Referential id: 9, name: "Test 8", slug: "test_8", created_at: "2018-01-17 10:18:55", updated_at: "...from_id: nil, ready: true, referential_suite_id: nil, objectid_format: "stif_netex", merged_at: nil> Diff: @@ -1,2 +1,25 @@ -[#<Referential id: 9, name: "Test 8", slug: "test_8", created_at: "2018-01-17 10:18:55", updated_at: "2018-01-17 10:18:57", prefix: "organisation_11", projection_type: nil, time_zone: "Europe/Paris", bounds: nil, organisation_id: 12, geographical_bounds: nil, user_id: nil, user_name: nil, data_format: "netex", line_referential_id: 26, stop_area_referential_id: 18, workbench_id: 5, archived_at: nil, created_from_id: nil, ready: true, referential_suite_id: nil, objectid_format: "stif_netex", merged_at: nil>] +[#<Referential:0x007fd30eadc210 + id: 7, + name: "Test 6", + slug: "test_6", + created_at: Wed, 17 Jan 2018 11:18:52 CET +01:00, + updated_at: Wed, 17 Jan 2018 11:18:53 CET +01:00, + prefix: "organisation_9", + projection_type: nil, + time_zone: "Europe/Paris", + bounds: nil, + organisation_id: 10, + geographical_bounds: nil, + user_id: nil, + user_name: nil, + data_format: "netex", + line_referential_id: 16, + stop_area_referential_id: 12, + workbench_id: 4, + archived_at: nil, + created_from_id: nil, + ready: true, + referential_suite_id: nil, + objectid_format: "stif_netex", + merged_at: nil>] # ./spec/views/offer_workbenches/show.html.erb_spec.rb:37:in `block (2 levels) in <top (required)>' # .../.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `load' # .../.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `block in load' # .../.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in `load_dependency' # .../.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `load' # .../.gem/ruby/2.3.3/gems/spring-commands-rspec-1.0.4/lib/spring/commands/rspec.rb:18:in `call' # -e:1:in `<main>' 3) workbenches/show with permission referentials.destroy should enable the checkbox for the referential which belongs to the same organisation and disable the other one Failure/Error: expect(workbench.all_referentials).to include different_organisation_referential expected #<ActiveRecord::AssociationRelation [#<Referential id: 11, name: "Test 10", slug: "test_10", created_...om_id: nil, ready: true, referential_suite_id: nil, objectid_format: "stif_netex", merged_at: nil>]> to include #<Referential id: 13, name: "Test 12", slug: "test_12", created_at: "2018-01-17 10:19:03", updated_at...from_id: nil, ready: true, referential_suite_id: nil, objectid_format: "stif_netex", merged_at: nil> Diff: @@ -1,2 +1,25 @@ -[#<Referential id: 13, name: "Test 12", slug: "test_12", created_at: "2018-01-17 10:19:03", updated_at: "2018-01-17 10:19:05", prefix: "organisation_17", projection_type: nil, time_zone: "Europe/Paris", bounds: nil, organisation_id: 18, geographical_bounds: nil, user_id: nil, user_name: nil, data_format: "netex", line_referential_id: 38, stop_area_referential_id: 26, workbench_id: 7, archived_at: nil, created_from_id: nil, ready: true, referential_suite_id: nil, objectid_format: "stif_netex", merged_at: nil>] +[#<Referential:0x007fd309268e30 + id: 11, + name: "Test 10", + slug: "test_10", + created_at: Wed, 17 Jan 2018 11:19:00 CET +01:00, + updated_at: Wed, 17 Jan 2018 11:19:02 CET +01:00, + prefix: "organisation_15", + projection_type: nil, + time_zone: "Europe/Paris", + bounds: nil, + organisation_id: 16, + geographical_bounds: nil, + user_id: nil, + user_name: nil, + data_format: "netex", + line_referential_id: 28, + stop_area_referential_id: 20, + workbench_id: 6, + archived_at: nil, + created_from_id: nil, + ready: true, + referential_suite_id: nil, + objectid_format: "stif_netex", + merged_at: nil>] # ./spec/views/offer_workbenches/show.html.erb_spec.rb:37:in `block (2 levels) in <top (required)>' # .../.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `load' # .../.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `block in load' # .../.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in `load_dependency' # .../.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `load' # .../.gem/ruby/2.3.3/gems/spring-commands-rspec-1.0.4/lib/spring/commands/rspec.rb:18:in `call' # -e:1:in `<main>' Finished in 29.81 seconds (files took 1.7 seconds to load) 3 examples, 3 failures The new behaviour requires referentials to have the same workgroup in order to be displayed on this page. Modify the test to give both `same_organisation_referential` and `different_organisation_referential` the same workgroup to get the tests to pass. Refs #5592
2018-01-16workbenches/show: Filter referentials by workgroupTeddy Wing
Previously, all `Referential`s would be listed on this page if they had matching line metadata. Now, we exclude those referentials that are in other workgroups to ensure users don't see referentials they're not supposed to see. Refs #5592
2018-01-15workbenches_show_spec: Test organisations in filtration listTeddy Wing
Check that only `Organisation`s associated with the current `Workgroup` appear in the list of filters on `Workbenches#show`. Also rewrite the `other_referential` object to put it in a different workbench from the first referential, enabling us to have multiple organisations in the same `Workgroup`. Refs #5140
2018-01-12Merge pull request #236 from af83/5560-add-validation-on-customfieldsLuc Donnet
5560 Add validation on CustomField
2018-01-12Refs #5560; Add validation on CustomField5560-add-validation-on-customfieldsZog
2018-01-12Fix Jest specs on timetablesfix-timetables-specsZog
2018-01-11Refs #5535; Fix specsZog
2018-01-11Fix specsZog
2018-01-11Merge pull request #227 from af83/5551-handle-custom-fields-in-vjs-editorLuc Donnet
5551 Handle custom fields in VJs editor
2018-01-11Merge pull request #234 from af83/5493-use-tz-for-time-displayAlban Peignier
Use local time in the Journeys editor. Refs #5493
2018-01-11Fixes specs after Referential#merged_at integration. Refs #5559Alban Peignier
2018-01-11Add Referential#merged_at and make Referentials archived and merged. Refs #5559Alban Peignier
2018-01-11Refs #5493 @1h; Use local time in the Journeys editorZog
We store UTC times in the database though
2018-01-11Merge pull request #229 from af83/5549_networks_policyLuc Donnet
Fix policy
2018-01-11Merge pull request #226 from af83/5547-show-vj-idLuc Donnet
5547 Show newly created VJ's short_id in editor
2018-01-11Add tests, but I'm unable to run them for now :-(Zog
2018-01-11Fix policyXinhui
Refs #5549
2018-01-11Refs #5551 @0.5h; Implement the custom fields in the creation modalZog
And Refactor the component in the process
2018-01-11Fixes Chouette::RoutingConstraintZone#route_id presence spec. Refs #5552Alban Peignier
2018-01-11Refs #5551 @1.5h; Implement Custom fields editionZog
RBD: implement the same in the creation modal
2018-01-11Fix vehicle_journey_control for min max values Refs #5543 @2Luc Donnet
2018-01-11Refs #5551; Update CustomField api to better suit JS API needsZog
2018-01-11Fix factories for compliance control generic_attribute_control_min_max Refs ↵Luc Donnet
#5543 @1
2018-01-11Refs #5547 @0.25h; Show newly created VJ's short_id in editorZog
2018-01-11Merge pull request #211 from af83/5500-add-filter-on-stopsteddywing
5500 Add filters on ReferentialVJ#index
2018-01-11Merge pull request #225 from af83/5535-compute-vehicle-journeys-timesLuc Donnet
5535 compute vehicle journeys times
2018-01-11Refs #5500; CR 1Zog
2018-01-11Refs #5500 @3h; Add filters on ReferentialVJ#indexZog
To enable users to filter on stop areas
2018-01-10Merge pull request #217 from af83/5502-remove-search-from-selectsAlban Peignier
Don't use Ajax in JP selector in VJs editor. Refs #5502
2018-01-10Merge pull request #204 from af83/5413-read_only_policy_for_finalised_refsAlban Peignier
Read only policy for referentials in suite. Refs #5413
2018-01-10Rename archived_or_finalised? into referential_read_only?. Refs #54135413-read_only_policy_for_finalised_refsAlban Peignier
2018-01-10Refs #5535 @2H; Automatically fill VJs tilmes when possibleZog
2018-01-10Refs: #5505@1h; Small things found in s/models/chouette/vj_spec during ↵Robert
investigation of failures
2018-01-10Fixes: #5505@2h; Migrations, specs and implementationsRobert
- Migration index_resource_type_on_custom_fields - Specing behavior of custom field's resource (VehicleJourney) - Migration create json col custom_field_values for resource (VehicleJourney) - Create accessor methods inside resource (VehicleJourney)
2018-01-10Refs: #5505@0.5h, added tests and validationsRobert
2018-01-10Refs: #5505@1h; Spec discussed, model scaffolded [amend me] [skip-ci]Robert
2018-01-10Fixes: #5499; Added validations and associationsRobert
2018-01-10bup [amend me] [skip-ci]Robert
2018-01-10Refs: #5499@0.5h; Scaffolded WorkgroupRobert
Next: - spec associations and name - spec initialisation - implement
2018-01-10Refs #5535 @0.25h; Adds a `full_schedule?` on `JourneyPattern`Zog
To know if all the costs between the stops of the pattern are set.
2018-01-10Merge pull request #194 from af83/5156-handle-long-distance-routesAlban Peignier
Handle long distance routes. Refs #5156
2018-01-10Merge pull request #223 from af83/5525-prevent-double-submissionteddywing
5525 Add a `disable-with` attr on all submit buttons
2018-01-10Refs #5525 @1h; Add a `diable-with` attr on all submit buttonsZog
2018-01-10Refs #5437 @1h; Refactor codeZog
2018-01-10Refs #5437 @0.5h; Propagate behaviour to the JourneyPatterns editorZog