mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-13 17:14:02 +03:00
tests: move ws-specific browser tests to corrsponding browser suites (#289)
This commit is contained in:
parent
6d0dfd0abf
commit
adf54ee6b3
@ -49,11 +49,5 @@ module.exports.addTests = function({testRunner, expect, headless, playwright, FF
|
||||
const process = await browser.process();
|
||||
expect(process.pid).toBeGreaterThan(0);
|
||||
});
|
||||
it.skip(WEBKIT || FFOX)('should not return child_process for remote browser', async function({browser}) {
|
||||
const browserWSEndpoint = browser.chromium.wsEndpoint();
|
||||
const remoteBrowser = await playwright.connect({browserWSEndpoint});
|
||||
expect(remoteBrowser.process()).toBe(null);
|
||||
remoteBrowser.disconnect();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
17
test/chromium/browser.spec.js
Normal file
17
test/chromium/browser.spec.js
Normal file
@ -0,0 +1,17 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
module.exports.addTests = function({testRunner, expect, headless, playwright, FFOX, CHROME, WEBKIT}) {
|
||||
const {describe, xdescribe, fdescribe} = testRunner;
|
||||
const {it, fit, xit} = testRunner;
|
||||
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
|
||||
|
||||
describe('Browser.process', function() {
|
||||
it('should not return child_process for remote browser', async function({browser}) {
|
||||
const browserWSEndpoint = browser.chromium.wsEndpoint();
|
||||
const remoteBrowser = await playwright.connect({browserWSEndpoint});
|
||||
expect(remoteBrowser.process()).toBe(null);
|
||||
remoteBrowser.disconnect();
|
||||
});
|
||||
});
|
||||
};
|
17
test/firefox/browser.spec.js
Normal file
17
test/firefox/browser.spec.js
Normal file
@ -0,0 +1,17 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
module.exports.addTests = function({testRunner, expect, headless, playwright, FFOX, CHROME, WEBKIT}) {
|
||||
const {describe, xdescribe, fdescribe} = testRunner;
|
||||
const {it, fit, xit} = testRunner;
|
||||
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
|
||||
|
||||
describe('Browser.process', function() {
|
||||
it('should not return child_process for remote browser', async function({browser}) {
|
||||
const browserWSEndpoint = browser.firefox.wsEndpoint();
|
||||
const remoteBrowser = await playwright.connect({browserWSEndpoint});
|
||||
expect(remoteBrowser.process()).toBe(null);
|
||||
remoteBrowser.disconnect();
|
||||
});
|
||||
});
|
||||
};
|
@ -149,7 +149,6 @@ module.exports.addTests = ({testRunner, product, playwrightPath}) => {
|
||||
|
||||
// Page-level tests that are given a browser, a context and a page.
|
||||
// Each test is launched in a new browser context.
|
||||
require('./browser.spec.js').addTests(testOptions);
|
||||
require('./click.spec.js').addTests(testOptions);
|
||||
require('./cookies.spec.js').addTests(testOptions);
|
||||
require('./dialog.spec.js').addTests(testOptions);
|
||||
@ -186,8 +185,15 @@ module.exports.addTests = ({testRunner, product, playwrightPath}) => {
|
||||
});
|
||||
|
||||
// Browser-level tests that are given a browser.
|
||||
require('./browser.spec.js').addTests(testOptions);
|
||||
require('./browsercontext.spec.js').addTests(testOptions);
|
||||
require('./ignorehttpserrors.spec.js').addTests(testOptions);
|
||||
if (CHROME) {
|
||||
require('./chromium/browser.spec.js').addTests(testOptions);
|
||||
}
|
||||
if (FFOX) {
|
||||
require('./firefox/browser.spec.js').addTests(testOptions);
|
||||
}
|
||||
});
|
||||
|
||||
// Top-level tests that launch Browser themselves.
|
||||
|
Loading…
Reference in New Issue
Block a user