mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
test: move skipped tests to expectations (#11789)
This commit is contained in:
parent
b99d478cd4
commit
422b5a5b03
@ -689,18 +689,6 @@
|
|||||||
"parameters": ["firefox"],
|
"parameters": ["firefox"],
|
||||||
"expectations": ["SKIP"]
|
"expectations": ["SKIP"]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch should work with no default arguments",
|
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
|
||||||
"parameters": ["chrome"],
|
|
||||||
"expectations": ["SKIP"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch should work with no default arguments",
|
|
||||||
"platforms": ["linux"],
|
|
||||||
"parameters": ["webDriverBiDi"],
|
|
||||||
"expectations": ["FAIL"]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch should work with no default arguments",
|
"testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch should work with no default arguments",
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
@ -1111,6 +1099,18 @@
|
|||||||
"parameters": ["firefox"],
|
"parameters": ["firefox"],
|
||||||
"expectations": ["PASS"]
|
"expectations": ["PASS"]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"testIdPattern": "[screenshot.spec] Screenshots Cdp should work in \"fromSurface: false\" mode",
|
||||||
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
|
"parameters": ["headless"],
|
||||||
|
"expectations": ["SKIP"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"testIdPattern": "[screenshot.spec] Screenshots Cdp should work in \"fromSurface: false\" mode",
|
||||||
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
|
"parameters": ["new-headless"],
|
||||||
|
"expectations": ["SKIP"]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"testIdPattern": "[screenshot.spec] Screenshots Page.screenshot should get screenshot bigger than the viewport",
|
"testIdPattern": "[screenshot.spec] Screenshots Page.screenshot should get screenshot bigger than the viewport",
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
@ -2245,6 +2245,18 @@
|
|||||||
"parameters": ["cdp", "firefox"],
|
"parameters": ["cdp", "firefox"],
|
||||||
"expectations": ["FAIL", "PASS"]
|
"expectations": ["FAIL", "PASS"]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch should work with no default arguments",
|
||||||
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
|
"parameters": ["chrome", "headless"],
|
||||||
|
"expectations": ["SKIP"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch should work with no default arguments",
|
||||||
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
|
"parameters": ["chrome", "new-headless"],
|
||||||
|
"expectations": ["SKIP"]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch tmp profile should be cleaned up",
|
"testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch tmp profile should be cleaned up",
|
||||||
"platforms": ["darwin", "linux", "win32"],
|
"platforms": ["darwin", "linux", "win32"],
|
||||||
|
@ -16,7 +16,7 @@ import type {Page} from 'puppeteer-core/internal/api/Page.js';
|
|||||||
import {rmSync} from 'puppeteer-core/internal/node/util/fs.js';
|
import {rmSync} from 'puppeteer-core/internal/node/util/fs.js';
|
||||||
import sinon from 'sinon';
|
import sinon from 'sinon';
|
||||||
|
|
||||||
import {getTestState, isHeadless, launch} from './mocha-utils.js';
|
import {getTestState, launch} from './mocha-utils.js';
|
||||||
import {dumpFrames, waitEvent} from './utils.js';
|
import {dumpFrames, waitEvent} from './utils.js';
|
||||||
|
|
||||||
const TMP_FOLDER = path.join(os.tmpdir(), 'pptr_tmp_folder-');
|
const TMP_FOLDER = path.join(os.tmpdir(), 'pptr_tmp_folder-');
|
||||||
@ -408,9 +408,7 @@ describe('Launcher specs', function () {
|
|||||||
expect(puppeteer.product).toBe('firefox');
|
expect(puppeteer.product).toBe('firefox');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
(!isHeadless ? it : it.skip)(
|
it('should work with no default arguments', async () => {
|
||||||
'should work with no default arguments',
|
|
||||||
async () => {
|
|
||||||
const {context, close} = await launch({
|
const {context, close} = await launch({
|
||||||
ignoreDefaultArgs: true,
|
ignoreDefaultArgs: true,
|
||||||
});
|
});
|
||||||
@ -421,8 +419,7 @@ describe('Launcher specs', function () {
|
|||||||
} finally {
|
} finally {
|
||||||
await close();
|
await close();
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
);
|
|
||||||
it('should filter out ignored default arguments in Chrome', async () => {
|
it('should filter out ignored default arguments in Chrome', async () => {
|
||||||
const {defaultBrowserOptions, puppeteer} = await getTestState({
|
const {defaultBrowserOptions, puppeteer} = await getTestState({
|
||||||
skipLaunch: true,
|
skipLaunch: true,
|
||||||
@ -590,9 +587,7 @@ describe('Launcher specs', function () {
|
|||||||
});
|
});
|
||||||
expect(error.message).toContain('either pipe or debugging port');
|
expect(error.message).toContain('either pipe or debugging port');
|
||||||
});
|
});
|
||||||
(!isHeadless ? it : it.skip)(
|
it('should launch Chrome properly with --no-startup-window and waitForInitialPage=false', async () => {
|
||||||
'should launch Chrome properly with --no-startup-window and waitForInitialPage=false',
|
|
||||||
async () => {
|
|
||||||
const {defaultBrowserOptions} = await getTestState({
|
const {defaultBrowserOptions} = await getTestState({
|
||||||
skipLaunch: true,
|
skipLaunch: true,
|
||||||
});
|
});
|
||||||
@ -613,8 +608,7 @@ describe('Launcher specs', function () {
|
|||||||
} finally {
|
} finally {
|
||||||
await close();
|
await close();
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Puppeteer.launch', function () {
|
describe('Puppeteer.launch', function () {
|
||||||
|
@ -8,12 +8,7 @@ import assert from 'assert';
|
|||||||
|
|
||||||
import expect from 'expect';
|
import expect from 'expect';
|
||||||
|
|
||||||
import {
|
import {getTestState, launch, setupTestBrowserHooks} from './mocha-utils.js';
|
||||||
getTestState,
|
|
||||||
isHeadless,
|
|
||||||
launch,
|
|
||||||
setupTestBrowserHooks,
|
|
||||||
} from './mocha-utils.js';
|
|
||||||
|
|
||||||
describe('Screenshots', function () {
|
describe('Screenshots', function () {
|
||||||
setupTestBrowserHooks();
|
setupTestBrowserHooks();
|
||||||
@ -436,9 +431,7 @@ describe('Screenshots', function () {
|
|||||||
});
|
});
|
||||||
expect(screenshot).toBeGolden('white.jpg');
|
expect(screenshot).toBeGolden('white.jpg');
|
||||||
});
|
});
|
||||||
(!isHeadless ? it : it.skip)(
|
it('should work in "fromSurface: false" mode', async () => {
|
||||||
'should work in "fromSurface: false" mode',
|
|
||||||
async () => {
|
|
||||||
const {page, server} = await getTestState();
|
const {page, server} = await getTestState();
|
||||||
|
|
||||||
await page.setViewport({width: 500, height: 500});
|
await page.setViewport({width: 500, height: 500});
|
||||||
@ -446,8 +439,7 @@ describe('Screenshots', function () {
|
|||||||
const screenshot = await page.screenshot({
|
const screenshot = await page.screenshot({
|
||||||
fromSurface: false,
|
fromSurface: false,
|
||||||
});
|
});
|
||||||
expect(screenshot).toBeDefined(); // toBeGolden('screenshot-fromsurface-false.png');
|
expect(screenshot).toBeDefined();
|
||||||
}
|
});
|
||||||
);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user