diff --git a/addons/xterm-addon-attach/src/AttachAddon.api.ts b/addons/xterm-addon-attach/src/AttachAddon.api.ts index 625e1b4d1..6816a5f11 100644 --- a/addons/xterm-addon-attach/src/AttachAddon.api.ts +++ b/addons/xterm-addon-attach/src/AttachAddon.api.ts @@ -17,9 +17,8 @@ const height = 600; describe('AttachAddon', () => { before(async function(): Promise { const browserType = getBrowserType(); - browser = await browserType.launch({ - headless: process.argv.indexOf('--headless') !== -1, - args: [`--window-size=${width},${height}`, `--no-sandbox`] + browser = await browserType.launch({ dumpio: true, + headless: process.argv.indexOf('--headless') !== -1 }); page = await (await browser.newContext()).newPage(); await page.setViewportSize({ width, height }); diff --git a/addons/xterm-addon-fit/src/FitAddon.api.ts b/addons/xterm-addon-fit/src/FitAddon.api.ts index 798b2fc54..5eae6b6dd 100644 --- a/addons/xterm-addon-fit/src/FitAddon.api.ts +++ b/addons/xterm-addon-fit/src/FitAddon.api.ts @@ -17,9 +17,8 @@ const height = 768; describe('FitAddon', () => { before(async function(): Promise { const browserType = getBrowserType(); - browser = await browserType.launch({ - headless: process.argv.indexOf('--headless') !== -1, - args: [`--window-size=${width},${height}`, `--no-sandbox`] + browser = await browserType.launch({ dumpio: true, + headless: process.argv.indexOf('--headless') !== -1 }); page = await (await browser.newContext()).newPage(); await page.setViewportSize({ width, height }); diff --git a/addons/xterm-addon-search/src/SearchAddon.api.ts b/addons/xterm-addon-search/src/SearchAddon.api.ts index 21238332c..125e3dcb2 100644 --- a/addons/xterm-addon-search/src/SearchAddon.api.ts +++ b/addons/xterm-addon-search/src/SearchAddon.api.ts @@ -19,9 +19,8 @@ const height = 600; describe('Search Tests', function(): void { before(async function(): Promise { const browserType = getBrowserType(); - browser = await browserType.launch({ - headless: process.argv.indexOf('--headless') !== -1, - args: [`--window-size=${width},${height}`, `--no-sandbox`] + browser = await browserType.launch({ dumpio: true, + headless: process.argv.indexOf('--headless') !== -1 }); page = await (await browser.newContext()).newPage(); await page.setViewportSize({ width, height }); diff --git a/addons/xterm-addon-serialize/src/SerializeAddon.api.ts b/addons/xterm-addon-serialize/src/SerializeAddon.api.ts index 824b4b89c..9e79de3f9 100644 --- a/addons/xterm-addon-serialize/src/SerializeAddon.api.ts +++ b/addons/xterm-addon-serialize/src/SerializeAddon.api.ts @@ -17,9 +17,8 @@ const height = 600; describe('SerializeAddon', () => { before(async function(): Promise { const browserType = getBrowserType(); - browser = await browserType.launch({ - headless: process.argv.indexOf('--headless') !== -1, - args: [`--window-size=${width},${height}`] + browser = await browserType.launch({ dumpio: true, + headless: process.argv.indexOf('--headless') !== -1 }); page = await (await browser.newContext()).newPage(); await page.setViewportSize({ width, height }); diff --git a/addons/xterm-addon-unicode11/src/Unicode11Addon.api.ts b/addons/xterm-addon-unicode11/src/Unicode11Addon.api.ts index 983e795f5..8d521b2ea 100644 --- a/addons/xterm-addon-unicode11/src/Unicode11Addon.api.ts +++ b/addons/xterm-addon-unicode11/src/Unicode11Addon.api.ts @@ -17,9 +17,8 @@ const height = 600; describe('Unicode11Addon', () => { before(async function(): Promise { const browserType = getBrowserType(); - browser = await browserType.launch({ - headless: process.argv.indexOf('--headless') !== -1, - args: [`--window-size=${width},${height}`, `--no-sandbox`] + browser = await browserType.launch({ dumpio: true, + headless: process.argv.indexOf('--headless') !== -1 }); page = await (await browser.newContext()).newPage(); await page.setViewportSize({ width, height }); diff --git a/addons/xterm-addon-web-links/src/WebLinksAddon.api.ts b/addons/xterm-addon-web-links/src/WebLinksAddon.api.ts index b2516cdf1..dc7317f02 100644 --- a/addons/xterm-addon-web-links/src/WebLinksAddon.api.ts +++ b/addons/xterm-addon-web-links/src/WebLinksAddon.api.ts @@ -17,9 +17,8 @@ const height = 600; describe('WebLinksAddon', () => { before(async function(): Promise { const browserType = getBrowserType(); - browser = await browserType.launch({ - headless: process.argv.indexOf('--headless') !== -1, - args: [`--window-size=${width},${height}`, `--no-sandbox`] + browser = await browserType.launch({ dumpio: true, + headless: process.argv.indexOf('--headless') !== -1 }); page = await (await browser.newContext()).newPage(); await page.setViewportSize({ width, height }); diff --git a/addons/xterm-addon-webgl/src/WebglRenderer.api.ts b/addons/xterm-addon-webgl/src/WebglRenderer.api.ts index cd90ddd92..591d7fff6 100644 --- a/addons/xterm-addon-webgl/src/WebglRenderer.api.ts +++ b/addons/xterm-addon-webgl/src/WebglRenderer.api.ts @@ -899,9 +899,8 @@ async function getCellColor(col: number, row: number): Promise { async function setupBrowser(options: ITerminalOptions = { rendererType: 'dom' }): Promise { const browserType = getBrowserType(); - browser = await browserType.launch({ - headless: process.argv.indexOf('--headless') !== -1, - args: [`--window-size=${width},${height}`, `--no-sandbox`] + browser = await browserType.launch({ dumpio: true, + headless: process.argv.indexOf('--headless') !== -1 }); page = await (await browser.newContext()).newPage(); await page.setViewportSize({ width, height }); diff --git a/azure-pipelines.yml b/azure-pipelines.yml index da42d796d..05c3b03d3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -82,8 +82,13 @@ jobs: vmImage: 'ubuntu-18.04' steps: - script: | + # source: https://github.com/microsoft/playwright/issues/1041 sudo apt update - sudo apt install libwoff1 libopus0 libwebp6 libwebpdemux2 libenchant1c2a libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 libegl1 libgles2 libevent-2.1-6 libnotify4 libxslt1.1 + sudo apt install libwoff1 libopus0 libwebp6 libwebpdemux2 libenchant1c2a libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 libegl1 libnotify4 libxslt1.1 libevent-2.1-6 libgles2 libgl1 libegl1 libvpx5 + # for chromium + sudo apt install libnss3 libxss1 libasound2 + # for firefox + sudo apt install libdbus-glib-1-2 libxt6 displayName: Install required packages - task: NodeTool@0 inputs: diff --git a/test/api/CharWidth.api.ts b/test/api/CharWidth.api.ts index b5cb58388..705dde7cb 100644 --- a/test/api/CharWidth.api.ts +++ b/test/api/CharWidth.api.ts @@ -16,9 +16,8 @@ const height = 600; describe('CharWidth Integration Tests', function(): void { before(async function(): Promise { const browserType = getBrowserType(); - browser = await browserType.launch({ - headless: process.argv.indexOf('--headless') !== -1, - args: [`--window-size=${width},${height}`, `--no-sandbox`] + browser = await browserType.launch({ dumpio: true, + headless: process.argv.indexOf('--headless') !== -1 }); page = await (await browser.newContext()).newPage(); await page.setViewportSize({ width, height }); diff --git a/test/api/InputHandler.api.ts b/test/api/InputHandler.api.ts index b1cdb82fb..01df89a91 100644 --- a/test/api/InputHandler.api.ts +++ b/test/api/InputHandler.api.ts @@ -21,9 +21,8 @@ describe('InputHandler Integration Tests', function(): void { before(async function(): Promise { const browserType = getBrowserType(); isChromium = browserType.name() === 'chromium'; - browser = await browserType.launch({ - headless: process.argv.indexOf('--headless') !== -1, - args: [`--window-size=${width},${height}`, `--no-sandbox`] + browser = await browserType.launch({ dumpio: true, + headless: process.argv.indexOf('--headless') !== -1 }); page = await (await browser.newContext()).newPage(); await page.setViewportSize({ width, height }); diff --git a/test/api/MouseTracking.api.ts b/test/api/MouseTracking.api.ts index 9c9a0ac5b..83e980210 100644 --- a/test/api/MouseTracking.api.ts +++ b/test/api/MouseTracking.api.ts @@ -213,9 +213,8 @@ describe('Mouse Tracking Tests', async () => { const itMouse = isChromium ? it : it.skip; before(async function(): Promise { - browser = await browserType.launch({ - headless: process.argv.indexOf('--headless') !== -1, - args: [`--window-size=${width},${height}`, `--no-sandbox`] + browser = await browserType.launch({ dumpio: true, + headless: process.argv.indexOf('--headless') !== -1 }); page = await (await browser.newContext()).newPage(); await page.setViewportSize({ width, height }); diff --git a/test/api/Parser.api.ts b/test/api/Parser.api.ts index 29dcbb0b5..a40fd5042 100644 --- a/test/api/Parser.api.ts +++ b/test/api/Parser.api.ts @@ -17,9 +17,8 @@ const height = 600; describe('Parser Integration Tests', function(): void { before(async function(): Promise { const browserType = getBrowserType(); - browser = await browserType.launch({ - headless: process.argv.indexOf('--headless') !== -1, - args: [`--window-size=${width},${height}`, `--no-sandbox`] + browser = await browserType.launch({ dumpio: true, + headless: process.argv.indexOf('--headless') !== -1 }); page = await (await browser.newContext()).newPage(); await page.setViewportSize({ width, height }); diff --git a/test/api/Terminal.api.ts b/test/api/Terminal.api.ts index fce175118..2c26bb085 100644 --- a/test/api/Terminal.api.ts +++ b/test/api/Terminal.api.ts @@ -17,9 +17,8 @@ const height = 600; describe('API Integration Tests', function(): void { before(async () => { const browserType = getBrowserType(); - browser = await browserType.launch({ - headless: process.argv.indexOf('--headless') !== -1, - args: [`--window-size=${width},${height}`, `--no-sandbox`] + browser = await browserType.launch({ dumpio: true, + headless: process.argv.indexOf('--headless') !== -1 }); page = await (await browser.newContext()).newPage(); await page.setViewportSize({ width, height });