test_project_releases.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import pytest
  2. from django.utils import timezone
  3. from sentry.testutils.cases import AcceptanceTestCase
  4. from sentry.testutils.silo import no_silo_test
  5. @no_silo_test(stable=True)
  6. class ProjectReleasesTest(AcceptanceTestCase):
  7. def setUp(self):
  8. super().setUp()
  9. self.user = self.create_user("foo@example.com")
  10. self.org = self.create_organization(owner=self.user, name="Rowdy Tiger")
  11. self.team = self.create_team(organization=self.org, name="Mariachi Band")
  12. self.project = self.create_project(organization=self.org, teams=[self.team], name="Bengal")
  13. self.login_as(self.user)
  14. self.path = f"/{self.org.slug}/{self.project.slug}/releases/"
  15. @pytest.mark.skip(reason="Sentry 9 only")
  16. def test_with_releases(self):
  17. release = self.create_release(project=self.project, version="1.0")
  18. self.create_group(first_release=release, project=self.project, message="Foo bar")
  19. self.project.update(first_event=timezone.now())
  20. self.browser.get(self.path)
  21. self.browser.wait_until_not(".loading")
  22. self.browser.wait_until(".ref-project-releases")
  23. @pytest.mark.skip(reason="Sentry 9 only")
  24. def test_with_no_releases(self):
  25. self.browser.get(self.path)
  26. self.browser.wait_until_not(".loading")
  27. self.browser.wait_until(".ref-project-releases")
  28. @no_silo_test(stable=True)
  29. class ProjectReleaseDetailsTest(AcceptanceTestCase):
  30. def setUp(self):
  31. super().setUp()
  32. self.user = self.create_user("foo@example.com")
  33. self.org = self.create_organization(owner=self.user, name="Rowdy Tiger")
  34. self.team = self.create_team(organization=self.org, name="Mariachi Band")
  35. self.project = self.create_project(
  36. organization=self.org, teams=[self.team], name="Bengal", first_event=timezone.now()
  37. )
  38. self.release = self.create_release(project=self.project, version="1.0")
  39. self.create_group(first_release=self.release, project=self.project, message="Foo bar")
  40. self.login_as(self.user)
  41. self.path = f"/{self.org.slug}/{self.project.slug}/releases/{self.release.version}/"
  42. @pytest.mark.skip(reason="Sentry 9 only")
  43. def test_release_details_no_commits_no_deploys(self):
  44. self.browser.get(self.path)
  45. self.browser.wait_until_not(".loading")
  46. self.browser.wait_until(".ref-release-details")