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"],
|
"expectations": ["SKIP"],
|
||||||
"comment": "For some reason it times out on MacOS. Perhaps it's a bug in chromium-bidi"
|
"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",
|
"testIdPattern": "[locator.spec] Locator Locator.race races multiple locators",
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
|
@ -214,7 +214,7 @@ describe('Launcher specs', function () {
|
|||||||
} catch {}
|
} catch {}
|
||||||
});
|
});
|
||||||
it('tmp profile should be cleaned up', async () => {
|
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
|
// Set a custom test tmp dir so that we can validate that
|
||||||
// the profile dir is created and then cleaned up.
|
// 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.
|
// One profile folder should have been created at this moment.
|
||||||
const profiles = fs.readdirSync(testTmpDir);
|
const profiles = fs.readdirSync(testTmpDir);
|
||||||
expect(profiles).toHaveLength(1);
|
expect(profiles).toHaveLength(1);
|
||||||
expect(profiles[0]?.startsWith('puppeteer_dev_chrome_profile-')).toBe(
|
const expectedProfile = isFirefox
|
||||||
true
|
? 'puppeteer_dev_firefox_profile-'
|
||||||
);
|
: 'puppeteer_dev_chrome_profile-';
|
||||||
|
expect(profiles[0]?.startsWith(expectedProfile)).toBe(true);
|
||||||
|
|
||||||
// Open a page to make sure its functional.
|
// Open a page to make sure its functional.
|
||||||
await context.newPage();
|
await context.newPage();
|
||||||
|
Loading…
Reference in New Issue
Block a user