New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(launch): introduce client, server & persistent launch modes (2) #840
Conversation
664f226
to
ec3c20d
Compare
src/server/chromium.ts
Outdated
@@ -100,10 +115,10 @@ export class Chromium implements BrowserType { | |||
} | |||
|
|||
const usePipe = chromeArguments.includes('--remote-debugging-pipe'); | |||
if (usePipe && isServer) | |||
throw new Error(`Argument "--remote-debugging-pipe" is not compatible with the launchBrowserApp.`); | |||
if (usePipe && launchType === 'server') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's completely ban both --remote-debugging-pipe and --remote-debugging-port.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -47,7 +47,7 @@ module.exports.describe = function({testRunner, expect, playwright, defaultBrows | |||
describe('ChromiumHeadful', function() { | |||
it('background_page target type should be available', async() => { | |||
const browserWithExtension = await playwright.launch(extensionOptions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do launchPersistent here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Later!
test/launcher.spec.js
Outdated
expect(fs.readdirSync(userDataDir).length).toBeGreaterThan(0); | ||
await browser.close(); | ||
await browserContext.close(); | ||
expect(fs.readdirSync(userDataDir).length).toBeGreaterThan(0); | ||
// This might throw. See https://github.com/GoogleChrome/puppeteer/issues/2778 | ||
await rmAsync(userDataDir).catch(e => {}); | ||
}); | ||
it('userDataDir argument', async({server}) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop this one, it's equivalent to the previous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
test/playwright.spec.js
Outdated
@@ -93,22 +93,22 @@ module.exports.describe = ({testRunner, product, playwrightPath}) => { | |||
describe('Browser', function() { | |||
beforeAll(async state => { | |||
state.browser = await playwright.launch(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you lose defaultBrowserOptions here?
ec3c20d
to
85b0404
Compare
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
No description provided.