test_sidebar.py 1.7 KB

123456789101112131415161718192021222324252627282930313233343536
  1. from sentry.testutils import AcceptanceTestCase
  2. class SidebarTest(AcceptanceTestCase):
  3. def setUp(self):
  4. super().setUp()
  5. self.user = self.create_user("foo@example.com")
  6. self.login_as(self.user)
  7. self.create_organization(name="Foo Foo Foo Foo Foo Foo Foo", owner=self.user)
  8. self.create_organization(name="Bar Bar Bar Bar Bar Bar Bar", owner=self.user)
  9. self.path = "/"
  10. def test_new_sidebar(self):
  11. self.browser.get(self.path)
  12. self.browser.wait_until_not(".loading")
  13. self.browser.click('[data-test-id="sidebar-dropdown"]')
  14. self.browser.move_to('[data-test-id="sidebar-switch-org"]')
  15. self.browser.wait_until_test_id("sidebar-switch-org-menu")
  16. self.browser.snapshot("sidebar - switch org expanded")
  17. self.browser.click('[data-test-id="sidebar-collapse"]')
  18. self.browser.snapshot("sidebar - collapsed")
  19. self.browser.click('[data-test-id="sidebar-broadcasts"]')
  20. self.browser.wait_until_test_id("sidebar-broadcasts-panel")
  21. self.browser.snapshot("sidebar - broadcasts panel")
  22. self.browser.click("footer")
  23. self.browser.wait_until_not('[data-test-id="sidebar-broadcasts-panel"]')
  24. def test_help_search(self):
  25. self.browser.get(self.path)
  26. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  27. self.browser.wait_until_test_id("help-sidebar")
  28. self.browser.click('[data-test-id="help-sidebar"]')
  29. self.browser.wait_until_test_id("search-docs-and-faqs")
  30. self.browser.click('[data-test-id="search-docs-and-faqs"]')
  31. self.browser.wait_until('input[label="Search for documentation, FAQs, blog posts..."]')