test_organization_stats.py 863 B

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