Skip to content

Commit 759564a

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

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

openwisp_firmware_upgrader/tests/test_selenium.py

+4
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ 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(EC.url_contains('batchupgradeoperation'))
280+
except TimeoutException:
281+
self.fail('User was not redirected to Mass upgrade operations page')
278282
self.assertEqual(
279283
BatchUpgradeOperation.objects.filter(
280284
upgrade_options={

0 commit comments

Comments
 (0)