diff --git a/test/TestExpectations.json b/test/TestExpectations.json index 0295b89d5e3..67e0279f91a 100644 --- a/test/TestExpectations.json +++ b/test/TestExpectations.json @@ -2176,20 +2176,6 @@ "expectations": ["SKIP"], "comment": "For some reason it times out on MacOS. Perhaps it's a bug in chromium-bidi" }, - { - "testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch tmp profile should be cleaned up", - "platforms": ["darwin", "linux", "win32"], - "parameters": ["cdp", "firefox"], - "expectations": ["FAIL"], - "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" - }, - { - "testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch tmp profile should be cleaned up", - "platforms": ["darwin", "linux", "win32"], - "parameters": ["firefox", "webDriverBiDi"], - "expectations": ["SKIP"], - "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" - }, { "testIdPattern": "[locator.spec] Locator Locator.race races multiple locators", "platforms": ["darwin", "linux", "win32"], diff --git a/test/src/launcher.spec.ts b/test/src/launcher.spec.ts index dfbe16e0ee7..aeb97e9d5f6 100644 --- a/test/src/launcher.spec.ts +++ b/test/src/launcher.spec.ts @@ -214,7 +214,7 @@ describe('Launcher specs', function () { } catch {} }); it('tmp profile should be cleaned up', async () => { - const {puppeteer} = await getTestState({skipLaunch: true}); + const {puppeteer, isFirefox} = await getTestState({skipLaunch: true}); // Set a custom test tmp dir so that we can validate that // the profile dir is created and then cleaned up. @@ -231,9 +231,10 @@ describe('Launcher specs', function () { // One profile folder should have been created at this moment. const profiles = fs.readdirSync(testTmpDir); expect(profiles).toHaveLength(1); - expect(profiles[0]?.startsWith('puppeteer_dev_chrome_profile-')).toBe( - true - ); + const expectedProfile = isFirefox + ? 'puppeteer_dev_firefox_profile-' + : 'puppeteer_dev_chrome_profile-'; + expect(profiles[0]?.startsWith(expectedProfile)).toBe(true); // Open a page to make sure its functional. await context.newPage();