test_sidebar.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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.click('[data-test-id="sidebar-collapse"]')
  21. self.browser.click('[data-test-id="sidebar-broadcasts"]')
  22. self.browser.wait_until_test_id("sidebar-broadcasts-panel")
  23. self.browser.click("footer")
  24. self.browser.wait_until_not('[data-test-id="sidebar-broadcasts-panel"]')
  25. def test_help_search(self):
  26. self.browser.get(self.path)
  27. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  28. self.browser.wait_until_test_id("help-sidebar")
  29. self.browser.click('[data-test-id="help-sidebar"]')
  30. self.browser.wait_until_test_id("search-docs-and-faqs")
  31. self.browser.click('[data-test-id="search-docs-and-faqs"]')
  32. self.browser.wait_until(
  33. 'input[placeholder="Search for documentation, FAQs, blog posts..."]'
  34. )