mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(trace-viewer): info message for actions without snapshots (#11765)
This commit is contained in:
parent
e0c4e66272
commit
c2f6462a6b
@ -88,3 +88,8 @@ iframe#snapshot {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-snapshot {
|
||||||
|
text-align: center;
|
||||||
|
padding: 50px;
|
||||||
|
}
|
||||||
|
@ -101,13 +101,14 @@ export const SnapshotTab: React.FunctionComponent<{
|
|||||||
</div>
|
</div>
|
||||||
<div className='snapshot-url' title={snapshotInfo.url}>{snapshotInfo.url}</div>
|
<div className='snapshot-url' title={snapshotInfo.url}>{snapshotInfo.url}</div>
|
||||||
<div ref={ref} className='snapshot-wrapper'>
|
<div ref={ref} className='snapshot-wrapper'>
|
||||||
<div className='snapshot-container' style={{
|
{ snapshots.length ? <div className='snapshot-container' style={{
|
||||||
width: snapshotSize.width + 'px',
|
width: snapshotSize.width + 'px',
|
||||||
height: snapshotSize.height + 'px',
|
height: snapshotSize.height + 'px',
|
||||||
transform: `translate(${-snapshotSize.width * (1 - scale) / 2 + (measure.width - scaledSize.width) / 2}px, ${-snapshotSize.height * (1 - scale) / 2 + (measure.height - scaledSize.height) / 2}px) scale(${scale})`,
|
transform: `translate(${-snapshotSize.width * (1 - scale) / 2 + (measure.width - scaledSize.width) / 2}px, ${-snapshotSize.height * (1 - scale) / 2 + (measure.height - scaledSize.height) / 2}px) scale(${scale})`,
|
||||||
}}>
|
}}>
|
||||||
<iframe ref={iframeRef} id='snapshot' name='snapshot'></iframe>
|
<iframe ref={iframeRef} id='snapshot' name='snapshot'></iframe>
|
||||||
</div>
|
</div> : <div className='no-snapshot'>Action does not have snapshots</div>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user