-
Notifications
You must be signed in to change notification settings - Fork 429
test(wtr): run integration tests in native and synthetic shadow modes @W-19098130 #5517
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
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
e2c7afe
test(wtr): run all the flavors and see what happens
wjhsf 0c81acb
test(wtr): prefer DISABLE_SYNTHETIC over duplicate env var name
wjhsf 716f7b5
test(wtr): fix hydration tests
wjhsf f2934f8
test(wtr): create `process.env` with only string values
wjhsf 95d3b4b
test(wtr): split integration and hydration tests into separate jobs
wjhsf 46c3d56
Revert "test(wtr): prefer DISABLE_SYNTHETIC over duplicate env var name"
wjhsf 8c15e71
test(wtr): revert to using original env var
wjhsf 373bcf1
test(wtr): make integration and hydration tests have different defaul…
wjhsf 0526e49
test(wtr): fix tests running in native shadow mode
wjhsf 5dbe1e9
test(wtr): make working tests fail for real in CI if they break
wjhsf 0734767
test(wtr): avoid accidentally not running tests again
wjhsf 39920e1
test(wtr): enable FORCE_NATIVE_SHADOW_MODE_FOR_TEST in CI
wjhsf ee9bc59
test(wtr): enable DISABLE_DETACHED_REHYDRATION=1 in CI
wjhsf ca7f8ee
test(wtr): enable more test scenarios in CI
wjhsf 5b35d40
test(wtr): split CI job into groups
wjhsf 1ccbdae
Merge branch 'master' into wjh/wtr-env-vars
wjhsf 71f8185
test(wtr): remove matrix config from job that doesn't need it
wjhsf e525359
test(wtr): enable API_VERSION tests in CI and alphabetize list
wjhsf da8a3af
test(wtr): use vitest spy instead of jasmine spy
wjhsf d1af772
test(wtr): fix broken test assertion
wjhsf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -18,14 +18,18 @@ env: | |
| NODE_VERSION: '20.19.4' | ||
|
|
||
| jobs: | ||
| # Starting with the basics, just get tests running in CI | ||
| # TODO: add env var combos we use for Karma tests | ||
| # TODO: upload result artifacts | ||
| # TODO: make it saucy 🥫 | ||
| wtr-group-1: | ||
| integration-tests: | ||
| name: Integration tests (${{ matrix.shadow_mode }} shadow) | ||
| strategy: | ||
| matrix: | ||
| shadow_mode: [native, synthetic] | ||
|
|
||
| runs-on: ubuntu-22.04 | ||
| env: | ||
| SAUCE_TUNNEL_ID: github-action-tunnel-wtr-${{github.run_id}}-group-1 | ||
| SHADOW_MODE_OVERRIDE: ${{ matrix.shadow_mode }} | ||
| defaults: | ||
| run: | ||
| working-directory: ./packages/@lwc/integration-not-karma | ||
|
|
@@ -51,4 +55,93 @@ jobs: | |
| # region: us | ||
|
|
||
| - run: yarn test | ||
| - run: API_VERSION=58 yarn test | ||
| - run: API_VERSION=59 yarn test | ||
| - run: API_VERSION=60 yarn test | ||
| - run: API_VERSION=61 yarn test | ||
| - run: API_VERSION=62 yarn test | ||
| - run: DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 yarn test || true | ||
| - run: DISABLE_STATIC_CONTENT_OPTIMIZATION=1 yarn test | ||
| - run: ENABLE_ARIA_REFLECTION_GLOBAL_POLYFILL=1 yarn test | ||
| - run: NODE_ENV_FOR_TEST=production yarn test | ||
|
|
||
| integration-tests-not-both-modes: | ||
| # Tests that should run in only synthetic or native shadow, not both | ||
| name: Integration tests (singleton batch) | ||
| runs-on: ubuntu-22.04 | ||
| env: | ||
| SAUCE_TUNNEL_ID: github-action-tunnel-wtr-${{github.run_id}}-group-1 | ||
| SHADOW_MODE_OVERRIDE: ${{ matrix.shadow_mode }} | ||
| defaults: | ||
| run: | ||
| working-directory: ./packages/@lwc/integration-not-karma | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
| cache: 'yarn' | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn install --frozen-lockfile | ||
| working-directory: ./ | ||
|
|
||
| # - uses: saucelabs/[email protected] | ||
| # with: | ||
| # username: ${{ secrets.SAUCE_USERNAME }} | ||
| # accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
| # tunnelName: ${{ env.SAUCE_TUNNEL_ID }} | ||
| # region: us | ||
|
|
||
| # Synthetic shadow only | ||
| - run: LEGACY_BROWSERS=1 yarn test || true | ||
| - run: FORCE_NATIVE_SHADOW_MODE_FOR_TEST=1 yarn test | ||
| - run: DISABLE_DETACHED_REHYDRATION=1 yarn test | ||
| - run: DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 DISABLE_DETACHED_REHYDRATION=1 yarn test || true | ||
|
|
||
| # Native shadow only -- don't forget SHADOW_MODE_OVERRIDE! | ||
| - run: SHADOW_MODE_OVERRIDE=native DISABLE_SYNTHETIC_SHADOW_SUPPORT_IN_COMPILER=1 yarn test | ||
| - run: SHADOW_MODE_OVERRIDE=native DISABLE_SYNTHETIC_SHADOW_SUPPORT_IN_COMPILER=1 DISABLE_STATIC_CONTENT_OPTIMIZATION=1 yarn test | ||
|
|
||
| hydration-tests: | ||
| runs-on: ubuntu-22.04 | ||
| env: | ||
| SAUCE_TUNNEL_ID: github-action-tunnel-wtr-${{github.run_id}}-group-1 | ||
| defaults: | ||
| run: | ||
| working-directory: ./packages/@lwc/integration-not-karma | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
| cache: 'yarn' | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn install --frozen-lockfile | ||
| working-directory: ./ | ||
|
|
||
| # - uses: saucelabs/[email protected] | ||
| # with: | ||
| # username: ${{ secrets.SAUCE_USERNAME }} | ||
| # accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
| # tunnelName: ${{ env.SAUCE_TUNNEL_ID }} | ||
| # region: us | ||
| - run: ENGINE_SERVER=1 yarn test:hydration | ||
| - run: ENGINE_SERVER=1 SHADOW_MODE_OVERRIDE=synthetic yarn test:hydration | ||
| - run: ENGINE_SERVER=1 NODE_ENV_FOR_TEST=production yarn test:hydration | ||
| - run: ENGINE_SERVER=1 DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 yarn test:hydration | ||
| - run: ENGINE_SERVER=1 DISABLE_STATIC_CONTENT_OPTIMIZATION=1 yarn test:hydration | ||
| - run: ENGINE_SERVER=1 DISABLE_DETACHED_REHYDRATION=1 yarn test:hydration | ||
| - run: ENGINE_SERVER=1 DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 DISABLE_DETACHED_REHYDRATION=1 yarn test:hydration | ||
| - run: yarn test:hydration | ||
| - run: SHADOW_MODE_OVERRIDE=synthetic yarn test:hydration | ||
| - run: NODE_ENV_FOR_TEST=production yarn test:hydration | ||
| - run: DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 yarn test:hydration | ||
| - run: DISABLE_STATIC_CONTENT_OPTIMIZATION=1 yarn test:hydration | ||
This file contains hidden or 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 hidden or 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
17 changes: 15 additions & 2 deletions
17
packages/@lwc/integration-not-karma/configs/integration.js
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Oops! We were using the wrong object, so none of the tests were actually executing. Fortunately, all the tests are still passing with this fixed. I added the else clause below to prevent this accident from happening again.