|
4 | 4 |
|
5 | 5 | # Pages |
6 | 6 | shared_context "when React Router Demo", page: :main do |
7 | | - background { visit root_path } |
| 7 | + before { visit root_path } |
8 | 8 | end |
9 | 9 | shared_context "when React Demo", page: :react_demo do |
10 | | - background { visit no_router_path } |
| 10 | + before { visit no_router_path } |
11 | 11 | end |
12 | 12 | shared_context "when Simple Page", page: :simple do |
13 | | - background { visit simple_path } |
| 13 | + before { visit simple_path } |
14 | 14 | end |
15 | 15 | shared_context "when Classic Page", page: :classic do |
16 | | - background { visit comments_path } |
| 16 | + before { visit comments_path } |
17 | 17 | end |
18 | 18 |
|
19 | 19 | # Forms |
20 | 20 | shared_context "when Horizontal Form", form: :horizontal do |
21 | | - background do |
22 | | - # added an extra click on this the non-default link to try to tease out a poltergeist crash |
23 | | - click_link "Inline Form" |
24 | | - expect(page).to have_css("form.commentForm.form-inline") |
| 21 | + click_link "Inline Form" |
| 22 | + expect(page).to have_css("form.commentForm.form-inline") |
25 | 23 |
|
26 | | - click_link "Horizontal Form" |
27 | | - expect(page).to have_css("form.commentForm.form-horizontal") |
28 | | - end |
| 24 | + click_link "Horizontal Form" |
| 25 | + expect(page).to have_css("form.commentForm.form-horizontal") |
29 | 26 | end |
30 | 27 | shared_context "when Inline Form", form: :inline do |
31 | | - background do |
32 | | - click_link "Inline Form" |
33 | | - expect(page).to have_css("form.commentForm.form-inline") |
34 | | - end |
| 28 | + click_link "Inline Form" |
| 29 | + expect(page).to have_css("form.commentForm.form-inline") |
35 | 30 | end |
36 | 31 | shared_context "when Stacked Form", form: :stacked do |
37 | | - background do |
38 | | - click_link "Stacked Form" |
39 | | - expect(page).to have_css("form.commentForm.form-stacked") |
40 | | - end |
| 32 | + click_link "Stacked Form" |
| 33 | + expect(page).to have_css("form.commentForm.form-stacked") |
41 | 34 | end |
42 | 35 |
|
43 | 36 | # Form Submission |
|
47 | 40 | let(:name) { name } |
48 | 41 | let(:text) { text } |
49 | 42 |
|
50 | | - background do |
51 | | - fill_in hint_name, with: name |
52 | | - fill_in hint_text, with: text |
53 | | - click_button "Post" |
54 | | - end |
| 43 | + fill_in hint_name, with: name |
| 44 | + fill_in hint_text, with: text |
| 45 | + click_button "Post" |
55 | 46 | end |
56 | 47 |
|
57 | 48 | shared_context "when Form Submitted with Blank Fields", blank_form_submitted: true do |
|
0 commit comments