test_teams_list.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  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 TeamsListTest(AcceptanceTestCase):
  6. def setUp(self):
  7. super().setUp()
  8. self.user = self.create_user("foo@example.com")
  9. self.org = self.create_organization(name="Rowdy Tiger", owner=None)
  10. self.team = self.create_team(organization=self.org, name="Mariachi Band")
  11. self.project = self.create_project(organization=self.org, teams=[self.team], name="Bengal")
  12. self.create_member(user=self.user, organization=self.org, role="owner", teams=[self.team])
  13. self.login_as(self.user)
  14. # this should redirect to /settings/{}/teams/
  15. self.path = f"/organizations/{self.org.slug}/teams/"
  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.wait_until_test_id("team-list")
  21. # team details link
  22. self.browser.click('[data-test-id="team-list"] a[href]:first-child')
  23. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  24. # Click projects tab
  25. self.browser.click(".nav-tabs li:nth-child(2) a")
  26. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  27. # Click projects tab
  28. self.browser.click(".nav-tabs li:nth-child(3) a")
  29. self.browser.wait_until_not('[data-test-id="loading-indicator"]')