test_sidebar.py 1.8 KB

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