test_project_user_feedback.py 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. from django.utils import timezone
  2. from sentry.testutils import AcceptanceTestCase
  3. class ProjectUserFeedbackTest(AcceptanceTestCase):
  4. def setUp(self):
  5. super().setUp()
  6. self.user = self.create_user("foo@example.com")
  7. self.org = self.create_organization(owner=self.user, name="Rowdy Tiger")
  8. self.team = self.create_team(
  9. organization=self.org, name="Mariachi Band", members=[self.user]
  10. )
  11. self.project = self.create_project(organization=self.org, teams=[self.team], name="Bengal")
  12. self.login_as(self.user)
  13. self.path = f"/{self.org.slug}/{self.project.slug}/user-feedback/"
  14. self.project.update(first_event=timezone.now())
  15. def test(self):
  16. group = self.create_group(project=self.project, message="Foo bar")
  17. self.create_userreport(
  18. date_added=timezone.now(),
  19. group=group,
  20. project=self.project,
  21. event_id=self.event.event_id,
  22. )
  23. self.browser.get(self.path)
  24. self.browser.wait_until_not(".loading")
  25. self.browser.wait_until('[data-test-id="user-feedback-list"]')
  26. self.browser.snapshot("project user feedback")
  27. def test_empty(self):
  28. self.browser.get(self.path)
  29. self.browser.wait_until_not(".loading")
  30. self.browser.wait_until('[data-test-id="user-feedback"]')
  31. self.browser.snapshot("project user feedback - empty")