|
38 | 38 |
|
39 | 39 | it "sets the label correctly for a generic page" do |
40 | 40 | route_for_page1 = service.build_routes.first |
41 | | - expect(route_for_page1.label).to eq({ text: "Go to", hidden: true }) |
| 41 | + expect(route_for_page1.label).to eq({ text: "After question #{pages.first.position}, go to:" }) |
42 | 42 | end |
43 | 43 |
|
44 | 44 | context "when a condition exists for the generic page" do |
|
117 | 117 | route_for_no = routes_for_page1.find { |r| r.answer_value == "No" } |
118 | 118 |
|
119 | 119 | expect(route_for_yes.goto).to eq(Forms::RouteInput::DEFAULT_VALUE) |
120 | | - expect(route_for_yes.label).to eq({ text: "Option 1: Yes" }) |
| 120 | + expect(route_for_yes.label).to eq({ text: "If option 1 (Yes), go to:" }) |
121 | 121 |
|
122 | 122 | expect(route_for_no.goto).to eq(Forms::RouteInput::DEFAULT_VALUE) |
123 | | - expect(route_for_no.label).to eq({ text: "Option 2: No" }) |
| 123 | + expect(route_for_no.label).to eq({ text: "If option 2 (No), go to:" }) |
124 | 124 | end |
125 | 125 |
|
126 | 126 | context "when the selection page has more than 10 options" do |
|
154 | 154 |
|
155 | 155 | none_of_the_above_route = routes_for_page1.find { |r| r.answer_value == "none_of_the_above" } |
156 | 156 | expect(none_of_the_above_route).not_to be_nil |
157 | | - expect(none_of_the_above_route.label[:text]).to eq("Option 3: None of the above") |
| 157 | + expect(none_of_the_above_route.label[:text]).to eq("If option 3 (None of the above), go to:") |
158 | 158 | end |
159 | 159 | end |
160 | 160 |
|
|
207 | 207 | expect(route_for_page1).to be_a(Forms::RouteInput) |
208 | 208 | expect(route_for_page1.page_id).to eq(pages.first.id) |
209 | 209 | expect(route_for_page1.answer_value).to be_nil |
210 | | - expect(route_for_page1.label).to eq({ text: "Go to", hidden: true }) |
| 210 | + expect(route_for_page1.label).to eq({ text: "After question #{pages.first.position}, go to:" }) |
211 | 211 | end |
212 | 212 | end |
213 | 213 | end |
|
0 commit comments