File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,9 +122,6 @@ describe('extension', () => {
122122 assert . ok ( list . length === 1 , 'List should have only one extension' ) ;
123123 const reinstalled = list . find ( e => e . id === extensionId ) ;
124124 assert . ok ( reinstalled , 'Extension should be present after reload' ) ;
125- try {
126- await context . uninstallExtension ( EXTENSION_WITH_SW_PATH ) ;
127- } catch ( e ) { }
128125 } ) ;
129126 } ) ;
130127 it ( 'triggers an extension action' , async ( ) => {
@@ -150,9 +147,6 @@ describe('extension', () => {
150147 t => t . type ( ) === 'page' && t . url ( ) . includes ( extensionId ) ,
151148 ) ;
152149 assert . ok ( pageTargetAfter , 'Page should exist after action' ) ;
153- try {
154- await context . uninstallExtension ( EXTENSION_WITH_SW_PATH ) ;
155- } catch ( e ) { }
156150 } ,
157151 { } ,
158152 {
Original file line number Diff line number Diff line change @@ -197,7 +197,9 @@ describe('pages', () => {
197197 t . assert . snapshot ?.( text ) ;
198198 await context . uninstallExtension ( extensionId ) ;
199199 } ,
200- { } ,
200+ {
201+ userDataDir : '/tmp/chrome-test' ,
202+ } ,
201203 {
202204 categoryExtensions : true ,
203205 } as ParsedArguments ,
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ export async function withBrowser(
6262 debug ?: boolean ;
6363 autoOpenDevTools ?: boolean ;
6464 executablePath ?: string ;
65+ userDataDir ?: string ;
6566 } = { } ,
6667) {
6768 const launchOptions : LaunchOptions = {
@@ -74,6 +75,7 @@ export async function withBrowser(
7475 handleDevToolsAsPage : true ,
7576 args : [ '--screen-info={3840x2160}' ] ,
7677 enableExtensions : true ,
78+ userDataDir : options . userDataDir ,
7779 } ;
7880 const key = JSON . stringify ( launchOptions ) ;
7981
@@ -102,6 +104,7 @@ export async function withMcpContext(
102104 autoOpenDevTools ?: boolean ;
103105 performanceCrux ?: boolean ;
104106 executablePath ?: string ;
107+ userDataDir ?: string ;
105108 } = { } ,
106109 args : ParsedArguments = { } as ParsedArguments ,
107110) {
You can’t perform that action at this time.
0 commit comments