Skip to content

Playwright on Arch#814

Draft
samuelpecher wants to merge 2 commits intomainfrom
playwright-arch
Draft

Playwright on Arch#814
samuelpecher wants to merge 2 commits intomainfrom
playwright-arch

Conversation

@samuelpecher
Copy link
Copy Markdown
Collaborator

Looks like there may be some challenges getting playwright working nicely on Arch

  • Use local chromium
  • Use local firefox
  • Option to skip webkit

Copilot AI review requested due to automatic review settings March 12, 2026 20:16
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 updates the build/test tooling around Lexxy’s browser tests and asset bundling, and adds a precompressed Brotli asset for the minified bundle.

Changes:

  • Configure Playwright to use system Chromium/Firefox executables when present.
  • Mark @rails/activestorage as an external dependency in the Rollup build.
  • Add a Playwright npm script intended to run browser tests without WebKit, and add lexxy.min.js.br to assets.

Reviewed changes

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

File Description
test/browser/playwright.config.js Adds executable path detection for system-installed Chromium/Firefox and passes it via launchOptions.
rollup.config.mjs Treats @rails/activestorage as an external module for the Rails asset build output.
package.json Adds a “no webkit” Playwright test script.
app/assets/javascript/lexxy.min.js.br Adds Brotli-compressed minified asset output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread test/browser/playwright.config.js Outdated
Comment on lines +27 to +30
{ name: "chromium", use: { ...devices["Desktop Chrome"],
launchOptions: chromiumPath ? { executablePath: chromiumPath } : {} } },
{ name: "firefox", use: { ...devices["Desktop Firefox"],
launchOptions: firefoxPath ? { executablePath: firefoxPath } : {} } },
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

launchOptions is always being set, and when the executable path isn't present it becomes an empty object. That can unintentionally override any default/device launchOptions (or any future shared use.launchOptions) with {}. Prefer omitting launchOptions entirely when no override is needed (e.g., set it to undefined or conditionally spread it).

Suggested change
{ name: "chromium", use: { ...devices["Desktop Chrome"],
launchOptions: chromiumPath ? { executablePath: chromiumPath } : {} } },
{ name: "firefox", use: { ...devices["Desktop Firefox"],
launchOptions: firefoxPath ? { executablePath: firefoxPath } : {} } },
{ name: "chromium", use: {
...devices["Desktop Chrome"],
...(chromiumPath && { launchOptions: { executablePath: chromiumPath } }),
} },
{ name: "firefox", use: {
...devices["Desktop Firefox"],
...(firefoxPath && { launchOptions: { executablePath: firefoxPath } }),
} },

Copilot uses AI. Check for mistakes.
Comment thread rollup.config.mjs Outdated
@basecamp basecamp deleted a comment from Copilot AI Mar 13, 2026
Copilot AI review requested due to automatic review settings March 13, 2026 11:21
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

Copilot reviewed 3 out of 9 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

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