mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test: group browserType.launchServer tests (#2944)
This commit is contained in:
parent
16e3776a9c
commit
fe95ee00c3
@ -81,21 +81,6 @@ describe('Playwright', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('browserType.launchServer', function() {
|
||||
it('should return child_process instance', async ({browserType, defaultBrowserOptions}) => {
|
||||
const browserServer = await browserType.launchServer(defaultBrowserOptions);
|
||||
expect(browserServer.process().pid).toBeGreaterThan(0);
|
||||
await browserServer.close();
|
||||
});
|
||||
it('should fire close event', async ({browserType, defaultBrowserOptions}) => {
|
||||
const browserServer = await browserType.launchServer(defaultBrowserOptions);
|
||||
await Promise.all([
|
||||
new Promise(f => browserServer.on('close', f)),
|
||||
browserServer.close(),
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('browserType.executablePath', function() {
|
||||
it('should work', async({browserType}) => {
|
||||
const executablePath = browserType.executablePath();
|
||||
@ -281,6 +266,18 @@ describe('browserType.launchServer', function() {
|
||||
]);
|
||||
expect(order).toEqual(['closed', 'killed']);
|
||||
});
|
||||
it('should return child_process instance', async ({browserType, defaultBrowserOptions}) => {
|
||||
const browserServer = await browserType.launchServer(defaultBrowserOptions);
|
||||
expect(browserServer.process().pid).toBeGreaterThan(0);
|
||||
await browserServer.close();
|
||||
});
|
||||
it('should fire close event', async ({browserType, defaultBrowserOptions}) => {
|
||||
const browserServer = await browserType.launchServer(defaultBrowserOptions);
|
||||
await Promise.all([
|
||||
new Promise(f => browserServer.on('close', f)),
|
||||
browserServer.close(),
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('browserType.connect', function() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user