ftest, etc

This commit is contained in:
Joel Einbinder 2020-01-28 21:11:35 +00:00
parent 6f7229bc6a
commit 69cee8794b
12 changed files with 24 additions and 24 deletions

View file

@ -29,7 +29,7 @@ task:
dockerfile: .ci/node8/Dockerfile.linux
xvfb_start_background_script: Xvfb :99 -ac -screen 0 1024x768x24
install_script: npm install --unsafe-perm
test_script: npm run funit
test_script: npm run ftest
task:
osx_instance:

4
.gitattributes vendored
View file

@ -1,3 +1,3 @@
# .txt files must be lf for golden file tests to work
# text files must be lf for golden file tests to work
*.txt eol=lf
*.json eol=lf

View file

@ -31,6 +31,6 @@ jobs:
run: |
npm install
npm run build
xvfb-run --auto-servernum npm run unit
xvfb-run --auto-servernum npm run ctest
env:
CI: true

View file

@ -27,6 +27,6 @@ jobs:
- name: npm install, and test
run: |
npm install
npm run unit
npm run ctest
env:
CI: true

View file

@ -30,6 +30,6 @@ jobs:
- name: npm install, build, and test
run: |
npm install
xvfb-run --auto-servernum npm run funit
xvfb-run --auto-servernum npm run ftest
env:
CI: true

View file

@ -27,6 +27,6 @@ jobs:
- name: npm install, and test
run: |
npm install
npm run funit
npm run ftest
env:
CI: true

View file

@ -35,6 +35,6 @@ jobs:
# The following logs LDD status of all webkit-wpe shared objects and executables.
# pushd .local-webkit/$(ls .local-webkit)/minibrowser-wpe; ls -1 | grep -v pw_run.sh | LD_LIBRARY_PATH=$PWD xargs ldd; popd
xvfb-run --auto-servernum npm run wunit
xvfb-run --auto-servernum npm run wtest
env:
CI: true

View file

@ -27,6 +27,6 @@ jobs:
- name: npm install, and test
run: |
npm install
npm run wunit
npm run wtest
env:
CI: true

View file

@ -25,11 +25,10 @@ cache:
directories:
- node_modules
script:
- "npm run build"
- "npm run lint"
- "xvfb-run --auto-servernum npm run unit"
- "xvfb-run --auto-servernum npm run funit"
- "xvfb-run --auto-servernum npm run wunit"
- "xvfb-run --auto-servernum npm run ctest"
- "xvfb-run --auto-servernum npm run ftest"
- "xvfb-run --auto-servernum npm run wtest"
jobs:
include:
- node_js: "12"

View file

@ -13,18 +13,18 @@
"webkit_revision": "1113"
},
"scripts": {
"unit": "node test/test.js",
"funit": "cross-env BROWSER=firefox node test/test.js",
"wunit": "cross-env BROWSER=webkit node test/test.js",
"debug-unit": "node --inspect-brk test/test.js",
"ctest": "cross-env BROWSER=chromium node test/test.js",
"ftest": "cross-env BROWSER=firefox node test/test.js",
"wtest": "cross-env BROWSER=webkit node test/test.js",
"debug-test": "node --inspect-brk test/test.js",
"test-doclint": "node utils/doclint/check_public_api/test/test.js && node utils/doclint/preprocessor/test.js",
"test": "npm run lint --silent && npm run coverage && npm run test-doclint && node utils/testrunner/test/test.js",
"prepare": "node prepare.js",
"lint": "([ \"$CI\" = true ] && eslint --quiet -f codeframe --ext js,ts ./src || eslint --ext js,ts ./src) && npm run tsc && npm run doc",
"doc": "node utils/doclint/cli.js",
"coverage": "cross-env COVERAGE=true npm run unit",
"fcoverage": "cross-env COVERAGE=true BROWSER=firefox npm run unit",
"wcoverage": "cross-env COVERAGE=true BROWSER=webkit npm run unit",
"ccoverage": "cross-env COVERAGE=true npm run ctest",
"fcoverage": "cross-env COVERAGE=true BROWSER=firefox node test/test.js",
"wcoverage": "cross-env COVERAGE=true BROWSER=webkit node test/test.js",
"tsc": "tsc -p .",
"clean": "rimraf lib",
"build": "node utils/runWebpack.js --mode='development' && tsc -p .",

View file

@ -67,7 +67,8 @@ module.exports.describe = function({testRunner, expect, playwright, defaultBrows
expect(pages).toEqual(['about:blank']);
await browser.close();
});
it('headless should be able to read cookies written by headful', async({server}) => {
// see https://github.com/microsoft/playwright/issues/717
it.skip(WIN && CHROMIUM)('headless should be able to read cookies written by headful', async({server}) => {
const userDataDir = await mkdtempAsync(TMP_FOLDER);
// Write a cookie in headful chrome
const headfulBrowser = await playwright.launch(Object.assign({userDataDir}, headfulOptions));

View file

@ -26,7 +26,7 @@ const mkdtempAsync = util.promisify(fs.mkdtemp);
const TMP_FOLDER = path.join(os.tmpdir(), 'pw_tmp_folder-');
module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, playwrightPath, product, CHROMIUM, FFOX, WEBKIT}) {
module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, playwrightPath, product, CHROMIUM, FFOX, WEBKIT, WIN}) {
const {describe, xdescribe, fdescribe} = testRunner;
const {it, fit, xit, dit} = testRunner;
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
@ -342,8 +342,8 @@ module.exports.describe = function({testRunner, expect, defaultBrowserOptions, p
// This might throw. See https://github.com/GoogleChrome/puppeteer/issues/2778
await rmAsync(userDataDir).catch(e => {});
});
// This mysteriously fails on Windows on AppVeyor. See https://github.com/GoogleChrome/puppeteer/issues/4111
it.skip(FFOX)('userDataDir option should restore cookies', async({server}) => {
// See https://github.com/microsoft/playwright/issues/717
it.skip(FFOX || (WIN && CHROMIUM))('userDataDir option should restore cookies', async({server}) => {
const userDataDir = await mkdtempAsync(TMP_FOLDER);
const options = Object.assign({userDataDir}, defaultBrowserOptions);
const browser = await playwright.launch(options);