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: add Microsoft Edge Stable on Linux (#9915)
Max Schmitta2c414cd8831
diff --git a/.github/workflows/tests_secondary.yml b/.github/workflows/tests_secondary.ymlindex 7f844dd109..28e8dc5452 100644--- a/.github/workflows/tests_secondary.yml+++ b/.github/workflows/tests_secondary.yml@@ -423,6 +423,31 @@ jobs:name: edge-stable-win-test-resultspath: test-results+ edge_stable_linux:+ name: "Edge Stable (Linux)"+ runs-on: ubuntu-20.04+ steps:+ - uses: actions/checkout@v2+ - uses: actions/setup-node@v2+ with:+ node-version: 12+ - run: npm i -g npm@7+ - run: npm ci+ env:+ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1+ - run: npm run build+ - run: npx playwright install --with-deps msedge+ - run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run ctest+ env:+ PWTEST_CHANNEL: msedge+ - run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json+ if: always()+ - uses: actions/upload-artifact@v1+ if: ${{ always() }}+ with:+ name: edge-stable-linux-test-results+ path: test-results+edge_beta_mac:name: "Edge Beta (Mac)"runs-on: macos-10.15diff --git a/packages/playwright-core/bin/reinstall_msedge_stable_linux.sh b/packages/playwright-core/bin/reinstall_msedge_stable_linux.shnew file mode 100755index 0000000000..dc52fd79fb--- /dev/null+++ b/packages/playwright-core/bin/reinstall_msedge_stable_linux.sh@@ -0,0 +1,27 @@+#!/bin/bash++set -e+set -x++is_user_root () { [ "${EUID:-$(id -u)}" -eq 0 ]; }+if is_user_root; then+ maybesudo=""+else+ maybesudo="sudo"+fi++if dpkg --get-selections | grep -q "^microsoft-edge-stable[[:space:]]*install$" >/dev/null; then+ $maybesudo apt-get remove -y microsoft-edge-stable+fi++if ! command -v curl >/dev/null; then+ $maybesudo apt-get install -y curl+fi++curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/microsoft.gpg+$maybesudo install -o root -g root -m 644 /tmp/microsoft.gpg /etc/apt/trusted.gpg.d/+$maybesudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-stable.list'+rm /tmp/microsoft.gpg+$maybesudo apt-get update && $maybesudo apt-get install -y microsoft-edge-stable++microsoft-edge-stable --versiondiff --git a/packages/playwright-core/src/utils/registry.ts b/packages/playwright-core/src/utils/registry.tsindex 5286f027d1..34d643fde6 100644--- a/packages/playwright-core/src/utils/registry.ts+++ b/packages/playwright-core/src/utils/registry.ts@@ -325,11 +325,11 @@ export class Registry {}));this._executables.push(this._createChromiumChannel('msedge', {- 'linux': '',+ 'linux': '/opt/microsoft/msedge/msedge','darwin': '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge','win32': `\\Microsoft\\Edge\\Application\\msedge.exe`,}, () => this._installMSEdgeChannel('msedge', {- 'linux': '',+ 'linux': 'reinstall_msedge_stable_linux.sh','darwin': 'reinstall_msedge_stable_mac.sh','win32': 'reinstall_msedge_stable_win.ps1',})));