test_shared_issue.py 1.3 KB

123456789101112131415161718192021222324252627282930
  1. from sentry.models.groupshare import GroupShare
  2. from sentry.testutils.cases import AcceptanceTestCase
  3. from sentry.testutils.helpers.datetime import before_now, iso_format
  4. from sentry.testutils.silo import no_silo_test
  5. from sentry.utils.samples import load_data
  6. @no_silo_test(stable=True)
  7. class SharedIssueTest(AcceptanceTestCase):
  8. def setUp(self):
  9. super().setUp()
  10. self.user = self.create_user("foo@example.com")
  11. self.org = self.create_organization(owner=self.user, name="Rowdy Tiger")
  12. self.team = self.create_team(organization=self.org, name="Mariachi Band")
  13. self.project = self.create_project(organization=self.org, teams=[self.team], name="Bengal")
  14. self.login_as(self.user)
  15. def test_python_event(self):
  16. data = load_data(platform="python")
  17. data["timestamp"] = iso_format(before_now(days=1))
  18. event = self.store_event(data=data, project_id=self.project.id)
  19. assert event.group is not None
  20. GroupShare.objects.create(project_id=event.group.project_id, group=event.group)
  21. self.browser.get(
  22. f"/organizations/{self.org.slug}/share/issue/{event.group.get_share_id()}/"
  23. )
  24. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  25. self.browser.wait_until_not('[data-test-id="event-entries-loading-false"]')