build - address some issues

- run local and remote integration tests separately
- enable playwright on Linux with -no-sandbox trick
This commit is contained in:
Benjamin Pasero
2020-02-12 12:07:40 +01:00
parent 33d3f3ae4b
commit 4b359a57a5
7 changed files with 45 additions and 34 deletions

View File

@@ -29,7 +29,8 @@ const width = 1200;
const height = 800;
async function runTestsInBrowser(browserType: string, endpoint: url.UrlWithStringQuery, server: cp.ChildProcess): Promise<void> {
const browser = await playwright[browserType].launch({ headless: !Boolean(optimist.argv.debug) });
const args = process.platform === 'linux' && browserType === 'chromium' ? ['--no-sandbox'] : undefined; // disable sandbox to run chrome on certain Linux distros
const browser = await playwright[browserType].launch({ headless: !Boolean(optimist.argv.debug), dumpio: true, args });
const page = (await browser.defaultContext().pages())[0];
await page.setViewport({ width, height });