From 26fa6c97bfd61ac1dd1b3531bb058c5b216ff42d Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 15 Feb 2020 07:38:40 -0800 Subject: [PATCH 1/6] Install deps for webkit and firefox on Linux Fixes #2721 --- azure-pipelines.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7f8d36fb7e..256d46e5f3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -100,8 +100,20 @@ jobs: yarn start & sleep 10 displayName: 'Start test server' + - name: install required packages + run: | + 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 - script: yarn test-api-chromium --headless --forbid-only displayName: 'Integration tests (Chromium)' + - run: xvfb-run --auto-servernum -- bash -c "yarn test-api-firefox --headless --forbid-only" + displayName: 'Integration tests (Firefox)' + env: + DEBUG: "*" + - run: xvfb-run --auto-servernum -- bash -c "yarn test-api-webkit --headless --forbid-only" + displayName: 'Integration tests (Webkit)' + env: + DEBUG: "*" - job: macOS_IntegrationTests pool: From 83abd7ef59a761f9e349e4e6ccf43a1cd25521dd Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 15 Feb 2020 12:07:19 -0800 Subject: [PATCH 2/6] Change pipeline property names --- azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 256d46e5f3..068c6d1bbc 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -100,17 +100,17 @@ jobs: yarn start & sleep 10 displayName: 'Start test server' - - name: install required packages - run: | + - displayName: install required packages + script: | 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 - script: yarn test-api-chromium --headless --forbid-only displayName: 'Integration tests (Chromium)' - - run: xvfb-run --auto-servernum -- bash -c "yarn test-api-firefox --headless --forbid-only" + - script: xvfb-run --auto-servernum -- bash -c "yarn test-api-firefox --headless --forbid-only" displayName: 'Integration tests (Firefox)' env: DEBUG: "*" - - run: xvfb-run --auto-servernum -- bash -c "yarn test-api-webkit --headless --forbid-only" + - script: xvfb-run --auto-servernum -- bash -c "yarn test-api-webkit --headless --forbid-only" displayName: 'Integration tests (Webkit)' env: DEBUG: "*" From 7e8e1215adc155074bd45fe01dd605e5f757442f Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 15 Feb 2020 12:09:57 -0800 Subject: [PATCH 3/6] Fix order --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 068c6d1bbc..9910393605 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -100,10 +100,10 @@ jobs: yarn start & sleep 10 displayName: 'Start test server' - - displayName: install required packages - script: | + - script: | 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 + displayName: install required packages - script: yarn test-api-chromium --headless --forbid-only displayName: 'Integration tests (Chromium)' - script: xvfb-run --auto-servernum -- bash -c "yarn test-api-firefox --headless --forbid-only" From 35ddcdd2665cdaa998ea817fbec7115afa67027f Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 15 Feb 2020 12:13:38 -0800 Subject: [PATCH 4/6] Upgrade to ubuntu-18.04 --- azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9910393605..0d6600c952 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,7 +6,7 @@ jobs: - job: Linux pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-18.04' steps: - task: NodeTool@0 inputs: @@ -79,8 +79,12 @@ jobs: - job: Linux_IntegrationTests pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-18.04' steps: + - script: | + 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 + displayName: Install required packages - task: NodeTool@0 inputs: versionSpec: '10.x' @@ -100,10 +104,6 @@ jobs: yarn start & sleep 10 displayName: 'Start test server' - - script: | - 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 - displayName: install required packages - script: yarn test-api-chromium --headless --forbid-only displayName: 'Integration tests (Chromium)' - script: xvfb-run --auto-servernum -- bash -c "yarn test-api-firefox --headless --forbid-only" From bdb01e61663f09036cb0f66566f2d235fd6b9199 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 15 Feb 2020 12:25:00 -0800 Subject: [PATCH 5/6] Remove DEBUG, test fit addon based on a range --- addons/xterm-addon-fit/src/FitAddon.api.ts | 36 +++++++++++----------- azure-pipelines.yml | 4 --- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/addons/xterm-addon-fit/src/FitAddon.api.ts b/addons/xterm-addon-fit/src/FitAddon.api.ts index 760a31761f..798b2fc54a 100644 --- a/addons/xterm-addon-fit/src/FitAddon.api.ts +++ b/addons/xterm-addon-fit/src/FitAddon.api.ts @@ -14,8 +14,6 @@ let page: Page; const width = 1024; const height = 768; -let isFirefox = false; - describe('FitAddon', () => { before(async function(): Promise { const browserType = getBrowserType(); @@ -27,10 +25,6 @@ describe('FitAddon', () => { await page.setViewportSize({ width, height }); await page.goto(APP); await openTerminal(page); - // This is used to do conditional assertions since cell height is 1 pixel higher with the - // default font on Firefox. Minor differences in font rendering/sizing is expected so this is - // fine. - isFirefox = await page.evaluate(`navigator.userAgent.toLowerCase().indexOf('firefox') > -1`); }); after(async () => { @@ -49,18 +43,18 @@ describe('FitAddon', () => { it('default', async function(): Promise { await loadFit(); - assert.deepEqual(await page.evaluate(`window.fit.proposeDimensions()`), { - cols: 87, - rows: isFirefox ? 28 : 26 - }); + const dimensions: {cols: number, rows: number} = await page.evaluate(`window.fit.proposeDimensions()`); + assert.equal(dimensions.cols, 87); + assert.isAbove(dimensions.rows, 24); + assert.isBelow(dimensions.rows, 29); }); it('width', async function(): Promise { await loadFit(1008); - assert.deepEqual(await page.evaluate(`window.fit.proposeDimensions()`), { - cols: 110, - rows: isFirefox ? 28 : 26 - }); + const dimensions: {cols: number, rows: number} = await page.evaluate(`window.fit.proposeDimensions()`); + assert.equal(dimensions.cols, 110); + assert.isAbove(dimensions.rows, 24); + assert.isBelow(dimensions.rows, 29); }); it('small', async function(): Promise { @@ -80,15 +74,21 @@ describe('FitAddon', () => { it('default', async function(): Promise { await loadFit(); await page.evaluate(`window.fit.fit()`); - assert.equal(await page.evaluate(`window.term.cols`), 87); - assert.equal(await page.evaluate(`window.term.rows`), isFirefox ? 28 : 26); + const cols: number = await page.evaluate(`window.term.cols`); + const rows: number = await page.evaluate(`window.term.rows`); + assert.equal(cols, 87); + assert.isAbove(rows, 24); + assert.isBelow(rows, 29); }); it('width', async function(): Promise { await loadFit(1008); await page.evaluate(`window.fit.fit()`); - assert.equal(await page.evaluate(`window.term.cols`), 110); - assert.equal(await page.evaluate(`window.term.rows`), isFirefox ? 28 : 26); + const cols: number = await page.evaluate(`window.term.cols`); + const rows: number = await page.evaluate(`window.term.rows`); + assert.equal(cols, 110); + assert.isAbove(rows, 24); + assert.isBelow(rows, 29); }); it('small', async function(): Promise { diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0d6600c952..72aaacacf3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -108,12 +108,8 @@ jobs: displayName: 'Integration tests (Chromium)' - script: xvfb-run --auto-servernum -- bash -c "yarn test-api-firefox --headless --forbid-only" displayName: 'Integration tests (Firefox)' - env: - DEBUG: "*" - script: xvfb-run --auto-servernum -- bash -c "yarn test-api-webkit --headless --forbid-only" displayName: 'Integration tests (Webkit)' - env: - DEBUG: "*" - job: macOS_IntegrationTests pool: From 84c5f76b766204dc74ee12bcb8acfc5b2c18bbc9 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 16 Feb 2020 07:57:28 -0800 Subject: [PATCH 6/6] Remove webkit tests on Linux --- azure-pipelines.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 72aaacacf3..adeecb88b7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -108,8 +108,6 @@ jobs: displayName: 'Integration tests (Chromium)' - script: xvfb-run --auto-servernum -- bash -c "yarn test-api-firefox --headless --forbid-only" displayName: 'Integration tests (Firefox)' - - script: xvfb-run --auto-servernum -- bash -c "yarn test-api-webkit --headless --forbid-only" - displayName: 'Integration tests (Webkit)' - job: macOS_IntegrationTests pool: