test_account_settings.py 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 (
  23. self.options({"system.url-prefix": self.browser.live_server_url}),
  24. self.feature("organizations:onboarding"),
  25. ):
  26. self.browser.get("/settings/account/security/")
  27. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  28. def test_account_notifications(self):
  29. with (
  30. self.options({"system.url-prefix": self.browser.live_server_url}),
  31. self.feature("organizations:onboarding"),
  32. ):
  33. self.browser.get("/settings/account/notifications/")
  34. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  35. self.browser.click_when_visible('[data-test-id="fine-tuning"]')
  36. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  37. def test_account_emails_settings(self):
  38. with self.feature("organizations:onboarding"):
  39. self.browser.get("/settings/account/emails/")
  40. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  41. def test_account_subscriptions_settings(self):
  42. with self.feature("organizations:onboarding"):
  43. self.browser.get("/settings/account/subscriptions/")
  44. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  45. def test_account_authorizations_settings(self):
  46. with self.feature("organizations:onboarding"):
  47. self.browser.get("/account/authorizations/")
  48. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  49. def test_account_identities_settings(self):
  50. with self.feature("organizations:onboarding"):
  51. self.browser.get("/settings/account/identities/")
  52. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  53. def test_close_account(self):
  54. with self.options({"system.url-prefix": self.browser.live_server_url}):
  55. self.browser.get("/account/remove/")
  56. self.browser.wait_until_not('[data-test-id="loading-indicator"]')