Skip to content

Commit 44ba89a

Browse files
committed
[tests] Made selenium test resilient to failures
1 parent 3a52919 commit 44ba89a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

openwisp_firmware_upgrader/tests/test_selenium.py

+6
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,12 @@ def test_batch_upgrade_upgrade_options(self, *args):
275275
self.web_driver.find_element(
276276
by=By.CSS_SELECTOR, value='input[name="upgrade_all"]'
277277
).click()
278+
try:
279+
WebDriverWait(self.web_driver, 5).until(
280+
EC.url_contains('batchupgradeoperation')
281+
)
282+
except TimeoutException:
283+
self.fail('User was not redirected to Mass upgrade operations page')
278284
self.assertEqual(
279285
BatchUpgradeOperation.objects.filter(
280286
upgrade_options={

0 commit comments

Comments
 (0)