Browse Source

test(replays): test render of each individual focus area (#54313)

Is dependent on this PR: https://github.com/getsentry/sentry/pull/54264

Closes https://github.com/getsentry/sentry/issues/38850
Michelle Zhang 1 year ago
parent
commit
4952f43f20
1 changed files with 55 additions and 1 deletions
  1. 55 1
      tests/acceptance/test_replay_detail.py

+ 55 - 1
tests/acceptance/test_replay_detail.py

@@ -12,7 +12,7 @@ from sentry.replays.testutils import (
 )
 from sentry.testutils.cases import ReplaysAcceptanceTestCase
 
-FEATURE_NAME = ["organizations:session-replay"]
+FEATURE_NAME = ["organizations:session-replay", "organizations:performance-view"]
 
 
 class ReplayDetailTest(ReplaysAcceptanceTestCase):
@@ -83,3 +83,57 @@ class ReplayDetailTest(ReplaysAcceptanceTestCase):
             self.browser.wait_until_not('[data-test-id="loading-indicator"]')
             self.browser.wait_until_not('[data-test-id="loading-placeholder"]')
             self.browser.snapshot("replay detail")
+
+    def test_dom_events_tab(self):
+        with self.feature(FEATURE_NAME):
+            self.browser.get(self.path)
+            self.browser.wait_until_not('[data-test-id="loading-indicator"]')
+            self.browser.wait_until_not('[data-test-id="loading-placeholder"]')
+            self.browser.click('[data-test-id="replay-details-dom-btn"]')
+            self.browser.wait_until_test_id("replay-details-dom-events-tab")
+            self.browser.snapshot("replay details - dom events tab")
+
+    def test_console_tab(self):
+        with self.feature(FEATURE_NAME):
+            self.browser.get(self.path)
+            self.browser.wait_until_not('[data-test-id="loading-indicator"]')
+            self.browser.wait_until_not('[data-test-id="loading-placeholder"]')
+            self.browser.click('[data-test-id="replay-details-console-btn"]')
+            self.browser.wait_until_test_id("replay-details-console-tab")
+            self.browser.snapshot("replay details - console tab")
+
+    def test_network_tab(self):
+        with self.feature(FEATURE_NAME):
+            self.browser.get(self.path)
+            self.browser.wait_until_not('[data-test-id="loading-indicator"]')
+            self.browser.wait_until_not('[data-test-id="loading-placeholder"]')
+            self.browser.click('[data-test-id="replay-details-network-btn"]')
+            self.browser.wait_until_test_id("replay-details-network-tab")
+            self.browser.snapshot("replay details - network tab")
+
+    def test_memory_tab(self):
+        with self.feature(FEATURE_NAME):
+            self.browser.get(self.path)
+            self.browser.wait_until_not('[data-test-id="loading-indicator"]')
+            self.browser.wait_until_not('[data-test-id="loading-placeholder"]')
+            self.browser.click('[data-test-id="replay-details-memory-btn"]')
+            self.browser.wait_until_test_id("replay-details-memory-tab")
+            self.browser.snapshot("replay details - memory tab")
+
+    def test_errors_tab(self):
+        with self.feature(FEATURE_NAME):
+            self.browser.get(self.path)
+            self.browser.wait_until_not('[data-test-id="loading-indicator"]')
+            self.browser.wait_until_not('[data-test-id="loading-placeholder"]')
+            self.browser.click('[data-test-id="replay-details-errors-btn"]')
+            self.browser.wait_until_test_id("replay-details-errors-tab")
+            self.browser.snapshot("replay details - errors tab")
+
+    def test_trace_tab(self):
+        with self.feature(FEATURE_NAME):
+            self.browser.get(self.path)
+            self.browser.wait_until_not('[data-test-id="loading-indicator"]')
+            self.browser.wait_until_not('[data-test-id="loading-placeholder"]')
+            self.browser.click('[data-test-id="replay-details-trace-btn"]')
+            self.browser.wait_until_test_id("replay-details-trace-tab")
+            self.browser.snapshot("replay details - trace tab")