Browse Source

tests(acceptance): Wait for sidebar ready before snapshots (#13721)

This waits until the sidebar placeholders are ready before snapshotting
Billy Vong 5 years ago
parent
commit
c2296ff3a1

+ 1 - 1
src/sentry/static/sentry/app/components/placeholder.jsx

@@ -6,7 +6,7 @@ import space from 'app/styles/space';
 
 
 const Placeholder = styled(props => {
 const Placeholder = styled(props => {
   const {className} = props;
   const {className} = props;
-  return <div className={className} />;
+  return <div data-test-id="loading-placeholder" className={className} />;
 })`
 })`
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;

+ 1 - 1
tests/acceptance/test_incidents.py

@@ -48,7 +48,7 @@ class OrganizationIncidentsListTest(AcceptanceTestCase, SnubaTestCase):
             self.browser.wait_until_not('.loading-indicator')
             self.browser.wait_until_not('.loading-indicator')
             self.browser.wait_until_test_id('incident-title')
             self.browser.wait_until_test_id('incident-title')
 
 
-            # TODO: wait until sidebar loads
+            self.browser.wait_until_not('[data-test-id="loading-placeholder"]')
             self.browser.snapshot('incidents - details')
             self.browser.snapshot('incidents - details')
 
 
     @patch('django.utils.timezone.now')
     @patch('django.utils.timezone.now')