Skip to content

Commit b9bb795

Browse files
WIP
1 parent ad5cdb2 commit b9bb795

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

spec/system/kiosk_view_spec.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,11 @@
115115
expect(page).to have_content(login_label)
116116
click_link "Add Accessories"
117117
wait_for_ajax
118+
wait_for { page.has_field?(accessory.name) }
118119
check accessory.name
119120
wait_for { page.has_field?("kiosk_accessories_#{accessory.id}_quantity") }
120121
fill_in "kiosk_accessories_#{accessory.id}_quantity", with: "3"
121-
wait_for { page.has_field?("kiosk_reservations_password") }
122+
wait_for { page.has_field?("kiosk_accessories_password") }
122123
fill_in "Password", with: password
123124
click_button "Save Changes"
124125

@@ -133,10 +134,11 @@
133134
expect(page).to have_content(login_label)
134135
click_link "Add Accessories"
135136
wait_for_ajax
137+
wait_for { page.has_field?(accessory.name) }
136138
check accessory.name
137139
wait_for { page.has_field?("kiosk_accessories_#{accessory.id}_quantity") }
138140
fill_in "kiosk_accessories_#{accessory.id}_quantity", with: "3"
139-
wait_for { page.has_field?("kiosk_reservations_password") }
141+
wait_for { page.has_field?("kiosk_accessories_password") }
140142
fill_in "Password", with: "not-the-password"
141143
click_button "Save Changes"
142144
expect(page).not_to have_content("1 accessory added")
@@ -150,10 +152,11 @@
150152
expect(page).to have_content(login_label)
151153
click_link "End Reservation"
152154
wait_for_ajax
155+
wait_for { page.has_field?(accessory.name) }
153156
check accessory.name
154157
wait_for { page.has_field?("kiosk_accessories_#{accessory.id}_quantity") }
155158
fill_in "kiosk_accessories_#{accessory.id}_quantity", with: "3"
156-
wait_for { page.has_field?("kiosk_reservations_password") }
159+
wait_for { page.has_field?("kiosk_accessories_password") }
157160
fill_in "Password", with: password
158161
click_button "Save Changes"
159162

@@ -171,6 +174,7 @@
171174
check accessory.name
172175
wait_for_ajax
173176
fill_in "kiosk_accessories_#{accessory.id}_quantity", with: "3"
177+
wait_for { page.has_field?("kiosk_accessories_password") }
174178
fill_in "Password", with: "not-the-password"
175179
click_button "Save Changes"
176180

0 commit comments

Comments
 (0)