|
| 1 | +@SmokingHistory |
1 | 2 | Feature: Smoking history pages |
2 | 3 | Scenario: Singular smoking histories |
3 | 4 | Given I am logged in |
@@ -97,3 +98,306 @@ Feature: Smoking history pages |
97 | 98 | And I see "25 cigarettes a month" as a response to "Current cigarette smoking" under "Cigarette smoking history" |
98 | 99 |
|
99 | 100 | And I see "40 cigarettes a day for 5 years" as a response to "When you smoked more than 25 cigarettes a month" under "Cigarette smoking history" |
| 101 | + |
| 102 | + Scenario: Multiple smoking histories |
| 103 | + Given I am logged in |
| 104 | + And I have answered questions showing I am eligible |
| 105 | + And I have answered questions showing I have smoked for "30" years |
| 106 | + When I go to "/types-tobacco-smoking" |
| 107 | + And I check "Cigarettes" |
| 108 | + And I check "Rolling tobacco" |
| 109 | + And I check "Pipe" |
| 110 | + And I check "Cigarillos" |
| 111 | + And I check "Medium cigars" |
| 112 | + And I submit the form |
| 113 | + |
| 114 | + # Cigarettes with increased and decreased |
| 115 | + Then I am on "/cigarettes-smoking-current" |
| 116 | + And I see a page title "Do you currently smoke cigarettes?" |
| 117 | + When I check "Yes" |
| 118 | + And I submit the form |
| 119 | + |
| 120 | + Then I am on "/cigarettes-smoked-total-years" |
| 121 | + When I fill in "Roughly how many years have you smoked cigarettes?" with "15" |
| 122 | + And I submit the form |
| 123 | + |
| 124 | + Then I am on "/cigarettes-smoking-frequency" |
| 125 | + And I see a page title "How often do you smoke cigarettes?" |
| 126 | + When I check "Daily" |
| 127 | + And I submit the form |
| 128 | + |
| 129 | + Then I am on "/cigarettes-smoked-amount" |
| 130 | + When I fill in "Roughly how many cigarettes do you currently smoke in a normal day?" with "10" |
| 131 | + And I submit the form |
| 132 | + |
| 133 | + Then I am on "/cigarettes-smoking-change" |
| 134 | + And I see a page title "Has the number of cigarettes you normally smoke changed over time?" |
| 135 | + When I check "Yes, I used to smoke more than 10 cigarettes a day" |
| 136 | + And I check "Yes, I used to smoke fewer than 10 cigarettes a day" |
| 137 | + And I submit the form |
| 138 | + |
| 139 | + Then I am on "/cigarettes-smoking-increased-frequency" |
| 140 | + And I see a page title "When you smoked more than 10 cigarettes a day, how often did you smoke cigarettes?" |
| 141 | + When I check "Weekly" |
| 142 | + And I submit the form |
| 143 | + |
| 144 | + Then I am on "/cigarettes-smoked-increased-amount" |
| 145 | + When I fill in "When you smoked more than 10 cigarettes a day, roughly how many cigarettes did you normally smoke a week?" with "200" |
| 146 | + And I submit the form |
| 147 | + |
| 148 | + Then I am on "/cigarettes-smoked-increased-years" |
| 149 | + When I fill in "Roughly how many years did you smoke 200 cigarettes a week?" with "5" |
| 150 | + And I submit the form |
| 151 | + |
| 152 | + Then I am on "/cigarettes-smoking-decreased-frequency" |
| 153 | + And I see a page title "When you smoked fewer than 10 cigarettes a day, how often did you smoke cigarettes?" |
| 154 | + When I check "Monthly" |
| 155 | + And I submit the form |
| 156 | + |
| 157 | + Then I am on "/cigarettes-smoked-decreased-amount" |
| 158 | + When I fill in "When you smoked fewer than 10 cigarettes a day, roughly how many cigarettes did you normally smoke a month?" with "1" |
| 159 | + And I submit the form |
| 160 | + |
| 161 | + Then I am on "/cigarettes-smoked-decreased-years" |
| 162 | + When I fill in "Roughly how many years did you smoke 1 cigarettes a month?" with "2" |
| 163 | + And I submit the form |
| 164 | + |
| 165 | + # Rolling tobacco with increased and decreased |
| 166 | + Then I am on "/rolling-tobacco-smoking-current" |
| 167 | + And I see a page title "Do you currently smoke rolling tobacco?" |
| 168 | + When I check "Yes" |
| 169 | + And I submit the form |
| 170 | + |
| 171 | + Then I am on "/rolling-tobacco-smoked-total-years" |
| 172 | + When I fill in "Roughly how many years have you smoked rolling tobacco?" with "26" |
| 173 | + And I submit the form |
| 174 | + |
| 175 | + Then I am on "/rolling-tobacco-smoking-frequency" |
| 176 | + And I see a page title "How often do you smoke rolling tobacco?" |
| 177 | + When I check "Weekly" |
| 178 | + And I submit the form |
| 179 | + |
| 180 | + Then I am on "/rolling-tobacco-smoked-amount" |
| 181 | + When I fill in "Roughly how many grams of rolling tobacco do you currently smoke in a normal week?" with "25" |
| 182 | + And I submit the form |
| 183 | + |
| 184 | + Then I am on "/rolling-tobacco-smoking-change" |
| 185 | + When I check "Yes, I used to smoke more than 25 grams of rolling tobacco a week" |
| 186 | + And I check "Yes, I used to smoke fewer than 25 grams of rolling tobacco a week" |
| 187 | + And I submit the form |
| 188 | + |
| 189 | + Then I am on "/rolling-tobacco-smoking-increased-frequency" |
| 190 | + And I see a page title "When you smoked more than 25 grams of rolling tobacco a week, how often did you smoke rolling tobacco?" |
| 191 | + When I check "Daily" |
| 192 | + And I submit the form |
| 193 | + |
| 194 | + Then I am on "/rolling-tobacco-smoked-increased-amount" |
| 195 | + When I fill in "When you smoked more than 25 grams of rolling tobacco a week, roughly how many grams of rolling tobacco did you normally smoke a day?" with "12" |
| 196 | + And I submit the form |
| 197 | + |
| 198 | + Then I am on "/rolling-tobacco-smoked-increased-years" |
| 199 | + When I fill in "Roughly how many years did you smoke 12 grams of rolling tobacco a day?" with "10" |
| 200 | + And I submit the form |
| 201 | + |
| 202 | + Then I am on "/rolling-tobacco-smoking-decreased-frequency" |
| 203 | + When I check "Monthly" |
| 204 | + And I submit the form |
| 205 | + |
| 206 | + Then I am on "/rolling-tobacco-smoked-decreased-amount" |
| 207 | + When I fill in "When you smoked fewer than 25 grams of rolling tobacco a week, roughly how many grams of rolling tobacco did you normally smoke a month?" with "5" |
| 208 | + And I submit the form |
| 209 | + |
| 210 | + Then I am on "/rolling-tobacco-smoked-decreased-years" |
| 211 | + When I fill in "Roughly how many years did you smoke 5 grams of rolling tobacco a month?" with "4" |
| 212 | + And I submit the form |
| 213 | + |
| 214 | + # Pipe with increased and decreased |
| 215 | + Then I am on "/pipe-smoking-current" |
| 216 | + And I see a page title "Do you currently smoke a pipe?" |
| 217 | + When I check "Yes" |
| 218 | + And I submit the form |
| 219 | + |
| 220 | + Then I am on "/pipe-smoked-total-years" |
| 221 | + When I fill in "Roughly how many years have you smoked a pipe?" with "26" |
| 222 | + And I submit the form |
| 223 | + |
| 224 | + Then I am on "/pipe-smoking-frequency" |
| 225 | + And I see a page title "How often do you smoke a pipe?" |
| 226 | + When I check "Weekly" |
| 227 | + And I submit the form |
| 228 | + |
| 229 | + Then I am on "/pipe-smoked-amount" |
| 230 | + When I fill in "Roughly how many full pipe loads do you currently smoke in a normal week?" with "25" |
| 231 | + And I submit the form |
| 232 | + |
| 233 | + Then I am on "/pipe-smoking-change" |
| 234 | + And I see a page title "Has the number of full pipe loads you normally smoke changed over time?" |
| 235 | + When I check "Yes, I used to smoke more than 25 full pipe loads a week" |
| 236 | + And I check "Yes, I used to smoke fewer than 25 full pipe loads a week" |
| 237 | + And I submit the form |
| 238 | + |
| 239 | + Then I am on "/pipe-smoking-increased-frequency" |
| 240 | + And I see a page title "When you smoked more than 25 full pipe loads a week, how often did you smoke a pipe?" |
| 241 | + When I check "Daily" |
| 242 | + And I submit the form |
| 243 | + |
| 244 | + Then I am on "/pipe-smoked-increased-amount" |
| 245 | + When I fill in "When you smoked more than 25 full pipe loads a week, roughly how many full pipe loads did you normally smoke a day?" with "12" |
| 246 | + And I submit the form |
| 247 | + |
| 248 | + Then I am on "/pipe-smoked-increased-years" |
| 249 | + When I fill in "Roughly how many years did you smoke 12 full pipe loads a day?" with "10" |
| 250 | + And I submit the form |
| 251 | + |
| 252 | + Then I am on "/pipe-smoking-decreased-frequency" |
| 253 | + When I check "Monthly" |
| 254 | + And I submit the form |
| 255 | + |
| 256 | + Then I am on "/pipe-smoked-decreased-amount" |
| 257 | + When I fill in "When you smoked fewer than 25 full pipe loads a week, roughly how many full pipe loads did you normally smoke a month?" with "5" |
| 258 | + And I submit the form |
| 259 | + |
| 260 | + Then I am on "/pipe-smoked-decreased-years" |
| 261 | + When I fill in "Roughly how many years did you smoke 5 full pipe loads a month?" with "4" |
| 262 | + And I submit the form |
| 263 | + |
| 264 | + |
| 265 | + # Medium cigars with only decreased |
| 266 | + Then I am on "/medium-cigars-smoking-current" |
| 267 | + And I see a page title "Do you currently smoke medium cigars?" |
| 268 | + When I check "Yes" |
| 269 | + And I submit the form |
| 270 | + |
| 271 | + Then I am on "/medium-cigars-smoked-total-years" |
| 272 | + When I fill in "Roughly how many years have you smoked medium cigars?" with "8" |
| 273 | + And I submit the form |
| 274 | + |
| 275 | + Then I am on "/medium-cigars-smoking-frequency" |
| 276 | + And I see a page title "How often do you smoke medium cigars?" |
| 277 | + When I check "Monthly" |
| 278 | + And I submit the form |
| 279 | + |
| 280 | + Then I am on "/medium-cigars-smoked-amount" |
| 281 | + When I fill in "Roughly how many medium cigars do you currently smoke in a normal month?" with "9" |
| 282 | + And I submit the form |
| 283 | + |
| 284 | + Then I am on "/medium-cigars-smoking-change" |
| 285 | + And I see a page title "Has the number of medium cigars you normally smoke changed over time?" |
| 286 | + When I check "Yes, I used to smoke fewer than 9 medium cigars a month" |
| 287 | + And I submit the form |
| 288 | + |
| 289 | + Then I am on "/medium-cigars-smoking-decreased-frequency" |
| 290 | + And I see a page title "When you smoked fewer than 9 medium cigars a month, how often did you smoke medium cigars?" |
| 291 | + When I check "Weekly" |
| 292 | + And I submit the form |
| 293 | + |
| 294 | + Then I am on "/medium-cigars-smoked-decreased-amount" |
| 295 | + When I fill in "When you smoked fewer than 9 medium cigars a month, roughly how many medium cigars did you normally smoke a week?" with "7" |
| 296 | + And I submit the form |
| 297 | + |
| 298 | + Then I am on "/medium-cigars-smoked-decreased-years" |
| 299 | + When I fill in "Roughly how many years did you smoke 7 medium cigars a week?" with "3" |
| 300 | + And I submit the form |
| 301 | + |
| 302 | + # Cigarillos with only increased |
| 303 | + Then I am on "/cigarillos-smoking-current" |
| 304 | + And I see a page title "Do you currently smoke cigarillos?" |
| 305 | + When I check "Yes" |
| 306 | + And I submit the form |
| 307 | + |
| 308 | + Then I am on "/cigarillos-smoked-total-years" |
| 309 | + When I fill in "Roughly how many years have you smoked cigarillos?" with "4" |
| 310 | + And I submit the form |
| 311 | + |
| 312 | + Then I am on "/cigarillos-smoking-frequency" |
| 313 | + And I see a page title "How often do you smoke cigarillos?" |
| 314 | + When I check "Monthly" |
| 315 | + And I submit the form |
| 316 | + |
| 317 | + Then I am on "/cigarillos-smoked-amount" |
| 318 | + When I fill in "Roughly how many cigarillos do you currently smoke in a normal month?" with "2" |
| 319 | + And I submit the form |
| 320 | + |
| 321 | + Then I am on "/cigarillos-smoking-change" |
| 322 | + And I see a page title "Has the number of cigarillos you normally smoke changed over time?" |
| 323 | + When I check "Yes, I used to smoke more than 2 cigarillos a month" |
| 324 | + And I submit the form |
| 325 | + |
| 326 | + Then I am on "/cigarillos-smoking-increased-frequency" |
| 327 | + And I see a page title "When you smoked more than 2 cigarillos a month, how often did you smoke cigarillos?" |
| 328 | + When I check "Weekly" |
| 329 | + And I submit the form |
| 330 | + |
| 331 | + Then I am on "/cigarillos-smoked-increased-amount" |
| 332 | + When I fill in "When you smoked more than 2 cigarillos a month, roughly how many cigarillos did you normally smoke a week?" with "4" |
| 333 | + And I submit the form |
| 334 | + |
| 335 | + Then I am on "/cigarillos-smoked-increased-years" |
| 336 | + When I fill in "Roughly how many years did you smoke 4 cigarillos a week?" with "3" |
| 337 | + And I submit the form |
| 338 | + |
| 339 | + # Check your answers |
| 340 | + Then I am on "/check-your-answers" |
| 341 | + |
| 342 | + Then I see "15 years" as a response to "Total number of years you smoked cigarettes" under "Cigarette smoking history" |
| 343 | + And I see "10 cigarettes a day" as a response to "Current cigarette smoking" under "Cigarette smoking history" |
| 344 | + And I see "200 cigarettes a week for 5 years" as a response to "When you smoked more than 10 cigarettes a day" under "Cigarette smoking history" |
| 345 | + And I see "1 cigarettes a month for 2 years" as a response to "When you smoked fewer than 10 cigarettes a day" under "Cigarette smoking history" |
| 346 | + |
| 347 | + Then I see "26 years" as a response to "Total number of years you smoked rolling tobacco" under "Rolling tobacco smoking history" |
| 348 | + And I see "25 grams of rolling tobacco a week" as a response to "Current rolling tobacco smoking" under "Rolling tobacco smoking history" |
| 349 | + And I see "12 grams of rolling tobacco a day for 10 years" as a response to "When you smoked more than 25 grams of rolling tobacco a week" under "Rolling tobacco smoking history" |
| 350 | + And I see "5 grams of rolling tobacco a month for 4 years" as a response to "When you smoked fewer than 25 grams of rolling tobacco a week" under "Rolling tobacco smoking history" |
| 351 | + |
| 352 | + Then I see "26 years" as a response to "Total number of years you smoked a pipe" under "Pipe smoking history" |
| 353 | + And I see "25 full pipe loads a week" as a response to "Current pipe smoking" under "Pipe smoking history" |
| 354 | + And I see "12 full pipe loads a day for 10 years" as a response to "When you smoked more than 25 full pipe loads a week" under "Pipe smoking history" |
| 355 | + And I see "5 full pipe loads a month for 4 years" as a response to "When you smoked fewer than 25 full pipe loads a week" under "Pipe smoking history" |
| 356 | + |
| 357 | + Then I see "8 years" as a response to "Total number of years you smoked medium cigars" under "Medium cigar smoking history" |
| 358 | + And I see "9 medium cigars a month" as a response to "Current medium cigar smoking" under "Medium cigar smoking history" |
| 359 | + And I see "7 medium cigars a week for 3 years" as a response to "When you smoked fewer than 9 medium cigars a month" under "Medium cigar smoking history" |
| 360 | + |
| 361 | + Then I see "4 years" as a response to "Total number of years you smoked cigarillos" under "Cigarillo smoking history" |
| 362 | + And I see "2 cigarillos a month" as a response to "Current cigarillo smoking" under "Cigarillo smoking history" |
| 363 | + And I see "4 cigarillos a week for 3 years" as a response to "When you smoked more than 2 cigarillos a month" under "Cigarillo smoking history" |
| 364 | + |
| 365 | + # Change cigarette smoking history |
| 366 | + When I click the link to change "Cigarette" smoking history |
| 367 | + |
| 368 | + Then I am on "/cigarettes-smoking-current?change=True" |
| 369 | + When I check "Yes" |
| 370 | + And I submit the form |
| 371 | + |
| 372 | + Then I am on "/cigarettes-smoked-total-years?change=True" |
| 373 | + When I fill in "Roughly how many years have you smoked cigarettes?" with "17" |
| 374 | + And I submit the form |
| 375 | + |
| 376 | + Then I am on "/cigarettes-smoking-frequency?change=True" |
| 377 | + When I check "Monthly" |
| 378 | + And I submit the form |
| 379 | + |
| 380 | + Then I am on "/cigarettes-smoked-amount?change=True" |
| 381 | + When I fill in "Roughly how many cigarettes do you currently smoke in a normal month?" with "25" |
| 382 | + And I submit the form |
| 383 | + |
| 384 | + Then I am on "/cigarettes-smoking-change?change=True" |
| 385 | + When I check "Yes, I used to smoke more than 25 cigarettes a month" |
| 386 | + And I check "Yes, I used to smoke fewer than 25 cigarettes a month" |
| 387 | + And I submit the form |
| 388 | + |
| 389 | + Then I am on "/cigarettes-smoking-increased-frequency?change=True" |
| 390 | + When I check "Daily" |
| 391 | + And I submit the form |
| 392 | + |
| 393 | + Then I am on "/cigarettes-smoked-increased-amount?change=True" |
| 394 | + When I fill in "When you smoked more than 25 cigarettes a month, roughly how many cigarettes did you normally smoke a day?" with "40" |
| 395 | + And I submit the form |
| 396 | + |
| 397 | + Then I am on "/cigarettes-smoked-increased-years?change=True" |
| 398 | + |
| 399 | + When I go to "/check-your-answers" |
| 400 | + Then I see "17 years" as a response to "Total number of years you smoked cigarettes" under "Cigarette smoking history" |
| 401 | + And I see "25 cigarettes a month" as a response to "Current cigarette smoking" under "Cigarette smoking history" |
| 402 | + |
| 403 | + And I see "40 cigarettes a day for 5 years" as a response to "When you smoked more than 25 cigarettes a month" under "Cigarette smoking history" |
0 commit comments