test_project_user_feedback.py 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. from django.utils import timezone
  2. from sentry.testutils.cases import AcceptanceTestCase
  3. from sentry.testutils.silo import no_silo_test
  4. @no_silo_test(stable=True)
  5. class ProjectUserFeedbackTest(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(
  11. organization=self.org, name="Mariachi Band", members=[self.user]
  12. )
  13. self.project = self.create_project(organization=self.org, teams=[self.team], name="Bengal")
  14. self.login_as(self.user)
  15. self.path = f"/organizations/{self.org.slug}/user-feedback/?project=${self.project.id}"
  16. self.project.update(first_event=timezone.now())
  17. def test(self):
  18. group = self.create_group(project=self.project, message="Foo bar")
  19. self.create_userreport(
  20. date_added=timezone.now(),
  21. group=group,
  22. project=self.project,
  23. event_id=self.event.event_id,
  24. )
  25. self.browser.get(self.path)
  26. self.browser.wait_until_not(".loading")
  27. self.browser.wait_until('[data-test-id="user-feedback-list"]')
  28. self.browser.snapshot("project user feedback")
  29. def test_empty(self):
  30. self.browser.get(self.path)
  31. self.browser.wait_until_not(".loading")
  32. self.browser.wait_until('[data-test-id="user-feedback"]')
  33. self.browser.snapshot("project user feedback - empty")