test_organization_user_feedback.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. from django.utils import timezone
  2. from sentry.testutils.cases import AcceptanceTestCase
  3. from sentry.testutils.silo import region_silo_test
  4. @region_silo_test
  5. class OrganizationUserFeedbackTest(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/"
  16. self.project.update(first_event=timezone.now())
  17. def test(self):
  18. self.create_userreport(date_added=timezone.now(), group=self.group, project=self.project)
  19. self.browser.get(self.path)
  20. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  21. self.browser.wait_until('[data-test-id="user-feedback-list"]')
  22. self.browser.snapshot("organization user feedback")
  23. def test_empty(self):
  24. self.browser.get(self.path)
  25. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  26. self.browser.snapshot("organization user feedback - empty")
  27. def test_no_access(self):
  28. self.browser.get(self.path)
  29. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  30. self.browser.snapshot("organization user feedback - no access")