test_organization_user_feedback.py 1.3 KB

123456789101112131415161718192021222324252627282930313233
  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 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. def test_empty(self):
  23. self.browser.get(self.path)
  24. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  25. def test_no_access(self):
  26. self.browser.get(self.path)
  27. self.browser.wait_until_not('[data-test-id="loading-indicator"]')