test_account_settings.py 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. from sentry.testutils.cases import AcceptanceTestCase
  2. from sentry.testutils.silo import no_silo_test
  3. @no_silo_test(stable=True)
  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.feature("organizations:onboarding"):
  29. self.browser.get("/settings/account/notifications/")
  30. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  31. self.browser.click_when_visible('[data-test-id="fine-tuning"]')
  32. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  33. def test_account_emails_settings(self):
  34. with self.feature("organizations:onboarding"):
  35. self.browser.get("/settings/account/emails/")
  36. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  37. def test_account_subscriptions_settings(self):
  38. with self.feature("organizations:onboarding"):
  39. self.browser.get("/settings/account/subscriptions/")
  40. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  41. def test_account_authorizations_settings(self):
  42. with self.feature("organizations:onboarding"):
  43. self.browser.get("/account/authorizations/")
  44. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  45. def test_account_identities_settings(self):
  46. with self.feature("organizations:onboarding"):
  47. self.browser.get("/settings/account/identities/")
  48. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  49. def test_close_account(self):
  50. with self.feature("organizations:onboarding"):
  51. self.browser.get("/account/remove/")
  52. self.browser.wait_until_not('[data-test-id="loading-indicator"]')