123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- import pytest
- from django.utils import timezone
- from sentry.testutils.cases import AcceptanceTestCase
- from sentry.testutils.silo import no_silo_test
- @no_silo_test(stable=True)
- class ProjectReleasesTest(AcceptanceTestCase):
- def setUp(self):
- super().setUp()
- self.user = self.create_user("foo@example.com")
- self.org = self.create_organization(owner=self.user, name="Rowdy Tiger")
- self.team = self.create_team(organization=self.org, name="Mariachi Band")
- self.project = self.create_project(organization=self.org, teams=[self.team], name="Bengal")
- self.login_as(self.user)
- self.path = f"/{self.org.slug}/{self.project.slug}/releases/"
- @pytest.mark.skip(reason="Sentry 9 only")
- def test_with_releases(self):
- release = self.create_release(project=self.project, version="1.0")
- self.create_group(first_release=release, project=self.project, message="Foo bar")
- self.project.update(first_event=timezone.now())
- self.browser.get(self.path)
- self.browser.wait_until_not(".loading")
- self.browser.wait_until(".ref-project-releases")
- @pytest.mark.skip(reason="Sentry 9 only")
- def test_with_no_releases(self):
- self.browser.get(self.path)
- self.browser.wait_until_not(".loading")
- self.browser.wait_until(".ref-project-releases")
- @no_silo_test(stable=True)
- class ProjectReleaseDetailsTest(AcceptanceTestCase):
- def setUp(self):
- super().setUp()
- self.user = self.create_user("foo@example.com")
- self.org = self.create_organization(owner=self.user, name="Rowdy Tiger")
- self.team = self.create_team(organization=self.org, name="Mariachi Band")
- self.project = self.create_project(
- organization=self.org, teams=[self.team], name="Bengal", first_event=timezone.now()
- )
- self.release = self.create_release(project=self.project, version="1.0")
- self.create_group(first_release=self.release, project=self.project, message="Foo bar")
- self.login_as(self.user)
- self.path = f"/{self.org.slug}/{self.project.slug}/releases/{self.release.version}/"
- @pytest.mark.skip(reason="Sentry 9 only")
- def test_release_details_no_commits_no_deploys(self):
- self.browser.get(self.path)
- self.browser.wait_until_not(".loading")
- self.browser.wait_until(".ref-release-details")
|