Skip to content

Commit 9938eb0

Browse files
committed
[tests] Added sleep to selenium test
1 parent ffef8c1 commit 9938eb0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

openwisp_controller/config/tests/test_selenium.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def test_force_delete_device_with_deactivating_config(self):
252252
# to complete before trying to interact with the button,
253253
# otherwise the test may fail due to the button not being fully
254254
# visible or clickable yet.
255-
time.sleep(0.5)
255+
time.sleep(1)
256256
delete_confirm = self.find_element(
257257
By.CSS_SELECTOR, 'form[method="post"] input[type="submit"]', timeout=10
258258
)
@@ -285,6 +285,11 @@ def test_force_delete_multiple_devices_with_deactivating_config(self):
285285
By.CSS_SELECTOR, '#deactivating-warning .messagelist .warning p'
286286
)
287287
self.find_element(by=By.CSS_SELECTOR, value='#warning-ack').click()
288+
# After accepting the warning, wee need to wait for the animation
289+
# to complete before trying to interact with the button,
290+
# otherwise the test may fail due to the button not being fully
291+
# visible or clickable yet.
292+
time.sleep(1)
288293
delete_confirm = self.find_element(
289294
By.CSS_SELECTOR, 'form[method="post"] input[type="submit"]'
290295
)

0 commit comments

Comments
 (0)