|
15 | 15 | check "Active?" |
16 | 16 | fill_in_rich_text_area "banner_content", with: "Please fill out this survey." |
17 | 17 | click_on "Submit" |
18 | | - |
19 | | - visit banners_path |
| 18 | + expect(page).to have_current_path(banners_path) |
20 | 19 | expect(page).to have_text("Volunteer Survey Announcement") |
21 | 20 |
|
22 | | - visit banners_path |
23 | 21 | within "#banners" do |
24 | 22 | click_on "Edit", match: :first |
25 | 23 | end |
26 | 24 | fill_in "Name", with: "Better Volunteer Survey Announcement" |
27 | 25 | click_on "Submit" |
28 | 26 |
|
29 | | - visit banners_path |
| 27 | + expect(page).to have_current_path(banners_path) |
30 | 28 | expect(page).to have_text("Better Volunteer Survey Announcement") |
31 | 29 |
|
32 | 30 | visit root_path |
|
44 | 42 | fill_in_rich_text_area "banner_content", with: "Please fill out this survey." |
45 | 43 | click_on "Submit" |
46 | 44 |
|
47 | | - visit banners_path |
| 45 | + expect(page).to have_current_path(banners_path) |
48 | 46 | expect(page).to have_text("Expiring Announcement") |
49 | | - |
50 | | - visit banners_path |
51 | 47 | within "#banners" do |
52 | 48 | click_on "Edit", match: :first |
53 | 49 | end |
54 | 50 | fill_in "banner_expires_at", with: 2.days.from_now.strftime("%m%d%Y\t%I%M%P") |
55 | 51 | click_on "Submit" |
56 | | - |
57 | | - visit banners_path |
| 52 | + expect(page).to have_current_path(banners_path) |
58 | 53 | expect(page).to have_text("Expiring Announcement") |
59 | 54 |
|
60 | 55 | visit root_path |
|
71 | 66 | fill_in_rich_text_area "banner_content", with: "Please fill out this survey." |
72 | 67 | click_on "Submit" |
73 | 68 |
|
74 | | - visit banners_path |
| 69 | + expect(page).to have_current_path(new_banner_path) |
75 | 70 | expect(page).not_to have_text("Announcement not created") |
76 | 71 | end |
77 | 72 |
|
|
93 | 88 | check "Active?" |
94 | 89 | fill_in_rich_text_area "banner_content", with: "New active banner content." |
95 | 90 | click_on "Submit" |
| 91 | + expect(page).to have_current_path(banners_path) |
96 | 92 |
|
97 | | - visit banners_path |
98 | 93 | within("table#banners") do |
99 | 94 | already_existing_banner_row = find("tr", text: active_banner.name) |
100 | 95 |
|
|
118 | 113 | fill_in_rich_text_area "banner_content", with: "New active banner content." |
119 | 114 | click_on "Submit" |
120 | 115 |
|
121 | | - visit banners_path |
| 116 | + expect(page).to have_current_path(banners_path) |
122 | 117 |
|
123 | 118 | within("table#banners") do |
124 | 119 | already_existing_banner_row = find("tr", text: active_banner.name) |
|
0 commit comments