test_api.py 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. from sentry.testutils.cases import AcceptanceTestCase
  2. from sentry.testutils.silo import no_silo_test
  3. @no_silo_test
  4. class ApiApplicationTest(AcceptanceTestCase):
  5. def setUp(self):
  6. super().setUp()
  7. self.org = self.create_organization(name="Rowdy Tiger Rowdy Tiger Rowdy Tiger", owner=None)
  8. self.project = self.create_project(
  9. organization=self.org, teams=[self.team], name="Bengal Bengal Bengal Bengal"
  10. )
  11. self.login_as(self.user)
  12. self.path = "/api/applications/"
  13. def test_simple(self):
  14. self.browser.get(self.path)
  15. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  16. self.browser.click_when_visible('[aria-label="Create New Application"]')
  17. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  18. self.browser.click('[href="/settings/account/api/applications/"]')
  19. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  20. self.browser.click_when_visible('[data-test-id="toast-success"]')
  21. self.browser.wait_until_not('[data-test-id="toast-success"]')
  22. self.browser.get(self.path)
  23. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  24. self.browser.click_when_visible('[aria-label="Remove"]')
  25. self.browser.wait_until_not('[data-test-id="toast-loading"]')
  26. self.browser.wait_until_test_id("empty-message")