Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore(tracing): render error snapshot as Action (#6241)

Pavel Feldmanf9af4c37554c
diff --git a/src/web/traceViewer/ui/actionList.css b/src/web/traceViewer/ui/actionList.css
index 6947fe7ccf..d6c9f3c7c3 100644
--- a/src/web/traceViewer/ui/actionList.css
+++ b/src/web/traceViewer/ui/actionList.css
@@ -27,7 +27,6 @@
color: #555;
overflow: auto;
outline: none;
- padding: 5px 0 0 5px;
}
.action-entry {
@@ -37,7 +36,7 @@
align-items: center;
white-space: nowrap;
line-height: 28px;
- padding-left: 3px;
+ padding-left: 5px;
}
.action-entry.highlighted,
@@ -68,7 +67,6 @@
.action-error {
color: red;
- top: 2px;
position: relative;
margin-right: 2px;
}
diff --git a/src/web/traceViewer/ui/snapshotTab.tsx b/src/web/traceViewer/ui/snapshotTab.tsx
index 5584829777..0fd524c038 100644
--- a/src/web/traceViewer/ui/snapshotTab.tsx
+++ b/src/web/traceViewer/ui/snapshotTab.tsx
@@ -32,7 +32,7 @@ export const SnapshotTab: React.FunctionComponent<{
const snapshotMap = new Map<string, { title: string, snapshotName: string }>();
for (const snapshot of actionEntry?.snapshots || [])
snapshotMap.set(snapshot.title, snapshot);
- const actionSnapshot = snapshotMap.get('action') || snapshotMap.get('before');
+ const actionSnapshot = snapshotMap.get('action') || snapshotMap.get('after');
const snapshots = [actionSnapshot ? { ...actionSnapshot, title: 'action' } : undefined, snapshotMap.get('before'), snapshotMap.get('after')].filter(Boolean) as { title: string, snapshotName: string }[];
if (snapshotIndex >= snapshots.length)