test_sidebar.py 1.9 KB

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