test_shared_issue.py 1.2 KB

1234567891011121314151617181920212223242526
  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.utils.samples import load_data
  5. class SharedIssueTest(AcceptanceTestCase):
  6. def setUp(self):
  7. super().setUp()
  8. self.user = self.create_user("foo@example.com")
  9. self.org = self.create_organization(owner=self.user, name="Rowdy Tiger")
  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.login_as(self.user)
  13. def test_python_event(self):
  14. data = load_data(platform="python")
  15. data["timestamp"] = iso_format(before_now(days=1))
  16. event = self.store_event(data=data, project_id=self.project.id)
  17. GroupShare.objects.create(project_id=event.group.project_id, group=event.group)
  18. self.browser.get(f"/share/issue/{event.group.get_share_id()}/")
  19. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  20. self.browser.wait_until_test_id("event-entries-loading-false")
  21. self.browser.snapshot("shared issue python")