test_project_user_feedback.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  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. self.create_userreport(
  19. date_added=timezone.now(),
  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. def test_empty(self):
  27. self.browser.get(self.path)
  28. self.browser.wait_until_not(".loading")
  29. self.browser.wait_until('[data-test-id="user-feedback"]')