Skip to content

Commit 590048a

Browse files
committed
test(acceptance): Try #2 to fix flakey onboarding test for django 1.10
Try #2, use a timed retry policy
1 parent c1c9d67 commit 590048a

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tests/acceptance/test_onboarding.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
from __future__ import absolute_import
22

33
import mock
4+
from selenium.common.exceptions import TimeoutException
45

56
from sentry.models import Project
67
from sentry.testutils import AcceptanceTestCase
8+
from sentry.utils.retries import TimedRetryPolicy
79

810

911
class OrganizationOnboardingTest(AcceptanceTestCase):
@@ -34,10 +36,15 @@ def test_onboarding(self, generate_api_key):
3436
# Select and create node JS project
3537
self.browser.click('[data-test-id="platform-node"]')
3638
self.browser.wait_until_not('[data-test-id="platform-select-next"][aria-disabled="true"]')
37-
self.browser.click('[data-test-id="platform-select-next"]')
39+
self.browser.wait_until('[data-test-id="platform-select-next"][aria-disabled="false"]')
3840

39-
# Project getting started
40-
self.browser.wait_until('[data-test-id="onboarding-step-get-started"]')
41+
@TimedRetryPolicy.wrap(timeout=5, exceptions=((TimeoutException,)))
42+
def click_platform_select_name(browser):
43+
browser.click('[data-test-id="platform-select-next"]')
44+
# Project getting started
45+
browser.wait_until('[data-test-id="onboarding-step-get-started"]')
46+
47+
click_platform_select_name(self.browser)
4148
self.browser.snapshot(name="onboarding - get started")
4249

4350
# Verify project was created for org

0 commit comments

Comments
 (0)