test_account_settings.py 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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.feature("organizations:onboarding"):
  23. self.browser.get("/settings/account/security/")
  24. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  25. self.browser.snapshot("account security settings")
  26. def test_account_notifications(self):
  27. with self.feature("organizations:onboarding"):
  28. self.browser.get("/settings/account/notifications/")
  29. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  30. self.browser.snapshot("account notification settings")
  31. self.browser.click_when_visible('[data-test-id="fine-tuning"]')
  32. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  33. self.browser.snapshot('account notification - fine tune "Alerts"')
  34. def test_account_emails_settings(self):
  35. with self.feature("organizations:onboarding"):
  36. self.browser.get("/settings/account/emails/")
  37. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  38. self.browser.snapshot("account emails settings")
  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. self.browser.snapshot("account subscriptions settings")
  44. def test_account_authorizations_settings(self):
  45. with self.feature("organizations:onboarding"):
  46. self.browser.get("/account/authorizations/")
  47. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  48. self.browser.snapshot("account authorizations settings")
  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. self.browser.snapshot("account identities settings")
  54. def test_close_account(self):
  55. with self.feature("organizations:onboarding"):
  56. self.browser.get("/account/remove/")
  57. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  58. self.browser.snapshot("account settings - close account")