Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore(electron): add Win+Mac bots (#13943)
Pavel Feldmanf4933e6d8b54
diff --git a/.github/workflows/component_tests.yml b/.github/workflows/tests_components.ymlsimilarity index 100%rename from .github/workflows/component_tests.ymlrename to .github/workflows/tests_components.ymldiff --git a/.github/workflows/tests_electron.yml b/.github/workflows/tests_electron.ymlnew file mode 100644index 0000000000..fb4b70c27b--- /dev/null+++ b/.github/workflows/tests_electron.yml@@ -0,0 +1,53 @@+name: "electron"++on:+ push:+ branches:+ - main+ - release-*+ pull_request:+ paths-ignore:+ - 'browser_patches/**'+ - 'docs/**'+ types: [ labeled ]+ branches:+ - main+ - release-*++env:+ # Force terminal colors. @see https://www.npmjs.com/package/colors+ FORCE_COLOR: 1+ FLAKINESS_CONNECTION_STRING: ${{ secrets.FLAKINESS_CONNECTION_STRING }}++jobs:+ test_electron:+ name: ${{ matrix.os }}+ strategy:+ fail-fast: false+ matrix:+ os: [ubuntu-latest, macos-latest, windows-latest]+ runs-on: ${{ matrix.os }}+ steps:+ - uses: actions/checkout@v2+ - uses: actions/setup-node@v2+ with:+ node-version: 14+ - run: npm i -g npm@8+ - run: npm ci+ env:+ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1+ - run: npm run build+ - run: npx playwright install --with-deps chromium+ - run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run etest+ if: matrix.os == 'ubuntu-latest'+ - run: npm run etest+ if: matrix.os != 'ubuntu-latest'+ - run: node tests/config/checkCoverage.js electron+ if: always() && matrix.os == 'ubuntu-latest'+ - run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json+ if: always() && matrix.os == 'ubuntu-latest'+ - uses: actions/upload-artifact@v1+ if: always() && matrix.os == 'ubuntu-latest'+ with:+ name: electron-linux-test-results+ path: test-resultsdiff --git a/.github/workflows/tests_secondary.yml b/.github/workflows/tests_secondary.ymlindex cfaa2690fa..104211bf98 100644--- a/.github/workflows/tests_secondary.yml+++ b/.github/workflows/tests_secondary.yml@@ -759,30 +759,6 @@ jobs:name: chrome-beta-mac-test-resultspath: test-results- test_electron:- name: "Electron Linux"- runs-on: ubuntu-20.04- steps:- - uses: actions/checkout@v2- - uses: actions/setup-node@v2- with:- node-version: 14- - run: npm i -g npm@8- - run: npm ci- env:- PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1- - run: npm run build- - run: npx playwright install --with-deps chromium- - run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run etest- - run: node tests/config/checkCoverage.js electron- - run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json- if: always()- - uses: actions/upload-artifact@v1- if: ${{ always() }}- with:- name: electron-linux-test-results- path: test-results-build-playwright-driver:name: "build-playwright-driver"runs-on: ubuntu-20.04diff --git a/tests/page/locator-misc-2.spec.ts b/tests/page/locator-misc-2.spec.tsindex 2ce1116e75..0aee0378a9 100644--- a/tests/page/locator-misc-2.spec.ts+++ b/tests/page/locator-misc-2.spec.ts@@ -42,8 +42,8 @@ it('should scroll into view', async ({ page, server, isAndroid }) => {}});-it('should scroll zero-sized element into view', async ({ page, isAndroid }) => {- it.fixme(isAndroid);+it('should scroll zero-sized element into view', async ({ page, isAndroid, isElectron }) => {+ it.fixme(isAndroid || isElectron);await page.setContent(`<style>diff --git a/tests/page/page-goto.spec.ts b/tests/page/page-goto.spec.tsindex 2f0c5e2a49..f2542090bd 100644--- a/tests/page/page-goto.spec.ts+++ b/tests/page/page-goto.spec.ts@@ -634,8 +634,9 @@ it('should properly report window.stop()', async ({ page, server, browserName })await page.goto(server.PREFIX + '/window-stop.html');});-it('should return from goto if new navigation is started', async ({ page, server, browserName }) => {+it('should return from goto if new navigation is started', async ({ page, server, browserName, isElectron }) => {it.fixme(browserName === 'webkit', 'WebKit has a bug where Page.frameStoppedLoading is sent too early.');+ it.fixme(isElectron, 'Fails on Electron');server.setRoute('/slow.js', async (req, res) => void 0);let finished = false;const navigation = page.goto(server.PREFIX + '/load-event/load-event.html').then(r => {