test_organization_stats.py 943 B

123456789101112131415161718192021222324
  1. from django.utils import timezone
  2. from sentry.testutils.cases import AcceptanceTestCase
  3. from sentry.testutils.silo import no_silo_test
  4. @no_silo_test(stable=True)
  5. class OrganizationStatsTest(AcceptanceTestCase):
  6. def setUp(self):
  7. super().setUp()
  8. self.user = self.create_user("foo@example.com")
  9. self.org = self.create_organization(name="Org Name")
  10. self.team = self.create_team(name="Team Name", organization=self.org, members=[self.user])
  11. self.project = self.create_project(
  12. organization=self.org, teams=[self.team], name="Project Name"
  13. )
  14. self.login_as(self.user)
  15. self.path = f"/organizations/{self.org.slug}/stats/"
  16. def test_simple(self):
  17. self.project.update(first_event=timezone.now())
  18. self.browser.get(self.path)
  19. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  20. self.browser.snapshot("organization stats")