-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(quantic): support e2e testing with LWS and with Locker Service w…
…ith Playwright (#4711) ## [SFINT-5796](https://coveord.atlassian.net/browse/SFINT-5796) ### Summary This PR adds support for end-to-end (E2E) testing in both **Lightning Web Security (LWS)** and **Locker Service** environments. The changes ensure that Playwright tests can run seamlessly across these configurations, improving test coverage and reliability for Quantic components. --- #### Key Changes 1. **Playwright Configuration Updates**: - Added projects for both LWS-enabled and Locker Service environments. - Configured `baseURL` for each environment using environment variables: - `Quantic__LWS_enabled_URL` for LWS-enabled. - `Quantic__LWS_disabled_URL` for Locker Service. 2. **GitHub Actions Workflow**: - Updated the **e2e Quantic workflow** to include Playwright tests. - Tests now run automatically in the CI pipeline for both configurations (LWS-enabled and Locker Service), but without using a matrix strategy (This will come next) 3. **Documentation**: - Updated README with instructions for running Playwright tests locally in both LWS and Locker Service environments. --- #### Testing Instructions 1. Run the following commands locally to test each configuration: - **LWS-enabled**: ```bash npx playwright test --project=LWS-enabled ``` - **Locker Service**: ```bash npx playwright test --project=LWS-disabled ``` #### Next Steps - Transition to a matrix strategy in the GitHub Actions workflow as the number of Playwright tests increases. - Expand test coverage to additional Quantic components for both LWS and Locker Service configurations. https://github.com/coveo/ui-kit/actions/runs/12043295059?pr=4711 <img width="776" alt="Screenshot 2024-11-27 at 9 16 37 AM" src="https://github.com/user-attachments/assets/ace2a33d-71ea-4c64-adfc-0f625df5c934"> [SFINT-5796]: https://coveord.atlassian.net/browse/SFINT-5796?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Simon Milord <simon.milord@gmail.com> Co-authored-by: Frederic Beaudoin <fbeaudoin@coveo.com>
- Loading branch information
1 parent
8f4b54d
commit 4368ee0
Showing
13 changed files
with
267 additions
and
55 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.github/actions/e2e-quantic/action.yml → ...ub/actions/e2e-quantic-cypress/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: 'Quantic Playwright E2E tests' | ||
description: 'Runs Playwright tests for Quantic' | ||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 | ||
with: | ||
path: packages/quantic/.env | ||
key: quantic-playwright-env-${{ github.sha }} | ||
- name: Run Playwright Tests | ||
run: | | ||
npx playwright install --with-deps | ||
npx playwright test | ||
shell: bash | ||
working-directory: ./packages/quantic | ||
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4 | ||
with: | ||
name: quantic-playwright-report | ||
path: packages/quantic/playwright-report | ||
retention-days: 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"orgName": "Quantic__LWS_disabled", | ||
"edition": "Developer", | ||
"features": ["Communities"], | ||
"settings": { | ||
"experienceBundleSettings": { | ||
"enableExperienceBundleMetadata": true | ||
}, | ||
"communitiesSettings": { | ||
"enableNetworksEnabled": true | ||
}, | ||
"languageSettings": { | ||
"enableTranslationWorkbench": true, | ||
"enableEndUserLanguages": true | ||
}, | ||
"securitySettings": { | ||
"sessionSettings": { | ||
"lockerServiceNext": false | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.