test_project_similar_issues.py 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. from datetime import datetime
  2. from django.utils import timezone
  3. from sentry.testutils import AcceptanceTestCase
  4. from sentry.utils.samples import create_sample_event
  5. class ProjectIssuesGroupingTest(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.org.flags.early_adopter = True
  11. self.org.save()
  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 create_sample_event(self, platform):
  16. event = create_sample_event(
  17. project=self.project,
  18. platform=platform,
  19. event_id="d964fdbd649a4cf8bfc35d18082b6b0e",
  20. timestamp=1452683305,
  21. )
  22. event.group.update(
  23. first_seen=datetime(2015, 8, 13, 3, 8, 25, tzinfo=timezone.utc),
  24. last_seen=datetime(2016, 1, 13, 3, 8, 25, tzinfo=timezone.utc),
  25. )
  26. return event
  27. # TODO(billy): skip until we enable for early adopters
  28. # def test_issues_similar_issues_tab(self):
  29. # event = self.create_sample_event(
  30. # platform='python',
  31. # )
  32. # self.browser.get(
  33. # '/{}/{}/issues/{}/similar/'.format(self.org.slug, self.project.slug, event.group.id)
  34. # )
  35. # self.browser.wait_until('.similar-list-container')
  36. # self.browser.snapshot('issue details, similar issues tab')