test_account_settings.py 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. from sentry.testutils.cases import AcceptanceTestCase
  2. class AccountSettingsTest(AcceptanceTestCase):
  3. def setUp(self):
  4. super().setUp()
  5. self.user = self.create_user("foo@example.com")
  6. self.org = self.create_organization(name="Rowdy Tiger Rowdy Tiger Rowdy Tiger", owner=None)
  7. self.team = self.create_team(
  8. organization=self.org, name="Mariachi Band Mariachi Band Mariachi Band"
  9. )
  10. self.project = self.create_project(
  11. organization=self.org, teams=[self.team], name="Bengal Bengal Bengal Bengal"
  12. )
  13. self.create_member(user=self.user, organization=self.org, role="owner", teams=[self.team])
  14. second_org = self.create_organization(name="Multiple Owners", owner=self.user)
  15. self.create_member(
  16. user=self.create_user("bar@example.com"), organization=second_org, role="owner"
  17. )
  18. self.login_as(self.user)
  19. def test_account_security_settings(self):
  20. with self.feature("organizations:onboarding"):
  21. self.browser.get("/settings/account/security/")
  22. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  23. self.browser.snapshot("account security settings")
  24. def test_account_notifications(self):
  25. with self.feature("organizations:onboarding"):
  26. self.browser.get("/settings/account/notifications/")
  27. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  28. self.browser.snapshot("account notification settings")
  29. self.browser.click_when_visible('[data-test-id="fine-tuning"]')
  30. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  31. self.browser.snapshot('account notification - fine tune "Alerts"')
  32. def test_account_emails_settings(self):
  33. with self.feature("organizations:onboarding"):
  34. self.browser.get("/settings/account/emails/")
  35. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  36. self.browser.snapshot("account emails settings")
  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. self.browser.snapshot("account subscriptions settings")
  42. def test_account_authorizations_settings(self):
  43. with self.feature("organizations:onboarding"):
  44. self.browser.get("/account/authorizations/")
  45. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  46. self.browser.snapshot("account authorizations settings")
  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. self.browser.snapshot("account identities settings")
  52. def test_close_account(self):
  53. with self.feature("organizations:onboarding"):
  54. self.browser.get("/account/remove/")
  55. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  56. self.browser.snapshot("account settings - close account")