…remote actions
This commit is contained in:
parent
3d2ffd0fe9
commit
937424fb59
|
|
@ -310,7 +310,7 @@ function monotonicTimeDeltaBetweenLibraryAndRunner(nonPrimaryContexts: ContextEn
|
||||||
for (const action of context.actions) {
|
for (const action of context.actions) {
|
||||||
if (!action.startTime)
|
if (!action.startTime)
|
||||||
continue;
|
continue;
|
||||||
const key = matchByStepId ? action.stepId! : `${action.apiName}@${(action as any).wallTime}`;
|
const key = matchByStepId ? action.callId! : `${action.apiName}@${(action as any).wallTime}`;
|
||||||
const libraryAction = libraryActions.get(key);
|
const libraryAction = libraryActions.get(key);
|
||||||
if (libraryAction)
|
if (libraryAction)
|
||||||
return action.startTime - libraryAction.startTime;
|
return action.startTime - libraryAction.startTime;
|
||||||
|
|
|
||||||
BIN
tests/assets/trace-remote-time-diff.zip
Normal file
BIN
tests/assets/trace-remote-time-diff.zip
Normal file
Binary file not shown.
|
|
@ -127,6 +127,12 @@ test('should complain about newer version of trace in old viewer', async ({ show
|
||||||
await expect(traceViewer.page.getByText('The trace was created by a newer version of Playwright and is not supported by this version of the viewer.')).toBeVisible();
|
await expect(traceViewer.page.getByText('The trace was created by a newer version of Playwright and is not supported by this version of the viewer.')).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('should properly synchronize local and remote time', async ({ showTraceViewer, asset }, testInfo) => {
|
||||||
|
const traceViewer = await showTraceViewer([asset('trace-remote-time-diff.zip')]);
|
||||||
|
// The total duration should be sub 10s, rather than 16h.
|
||||||
|
await expect(traceViewer.page.locator('.timeline-time').last()).toHaveText('8.5s');
|
||||||
|
});
|
||||||
|
|
||||||
test('should contain action info', async ({ showTraceViewer }) => {
|
test('should contain action info', async ({ showTraceViewer }) => {
|
||||||
const traceViewer = await showTraceViewer([traceFile]);
|
const traceViewer = await showTraceViewer([traceFile]);
|
||||||
await traceViewer.selectAction('locator.click');
|
await traceViewer.selectAction('locator.click');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue