File tree Expand file tree Collapse file tree 5 files changed +11
-14
lines changed
packages/playwright-core/src/web Expand file tree Collapse file tree 5 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ const TestResultView: React.FC<{
188
188
189
189
{ ! ! traces . length && < Chip header = 'Traces' >
190
190
{ traces . map ( ( a , i ) => < div key = { `trace-${ i } ` } >
191
- < a href = { `trace/index.html?trace=${ window . location . origin } /` + a . path } >
191
+ < a href = { `trace/index.html?trace=${ new URL ( a . path ! , window . location . href ) } ` } >
192
192
< img src = 'trace.png' style = { { width : 192 , height : 117 , marginLeft : 20 } } />
193
193
</ a >
194
194
</ div > ) }
Original file line number Diff line number Diff line change 19
19
< head >
20
20
< meta charset ="UTF-8 ">
21
21
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
22
- < link rel ="icon " type ="image/png " sizes ="32x32 " href ="/trace/ icon-32x32.png ">
23
- < link rel ="icon " type ="image/png " sizes ="16x16 " href ="/trace/ icon-16x16.png ">
24
- < link rel ="manifest " href ="/trace/ manifest.webmanifest ">
22
+ < link rel ="icon " type ="image/png " sizes ="32x32 " href ="icon-32x32.png ">
23
+ < link rel ="icon " type ="image/png " sizes ="16x16 " href ="icon-16x16.png ">
24
+ < link rel ="manifest " href ="manifest.webmanifest ">
25
25
< title > Playwright Trace Viewer</ title >
26
26
</ head >
27
27
< body >
Original file line number Diff line number Diff line change @@ -23,9 +23,7 @@ import '../common.css';
23
23
24
24
( async ( ) => {
25
25
applyTheme ( ) ;
26
- navigator . serviceWorker . register ( '/trace/sw.bundle.js' , {
27
- scope : '/trace/'
28
- } ) ;
26
+ navigator . serviceWorker . register ( 'sw.bundle.js' ) ;
29
27
if ( ! navigator . serviceWorker . controller ) {
30
28
await new Promise < void > ( f => {
31
29
navigator . serviceWorker . oncontrollerchange = ( ) => f ( ) ;
Original file line number Diff line number Diff line change 2
2
"theme_color" : " #000" ,
3
3
"background_color" : " #fff" ,
4
4
"display" : " browser" ,
5
- "scope" : " /trace" ,
6
- "start_url" : " /trace/index.html" ,
5
+ "start_url" : " index.html" ,
7
6
"name" : " Playwright Trace Viewer" ,
8
7
"short_name" : " Trace Viewer" ,
9
8
"icons" : [
10
9
{
11
- "src" : " /trace/ icon-192x192.png" ,
10
+ "src" : " icon-192x192.png" ,
12
11
"sizes" : " 192x192" ,
13
12
"type" : " image/png"
14
13
},
15
14
{
16
- "src" : " /trace/ icon-256x256.png" ,
15
+ "src" : " icon-256x256.png" ,
17
16
"sizes" : " 256x256" ,
18
17
"type" : " image/png"
19
18
},
20
19
{
21
- "src" : " /trace/ icon-384x384.png" ,
20
+ "src" : " icon-384x384.png" ,
22
21
"sizes" : " 384x384" ,
23
22
"type" : " image/png"
24
23
},
25
24
{
26
- "src" : " /trace/ icon-512x512.png" ,
25
+ "src" : " icon-512x512.png" ,
27
26
"sizes" : " 512x512" ,
28
27
"type" : " image/png"
29
28
}
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export const Workbench: React.FunctionComponent<{
40
40
React . useEffect ( ( ) => {
41
41
( async ( ) => {
42
42
if ( traceURL ) {
43
- const contextEntry = ( await fetch ( `/trace/ context?trace=${ traceURL } ` ) . then ( response => response . json ( ) ) ) as ContextEntry ;
43
+ const contextEntry = ( await fetch ( `context?trace=${ traceURL } ` ) . then ( response => response . json ( ) ) ) as ContextEntry ;
44
44
modelUtil . indexModel ( contextEntry ) ;
45
45
setContextEntry ( contextEntry ) ;
46
46
} else {
You can’t perform that action at this time.
0 commit comments