mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
functional_tests: Fix create snapshot test failure
When there are no snapshots present in the list of snapshots, operation to delete all snapshots first checks that select all button and then submits the delete snapshots button. After that it looks for delete confirmation and then submits again. When the confirmation page is not shown, as is the case when there are no snapshots, the button being submitted happens to be 'Create Snapshot' button. This creates a new snapshot and the total number of snapshots at the end of create snapshot test is 2 instead of 1. Tests: - Run `py.test-3 --include-functional -k snapshot`. Closes: #1630. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
f447264547
commit
e0b0b0f532
@ -103,7 +103,9 @@ def delete_all_snapshots(browser):
|
||||
browser.find_by_id('select-all').check()
|
||||
|
||||
submit(browser, browser.find_by_name('delete_selected'))
|
||||
submit(browser, browser.find_by_name('delete_confirm'))
|
||||
confirm_button = browser.find_by_name('delete_confirm')
|
||||
if confirm_button: # Only if redirected to confirm page
|
||||
submit(browser, confirm_button)
|
||||
|
||||
|
||||
def create_snapshot(browser):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user