mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
test: update the test for Firefox (#12535)
This commit is contained in:
parent
99a7f28746
commit
88df407517
@ -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"],
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user