test_shared_issue.py 1.2 KB

12345678910111213141516171819202122232425262728
  1. from sentry.models import GroupShare
  2. from sentry.testutils import AcceptanceTestCase
  3. from sentry.testutils.helpers.datetime import before_now, iso_format
  4. from sentry.testutils.silo import region_silo_test
  5. from sentry.utils.samples import load_data
  6. @region_silo_test
  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. GroupShare.objects.create(project_id=event.group.project_id, group=event.group)
  20. self.browser.get(f"/share/issue/{event.group.get_share_id()}/")
  21. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  22. self.browser.wait_until_test_id("event-entries-loading-false")
  23. self.browser.snapshot("shared issue python")