-
Notifications
You must be signed in to change notification settings - Fork 31
chore: Run browser contract tests in CI. #1001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@launchdarkly/browser size report |
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
| size_limit: 25000 | ||
|
|
||
| # Contract Tests | ||
| - name: Install Playwright browsers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think playwright doesn't like this, but it works fine. Probably could re-order things.
| run: npx playwright install --with-deps chromium | ||
|
|
||
| - name: Install contract test dependencies | ||
| run: yarn workspaces focus browser-contract-test-adapter browser-contract-test-service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Fix Playwright Workflow Installation Order
The workflow installs Playwright browsers before installing the contract test dependencies that include the playwright package. This causes npx playwright install to potentially download a different version of Playwright than specified in package.json, or fail if the package isn't available. The "Install contract test dependencies" step needs to run before "Install Playwright browsers".
This PR adds support for running the browser contract tests in CI. The browser contract tests need to run in a browser to ensure test efficacy and this is accomplished using playwright in CI.
Note
Adds CI workflow steps to run browser contract tests headlessly via Playwright, plus docs and a helper script, and adds Playwright as a dev dependency.
.github/workflows/browser.yml)launchdarkly/contract-testsaction, and adds log/cleanup steps.packages/sdk/browser/contract-tests/README.mddescribing architecture and local run instructions.entity/open-browser.mjsto launch a headless Chromium and stream console/errors.playwrighttoentity/package.jsondevDependencies.Written by Cursor Bugbot for commit e035f91. This will update automatically on new commits. Configure here.