test_account_settings.py 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. from sentry.testutils.cases import AcceptanceTestCase
  2. from sentry.testutils.silo import no_silo_test
  3. @no_silo_test
  4. class AccountSettingsTest(AcceptanceTestCase):
  5. def setUp(self):
  6. super().setUp()
  7. self.user = self.create_user("foo@example.com")
  8. self.org = self.create_organization(name="Rowdy Tiger Rowdy Tiger Rowdy Tiger", owner=None)
  9. self.team = self.create_team(
  10. organization=self.org, name="Mariachi Band Mariachi Band Mariachi Band"
  11. )
  12. self.project = self.create_project(
  13. organization=self.org, teams=[self.team], name="Bengal Bengal Bengal Bengal"
  14. )
  15. self.create_member(user=self.user, organization=self.org, role="owner", teams=[self.team])
  16. second_org = self.create_organization(name="Multiple Owners", owner=self.user)
  17. self.create_member(
  18. user=self.create_user("bar@example.com"), organization=second_org, role="owner"
  19. )
  20. self.login_as(self.user)
  21. def test_account_security_settings(self):
  22. with self.options({"system.url-prefix": self.browser.live_server_url}), self.feature(
  23. "organizations:onboarding"
  24. ):
  25. self.browser.get("/settings/account/security/")
  26. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  27. def test_account_notifications(self):
  28. with self.options({"system.url-prefix": self.browser.live_server_url}), self.feature(
  29. "organizations:onboarding"
  30. ):
  31. self.browser.get("/settings/account/notifications/")
  32. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  33. self.browser.click_when_visible('[data-test-id="fine-tuning"]')
  34. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  35. def test_account_emails_settings(self):
  36. with self.feature("organizations:onboarding"):
  37. self.browser.get("/settings/account/emails/")
  38. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  39. def test_account_subscriptions_settings(self):
  40. with self.feature("organizations:onboarding"):
  41. self.browser.get("/settings/account/subscriptions/")
  42. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  43. def test_account_authorizations_settings(self):
  44. with self.feature("organizations:onboarding"):
  45. self.browser.get("/account/authorizations/")
  46. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  47. def test_account_identities_settings(self):
  48. with self.feature("organizations:onboarding"):
  49. self.browser.get("/settings/account/identities/")
  50. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  51. def test_close_account(self):
  52. with self.options({"system.url-prefix": self.browser.live_server_url}):
  53. self.browser.get("/account/remove/")
  54. self.browser.wait_until_not('[data-test-id="loading-indicator"]')