chore: inspector snapshot nits (#5676)

This commit is contained in:
Pavel Feldman 2021-03-03 22:25:34 -08:00 committed by GitHub
parent a9238ce2e1
commit 2af8b8ac74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -168,6 +168,7 @@ export class Recorder {
if (window.top === window) {
this._snapshotIframe = document.createElement('iframe');
this._snapshotIframe.src = this._snapshotBaseUrl;
this._snapshotIframe.style.background = '#ff000060';
this._snapshotIframe.style.position = 'fixed';
this._snapshotIframe.style.top = '0';
this._snapshotIframe.style.right = '0';

View file

@ -149,7 +149,7 @@ export class RecorderSupplement {
}
if (data.event === 'callLogHovered') {
this._hoveredSnapshot = undefined;
if (this._isPaused())
if (this._isPaused() && data.params.callLogId)
this._hoveredSnapshot = data.params;
this._refreshOverlay();
return;
@ -283,7 +283,7 @@ export class RecorderSupplement {
private _refreshOverlay() {
for (const page of this._context.pages())
page.mainFrame()._evaluateExpression('window._playwrightRefreshOverlay', false, undefined, 'main').catch(() => {});
page.mainFrame()._evaluateExpression('window._playwrightRefreshOverlay()', false, undefined, 'main').catch(() => {});
}
private async _onPage(page: Page) {