ci: enable more Firefox tests that are now passing and fix others (#12502)

This commit is contained in:
Henrik Skupin 2024-05-30 11:31:47 +02:00 committed by GitHub
parent 73529cc64e
commit bae3721e04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 17 additions and 34 deletions

View File

@ -120,7 +120,7 @@ export class FirefoxLauncher extends ProductLauncher {
if (profileArgIndex !== -1) {
userDataDir = firefoxArguments[profileArgIndex + 1];
if (!userDataDir || !fs.existsSync(userDataDir)) {
if (!userDataDir) {
throw new Error(`Firefox profile not found at '${userDataDir}'`);
}

View File

@ -460,13 +460,6 @@
"expectations": ["SKIP"],
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
},
{
"testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch userDataDir argument with non-existent dir",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox"],
"expectations": ["SKIP"],
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
},
{
"testIdPattern": "[mouse.spec] Mouse should not throw if buttons are pressed twice",
"platforms": ["darwin", "linux", "win32"],
@ -2503,14 +2496,7 @@
"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": "[network.spec] network Network Events Page.Events.RequestFailed",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["FAIL"],
"comment": "Test expects slightly different error message consider changing"
"comment": "Fetch.enable not supported with CDP"
},
{
"testIdPattern": "[network.spec] network Network Events Page.Events.RequestFinished",
@ -3299,7 +3285,7 @@
"platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["SKIP"],
"comment": "TODO: Test relies on chrome-only error code (Firefox currently outputs NS_ERROR_ABORT)"
"comment": "TODO: BiDi does not support custom errors - https://github.com/w3c/webdriver-bidi/issues/508"
},
{
"testIdPattern": "[requestinterception-experimental.spec] cooperative request interception Page.setRequestInterception should cache if cache enabled",
@ -3308,19 +3294,12 @@
"expectations": ["SKIP"],
"comment": "TODO: Needs support for enabling cache in BiDi without CDP https://github.com/w3c/webdriver-bidi/issues/582"
},
{
"testIdPattern": "[requestinterception-experimental.spec] cooperative request interception Page.setRequestInterception should cooperatively continue by priority",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["SKIP"],
"comment": "TODO: Needs full support for continueRequest in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1850680"
},
{
"testIdPattern": "[requestinterception-experimental.spec] cooperative request interception Page.setRequestInterception should cooperatively respond by priority",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["SKIP"],
"comment": "TODO: Needs full support for continueRequest in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1850680"
"comment": "TODO: Needs support for arguments in network.provideResponse in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1853882"
},
{
"testIdPattern": "[requestinterception-experimental.spec] cooperative request interception Page.setRequestInterception should intercept",
@ -3438,7 +3417,7 @@
"platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["SKIP"],
"comment": "TODO: Test relies on chrome-only error code (Firefox currently outputs NS_ERROR_ABORT)"
"comment": "TODO: BiDi does not support custom errors - https://github.com/w3c/webdriver-bidi/issues/508"
},
{
"testIdPattern": "[requestinterception.spec] request interception Page.setRequestInterception should cache if cache enabled",

View File

@ -976,19 +976,23 @@ describe('Launcher specs', function () {
try {
const events: string[] = [];
browser.on('targetcreated', () => {
events.push('CREATED');
browser.on('targetcreated', target => {
events.push('CREATED: ' + target.url());
});
browser.on('targetchanged', () => {
events.push('CHANGED');
browser.on('targetchanged', target => {
events.push('CHANGED: ' + target.url());
});
browser.on('targetdestroyed', () => {
events.push('DESTROYED');
browser.on('targetdestroyed', target => {
events.push('DESTROYED: ' + target.url());
});
const page = await browser.newPage();
await page.goto(server.EMPTY_PAGE);
await page.close();
expect(events).toEqual(['CREATED', 'CHANGED', 'DESTROYED']);
expect(events).toEqual([
'CREATED: about:blank',
`CHANGED: ${server.EMPTY_PAGE}`,
`DESTROYED: ${server.EMPTY_PAGE}`,
]);
} finally {
await close();
}

View File

@ -555,7 +555,7 @@ describe('network', function () {
if (isChrome) {
expect(failedRequest.failure()!.errorText).toBe('net::ERR_FAILED');
} else {
expect(failedRequest.failure()!.errorText).toBe('NS_ERROR_FAILURE');
expect(failedRequest.failure()!.errorText).toBe('NS_ERROR_ABORT');
}
});
it('Page.Events.RequestFinished', async () => {