snapshots: Fix tests broken by UI changes

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalapati 2018-03-23 11:48:21 +05:30 committed by James Valleroy
parent 905a418399
commit 143a24a64a
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -78,11 +78,11 @@ def delete_all_snapshots(browser):
def create_snapshot(browser):
nav_to_module(browser, 'snapshot')
browser.visit(config['DEFAULT']['url'] + '/plinth/sys/snapshot/manage/')
browser.find_by_value('Create Snapshot').click()
def get_snapshot_count(browser):
nav_to_module(browser, 'snapshot')
browser.visit(config['DEFAULT']['url'] + '/plinth/sys/snapshot/manage/')
# Subtract 1 for table header
return len(browser.find_by_xpath('//tr')) - 1