test_organization_user_feedback.py 1.4 KB

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