Skip to content

Commit 16f7d87

Browse files
ndmanvarmaxkosty
authored andcommitted
move sleep to before cart click
1 parent 78b1577 commit 16f7d87

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tda/desktop_web/test_checkout.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ def test_checkout(desktop_web_driver, endpoints, batch_size, backend, random, sl
2525
try:
2626
desktop_web_driver.get(url)
2727

28-
# Add 2 second sleep between the initial /products pageload
29-
# and the navigation to the checkout cart
30-
# to solve for web vitals issue as transaction may not be resolving
31-
time.sleep(2)
32-
3328
# Optional - use the time.sleep here so button can rinish rendering before the desktop_web_driver tries to click it
3429
# Solution - handle gracefully when the desktop_web_driver clicks a button that's not rendered yet, and then time.sleep(1) and try again
3530
# time.sleep(5)
@@ -51,6 +46,11 @@ def test_checkout(desktop_web_driver, endpoints, batch_size, backend, random, sl
5146
time.sleep(1)
5247
pass
5348

49+
# Add 2 second sleep between the initial /products pageload
50+
# and the navigation to the checkout cart
51+
# to solve for web vitals issue as transaction may not be resolving
52+
time.sleep(2)
53+
5454
desktop_web_driver.find_element(By.CSS_SELECTOR, '.show-desktop #top-right-links a[href="/cart"]').click()
5555
time.sleep(sleep_length())
5656
desktop_web_driver.find_element(By.CSS_SELECTOR, 'a[href="/checkout"]').click()

0 commit comments

Comments
 (0)