cherry-pick(#23583): chore: do not show select item when Show trace

This commit is contained in:
Pavel Feldman 2023-06-07 16:11:57 -07:00 committed by Andrey Lushnikov
parent e0c4576e29
commit f411348fa2

View file

@ -87,7 +87,7 @@ export const WorkbenchLoader: React.FunctionComponent<{
connect({ connect({
onEvent(method: string, params?: any) { onEvent(method: string, params?: any) {
if (method === 'loadTrace') { if (method === 'loadTrace') {
setTraceURLs([params!.url]); setTraceURLs(params!.url ? [params!.url] : []);
setDragOver(false); setDragOver(false);
setProcessingErrorMessage(null); setProcessingErrorMessage(null);
} }
@ -171,7 +171,7 @@ export const WorkbenchLoader: React.FunctionComponent<{
<div style={{ maxWidth: 400 }}>Playwright Trace Viewer is a Progressive Web App, it does not send your trace anywhere, <div style={{ maxWidth: 400 }}>Playwright Trace Viewer is a Progressive Web App, it does not send your trace anywhere,
it opens it locally.</div> it opens it locally.</div>
</div>} </div>}
{isServer && (!traceURLs.length || processingErrorMessage) && <div className='drop-target'> {isServer && !traceURLs.length && <div className='drop-target'>
<div className='title'>Select test to see the trace</div> <div className='title'>Select test to see the trace</div>
</div>} </div>}
{dragOver && <div className='drop-target' {dragOver && <div className='drop-target'