|
87 | 87 | expect(page).to have_content(audit_quantity) |
88 | 88 |
|
89 | 89 | accept_confirm do |
90 | | - click_link "Finalize Audit" |
| 90 | + click_button "Finalize Audit" |
91 | 91 | end |
92 | 92 | expect(page.find(".alert-info")).to have_content "Audit is Finalized" |
93 | 93 |
|
|
209 | 209 | expect(page).to have_content("Delete Audit") |
210 | 210 | expect do |
211 | 211 | accept_confirm do |
212 | | - click_link "Delete Audit" |
| 212 | + click_button "Delete Audit" |
213 | 213 | end |
214 | 214 | expect(page).to have_content("Audit is successfully deleted.") |
215 | 215 | end.to change { Audit.count }.by(-1) |
|
257 | 257 | expect(page).to have_content("Delete Audit") |
258 | 258 | expect do |
259 | 259 | accept_confirm do |
260 | | - click_link "Delete Audit" |
| 260 | + click_button "Delete Audit" |
261 | 261 | end |
262 | 262 | expect(page).to have_content("Audit is successfully deleted.") |
263 | 263 | end.to change { Audit.count }.by(-1) |
|
269 | 269 | expect(page).to have_content("Finalize Audit") |
270 | 270 | expect do |
271 | 271 | accept_confirm do |
272 | | - click_link "Finalize Audit" |
| 272 | + click_button "Finalize Audit" |
273 | 273 | end |
274 | 274 | expect(page).to have_content("Audit is Finalized.") |
275 | 275 | end.to change { Audit.finalized.count }.by(1) |
|
284 | 284 | expect(page).to have_content("Finalize Audit") |
285 | 285 | expect do |
286 | 286 | accept_confirm do |
287 | | - click_link "Finalize Audit" |
| 287 | + click_button "Finalize Audit" |
288 | 288 | end |
289 | 289 | expect(page).to have_content("Audit is Finalized.") |
290 | 290 | end.to change { storage_location.size }.by(quantity - item_quantity) |
|
295 | 295 | visit subject |
296 | 296 | expect(page).to have_content("Finalize Audit") |
297 | 297 | accept_confirm do |
298 | | - click_link "Finalize Audit" |
| 298 | + click_button "Finalize Audit" |
299 | 299 | end |
300 | 300 | expect(page).not_to have_content("Resume Audit") |
301 | 301 | expect(page).not_to have_content("Delete Audit") |
|
309 | 309 | visit subject |
310 | 310 | expect(page).to have_content("Finalize Audit") |
311 | 311 | accept_confirm do |
312 | | - click_link "Finalize Audit" |
| 312 | + click_button "Finalize Audit" |
313 | 313 | end |
314 | 314 | expect(page).not_to have_content("Delete Audit") |
315 | 315 | # Actual Deletion(`delete :destroy`) Check is done in audits_controller_spec |
|
332 | 332 | visit subject |
333 | 333 | expect do |
334 | 334 | accept_confirm do |
335 | | - click_link "Finalize Audit" |
| 335 | + click_button "Finalize Audit" |
336 | 336 | end |
337 | 337 | expect(page).to have_content("Audit is Finalized.") |
338 | 338 | end.to change { storage_location.size }.by(quantity - item_quantity) |
|
0 commit comments