Skip to content

Fix: Install Playwright browsers in test.yml for E2E tests#15

Merged
mpaulosky merged 2 commits intomainfrom
fix/e2e-playwright-install-correct-workflow
Feb 20, 2026
Merged

Fix: Install Playwright browsers in test.yml for E2E tests#15
mpaulosky merged 2 commits intomainfrom
fix/e2e-playwright-install-correct-workflow

Conversation

@mpaulosky
Copy link
Copy Markdown
Owner

Summary

Resolves failing E2E tests by installing Playwright browser binaries in the correct workflow.

Problem

The E2E test suite was failing with:
\
Microsoft.Playwright.PlaywrightException:
Executable doesn't exist at /home/runner/.cache/ms-playwright/chromium_headless_shell-1161/chrome-linux/headless_shell
\\

This occurred because Playwright browser binaries (Chromium) were not installed in the GitHub Actions runner for the E2E tests.

Root Cause Analysis

Solution

Added a new step 'Install Playwright Browsers' to the test-e2e job in test.yml:

  1. Installs the Playwright CLI tool globally
  2. Installs the Chromium browser binary with dependencies

Changes

  • Modified: .github/workflows/test.yml\
    • Added step in test-e2e job after 'Build solution' step
    • Placed before 'Run E2E Tests' step so browsers are available when tests execute

Testing

  • The workflow will now install Playwright CLI and Chromium browsers (~30 seconds)
  • All E2E tests should run with available Chromium browser
  • All 17 E2E tests are expected to pass

Notes

mpaulosky and others added 2 commits February 19, 2026 16:58
- Add new step 'Install Playwright Browsers' to squad-ci.yml after build step
- Installs Playwright CLI tool globally
- Installs Chromium browser binary for E2E tests
- Installs Chromium system dependencies for Linux CI environment
- Resolves PlaywrightException: 'Executable doesn't exist at /home/runner/.cache/ms-playwright/...'
- Fixes all 17 failing E2E tests in IssueManager.Web.E2E.Tests project

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 20, 2026 01:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes failing E2E tests by installing Playwright browser binaries in GitHub Actions workflows. The issue occurred because Chromium browser binaries were not available in the CI environment, causing all 17 E2E tests to fail with "Executable doesn't exist" errors. The fix correctly adds the browser installation step to both workflows that run E2E tests.

Changes:

  • Added Playwright browser installation to test.yml's test-e2e job (before E2E tests run)
  • Added Playwright browser installation to squad-ci.yml's build-and-test job (which runs all test projects including E2E)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/test.yml Added step to install Playwright CLI and Chromium browser with dependencies in the test-e2e job
.github/workflows/squad-ci.yml Added step to install Playwright CLI and Chromium browser with dependencies in the build-and-test job

Comment on lines +375 to +378
- name: Install Playwright Browsers
run: |
dotnet tool install --global Microsoft.Playwright.CLI
playwright install --with-deps chromium
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Playwright installation command uses --with-deps flag, which is a combined shorthand. However, in squad-ci.yml (lines 85-86), the same installation uses two separate commands: playwright install chromium and playwright install-deps chromium. This creates an inconsistency between the two workflow files.

For consistency and maintainability, both workflows should use the same approach. The --with-deps flag approach used here is more concise and is the recommended modern syntax. Consider updating squad-ci.yml to match this pattern.

Copilot uses AI. Check for mistakes.
Comment on lines +82 to +87
- name: Install Playwright Browsers
run: |
dotnet tool install --global Microsoft.Playwright.CLI
playwright install chromium
playwright install-deps chromium

Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description states "squad-ci.yml doesn't run E2E tests separately — the correct fix must be in test.yml", but the code changes show that squad-ci.yml is also being modified to install Playwright browsers.

After reviewing squad-ci.yml lines 96-133, the workflow does run ALL test projects (including E2E tests) by finding projects with <IsTestProject>true</IsTestProject>. This means both workflow files DO need the Playwright browser installation, making this change correct.

However, the PR description should be updated to reflect that both workflows legitimately need this fix because squad-ci.yml runs all tests including E2E tests, not just because PR #14 targeted the wrong file.

Copilot uses AI. Check for mistakes.
Comment on lines +85 to +86
playwright install chromium
playwright install-deps chromium
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Playwright installation uses two separate commands (playwright install chromium and playwright install-deps chromium), while test.yml uses the more concise playwright install --with-deps chromium flag (line 378).

For consistency across workflow files and following modern Playwright CLI best practices, consider using the --with-deps flag instead of separate commands. This achieves the same result with cleaner syntax.

Suggested change
playwright install chromium
playwright install-deps chromium
playwright install --with-deps chromium

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

Test Results Summary

101 tests   69 ✅  5s ⏱️
  6 suites   0 💤
  6 files    32 ❌

For more details on these failures, see this check.

Results for commit 7411391.

@mpaulosky mpaulosky merged commit 25be9c2 into main Feb 20, 2026
6 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.22%. Comparing base (ce5cfd2) to head (7411391).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #15   +/-   ##
=======================================
  Coverage   46.22%   46.22%           
=======================================
  Files          25       25           
  Lines         411      411           
  Branches       17       17           
=======================================
  Hits          190      190           
  Misses        218      218           
  Partials        3        3           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mpaulosky mpaulosky deleted the fix/e2e-playwright-install-correct-workflow branch February 20, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants