Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
38ab648
chore(ci): use GitHub Actions for cross-platform tests, not SuaceLabs
wjhsf Oct 20, 2025
4cee108
wjhsf Oct 20, 2025
1480d07
chore: not a template string
wjhsf Oct 20, 2025
0c5f68e
test(integration): disable flaky tests (temporarily)
wjhsf Oct 21, 2025
209e9fb
chore(integration-tests): remove leading `test-` from filenames
wjhsf Oct 20, 2025
a91f183
chore(integration-tests): `delegate-focus-` -> `delegates-focus-`
wjhsf Oct 20, 2025
e93eb75
chore(integration-tests): rename `tab-index-` to `tabindex-`
wjhsf Oct 21, 2025
42c33b2
chore(integration-tests): remove `-elements`
wjhsf Oct 21, 2025
fe526cc
chore(integration-tests): rename `previous-` to `prev-`
wjhsf Oct 21, 2025
fb43b7f
test(integration-tests): await async method
wjhsf Oct 21, 2025
7608c1f
chore(integration-tests): fully remove `test-` prefix
wjhsf Oct 21, 2025
12d5791
test(integration-tests): derive test names instead of hard-coding
wjhsf Oct 21, 2025
6cc010d
chore(integration-tests): rename way-too-long test name
wjhsf Oct 21, 2025
8ac4b34
Merge branch 'wjh/rename-integration-tests' into wjh/no-saucelabs
wjhsf Oct 21, 2025
4c0683f
chore(ci): attempt to run bash on windows
wjhsf Oct 21, 2025
a041012
Merge branch 'master' into wjh/no-saucelabs
wjhsf Oct 22, 2025
4c195f9
chore(ci): declare env vars in more cross-platform manner
wjhsf Oct 22, 2025
9f91ecc
chore(ci): run yarn install in bash
wjhsf Oct 22, 2025
2ded948
chore(ci): give up and use cross-env
wjhsf Oct 22, 2025
addf3d3
chore(ci): try without `exec`
wjhsf Oct 22, 2025
cdfff7b
test(wtr): change variable name
wjhsf Oct 22, 2025
97f1ae6
chore(ci): remove saucelabs
wjhsf Oct 22, 2025
d064807
test(ci): run unit tests on windows
wjhsf Oct 22, 2025
3660a90
chore(ci): why different?
wjhsf Oct 22, 2025
9c92961
chore(ci): avoid unnecessasry rebuild
wjhsf Oct 22, 2025
e4279e3
chore(ci): windows compat
wjhsf Oct 22, 2025
7f1d77f
Revert "chore(ci): windows compat"
wjhsf Oct 22, 2025
50c93d3
chore(ci): windows compat
wjhsf Oct 22, 2025
f224212
chore(ci): update actions versions
wjhsf Oct 22, 2025
ac0951e
chore(ci): install chromedriver as part of setup-chrome
wjhsf Oct 22, 2025
6ca5084
chore(ci): more sloppy windows compat
wjhsf Oct 22, 2025
abe94ea
chore(ci): more windowsy
wjhsf Oct 22, 2025
d993c2a
chore: add package manager
wjhsf Oct 22, 2025
f525f21
chore(ci): more windowsy
wjhsf Oct 22, 2025
38fab00
chore(ci): more windowsy
wjhsf Oct 22, 2025
45b62a0
chore(ci): more windowsy
wjhsf Oct 22, 2025
0b505ca
chore(ci): crlf smh
wjhsf Oct 23, 2025
df1c800
chore(ci): revert setup-chrome@v2
wjhsf Oct 23, 2025
9a6ceee
Merge branch 'master' into wjh/no-saucelabs
wjhsf Oct 23, 2025
79198cd
chore: include call stack
wjhsf Oct 23, 2025
c8b1e05
chore: debug
wjhsf Oct 23, 2025
95d1a00
chore: actually, nvm
wjhsf Oct 23, 2025
53e368f
test(wtr): jsdoc for the doc gods
wjhsf Oct 23, 2025
59e17e8
Merge branch 'master' into wjh/no-saucelabs
wjhsf Oct 23, 2025
e42d6b8
chore(ci): update input descriptions
wjhsf Oct 23, 2025
ba0ec64
chore: revert unrelated changes
wjhsf Oct 23, 2025
9146836
chore: more windowsy
wjhsf Oct 23, 2025
a3c017f
chore: revert unrelated changes
wjhsf Oct 23, 2025
efc5a10
Merge branch 'master' into wjh/no-saucelabs
wjhsf Oct 23, 2025
2ec81ee
test(wtr): disable tests broken on windows
wjhsf Oct 23, 2025
57a6e60
revert: just log text
wjhsf Oct 23, 2025
e7fc506
Merge branch 'master' into wjh/no-saucelabs
wjhsf Oct 23, 2025
232b563
chore(ci): remove unnecessary env var
wjhsf Oct 23, 2025
b7bf6bd
chore(ci): add names for clarity
wjhsf Oct 23, 2025
6f32328
chore: move `x` to `c`
wjhsf Oct 29, 2025
2608565
chore: update usage of `x` to `c`
wjhsf Oct 29, 2025
caeffdf
chore: update usage of `X-` to `C-`
wjhsf Oct 29, 2025
0a04861
Merge branch 'master' into wjh/no-saucelabs
wjhsf Oct 29, 2025
6be5873
test(wtr): fix scope tokens
wjhsf Oct 29, 2025
cd0857a
test(wtr): order can be different
wjhsf Oct 29, 2025
a115ec2
test(wtr): try to normalize filenames
wjhsf Oct 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
276 changes: 163 additions & 113 deletions .github/workflows/web-test-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,34 @@ on:
pull_request:

env:
SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}}
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}}
GITHUB_RUN_ID: ${{github.run_id}}
COVERAGE: '1'
NODE_VERSION: '20.19.4'

defaults:
run:
working-directory: packages/@lwc/integration-not-karma

jobs:
# We run tests in parallel to speed up CI, with an arbitrary goal of ~20 minutes per job.
# Test grouping is also somewhat arbitrary.
# TODO: upload result artifacts

integration-tests:
name: Integration tests (${{ matrix.shadow_mode }} shadow)
name: Integration tests (${{ matrix.runs_on}}; ${{ matrix.shadow_mode }} shadow)
strategy:
matrix:
shadow_mode: [native, synthetic]
runs_on: [ubuntu-22.04, macos-15, windows-2025]

runs-on: ubuntu-22.04
runs-on: ${{ matrix.runs_on }}
env:
SAUCE_TUNNEL_ID: gha-${{github.run_id}}-wtr-integration-${{ matrix.shadow_mode }}-1
SHADOW_MODE_OVERRIDE: ${{ matrix.shadow_mode }}
defaults:
run:
working-directory: ./packages/@lwc/integration-not-karma

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
Expand All @@ -49,39 +47,43 @@ jobs:
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: yarn exec -- playwright install chrome firefox webkit --with-deps
- name: Install playwright dependencies
run: yarn playwright install chrome firefox webkit --with-deps
- run: 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
- name: DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE
run: yarn test || true
env:
DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE: 1
- name: DISABLE_STATIC_CONTENT_OPTIMIZATION
run: yarn test
env:
DISABLE_STATIC_CONTENT_OPTIMIZATION: 1
- name: ENABLE_ARIA_REFLECTION_GLOBAL_POLYFILL
run: yarn test
env:
ENABLE_ARIA_REFLECTION_GLOBAL_POLYFILL: 1
- name: NODE_ENV_FOR_TEST=production
run: yarn test
env:
NODE_ENV_FOR_TEST: production

integration-tests-api-versions:
name: Integration tests (${{ matrix.shadow_mode }} shadow) - API versions
name: Integration tests (${{ matrix.runs_on }}; ${{ matrix.shadow_mode }} shadow) - API versions
strategy:
matrix:
shadow_mode: [native, synthetic]
runs_on: [ubuntu-22.04, macos-15, windows-2025]

runs-on: ubuntu-22.04
runs-on: ${{ matrix.runs_on }}
env:
SAUCE_TUNNEL_ID: gha-${{github.run_id}}-wtr-integration-${{ matrix.shadow_mode }}-2
SHADOW_MODE_OVERRIDE: ${{ matrix.shadow_mode }}
defaults:
run:
working-directory: ./packages/@lwc/integration-not-karma

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
Expand All @@ -90,37 +92,49 @@ jobs:
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: yarn exec -- playwright install chrome firefox webkit --with-deps
- 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: API_VERSION=66 yarn test
- name: Install playwright dependencies
run: yarn playwright install chrome firefox webkit --with-deps
- name: API version 58
run: yarn test
env:
API_VERSION: 58
- name: API version 59
run: yarn test
env:
API_VERSION: 59
- name: API version 60
run: yarn test
env:
API_VERSION: 60
- name: API version 61
run: yarn test
env:
API_VERSION: 61
- name: API version 62
run: yarn test
env:
API_VERSION: 62
# No new features for API version 63-65
- name: API version 66
run: yarn test
env:
API_VERSION: 66

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: gha-${{github.run_id}}-wtr-integration-${{ matrix.shadow_mode }}-3
SHADOW_MODE_OVERRIDE: ${{ matrix.shadow_mode }}
defaults:
run:
working-directory: ./packages/@lwc/integration-not-karma
name: Integration tests (${{ matrix.runs_on }}; singleton batch)
strategy:
matrix:
runs_on: [ubuntu-22.04, macos-15, windows-2025]

runs-on: ${{ matrix.runs_on }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
Expand All @@ -129,38 +143,54 @@ jobs:
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: yarn exec -- playwright install chrome firefox webkit --with-deps
- name: Install playwright dependencies
run: yarn playwright install chrome firefox webkit --with-deps
# 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
- name: Slightly older browsers
run: yarn test || true
env:
LEGACY_BROWSERS: 1
- name: FORCE_NATIVE_SHADOW_MODE_FOR_TEST
run: yarn test
env:
FORCE_NATIVE_SHADOW_MODE_FOR_TEST: 1
- name: DISABLE_DETACHED_REHYDRATION
run: yarn test
env:
DISABLE_DETACHED_REHYDRATION: 1
- name: DISABLE_DETACHED_REHYDRATION DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE
run: yarn test || true
env:
DISABLE_DETACHED_REHYDRATION: 1
DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE: 1

# 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
- name: Native shadow DISABLE_SYNTHETIC_SHADOW_SUPPORT_IN_COMPILER
run: yarn test
env:
SHADOW_MODE_OVERRIDE: native
DISABLE_SYNTHETIC_SHADOW_SUPPORT_IN_COMPILER: 1
- name: Native shadow DISABLE_SYNTHETIC_SHADOW_SUPPORT_IN_COMPILER DISABLE_STATIC_CONTENT_OPTIMIZATION
run: yarn test
env:
SHADOW_MODE_OVERRIDE: native
DISABLE_STATIC_CONTENT_OPTIMIZATION: 1
DISABLE_SYNTHETIC_SHADOW_SUPPORT_IN_COMPILER: 1

hydration-tests-ssr-v2:
name: Hydration tests (SSR v2)
runs-on: ubuntu-22.04
env:
SAUCE_TUNNEL_ID: gha-${{github.run_id}}-wtr-hydration-1
defaults:
run:
working-directory: ./packages/@lwc/integration-not-karma
name: Hydration tests (${{ matrix.runs_on }}; SSR v2)
strategy:
matrix:
runs_on: [ubuntu-22.04, macos-15, windows-2025]

runs-on: ${{ matrix.runs_on }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
Expand All @@ -169,35 +199,42 @@ jobs:
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: yarn exec -- playwright install chrome firefox webkit --with-deps
- name: Install playwright dependencies
run: yarn playwright install chrome firefox webkit --with-deps
- 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
- name: Synthetic shadow
run: yarn test:hydration
env:
SHADOW_MODE_OVERRIDE: synthetic
- name: NODE_ENV_FOR_TEST=production
run: yarn test:hydration
env:
NODE_ENV_FOR_TEST: production
- name: DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE
run: yarn test:hydration
env:
DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE: 1
- name: DISABLE_STATIC_CONTENT_OPTIMIZATION
run: yarn test:hydration
env:
DISABLE_STATIC_CONTENT_OPTIMIZATION: 1

hydration-tests-engine-server:
name: Hydration tests (engine-server)
runs-on: ubuntu-22.04
name: Hydration tests (${{ matrix.runs_on }}; engine-server)
strategy:
matrix:
runs_on: [ubuntu-22.04, macos-15, windows-2025]

runs-on: ${{ matrix.runs_on }}
env:
SAUCE_TUNNEL_ID: gha-${{github.run_id}}-wtr-hydration-2
ENGINE_SERVER: 1
defaults:
run:
working-directory: ./packages/@lwc/integration-not-karma

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
Expand All @@ -206,19 +243,32 @@ jobs:
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: yarn exec -- playwright install chrome firefox webkit --with-deps
- name: Install playwright dependencies
run: yarn playwright install chrome firefox webkit --with-deps
# NOTE: All tests have ENGINE_SERVER=1 already set
- 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
- run: DISABLE_DETACHED_REHYDRATION=1 yarn test:hydration
- run: DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 DISABLE_DETACHED_REHYDRATION=1 yarn test:hydration
- name: Synthetic shadow
run: yarn test:hydration
env:
SHADOW_MODE_OVERRIDE: synthetic
- name: NODE_ENV_FOR_TEST=production
run: yarn test:hydration
env:
NODE_ENV_FOR_TEST: production
- name: DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE
run: yarn test:hydration
env:
DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE: 1
- name: DISABLE_STATIC_CONTENT_OPTIMIZATION
run: yarn test:hydration
env:
DISABLE_STATIC_CONTENT_OPTIMIZATION: 1
- name: DISABLE_DETACHED_REHYDRATION
run: yarn test:hydration
env:
DISABLE_DETACHED_REHYDRATION: 1
- name: DISABLE_DETACHED_REHYDRATION DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE
run: yarn test:hydration
env:
DISABLE_DETACHED_REHYDRATION: 1
DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE: 1
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"printWidth": 100,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "es5"
"trailingComma": "es5",
"endOfLine": "lf"
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,6 @@
"http-cache-semantics": "4.2.0",
"@types/estree": "^1.0.8"
},
"dependencies": {}
"dependencies": {},
"packageManager": "[email protected]"
}
2 changes: 1 addition & 1 deletion packages/@lwc/integration-not-karma/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Integration tests are simply `.spec.js` files that run in the browser. LWC compo

### Hydration Tests

Hydration tests test the SSR packages, and are therefore more complex than the integration tests. While the files are named `index.spec.js`, they are actually _config_ files. The actual test executed is defined in `test-hydration.js`, which also contains the interface definition for the config. Each hydration test is also expected to define an entrypoint component named `x/main`. The hydration tests are transformed by a plugin defined in `serve-hydration.js`.
Hydration tests test the SSR packages, and are therefore more complex than the integration tests. While the files are named `index.spec.js`, they are actually _config_ files. The actual test executed is defined in `test-hydration.js`, which also contains the interface definition for the config. Each hydration test is also expected to define an entrypoint component named `c/main`. The hydration tests are transformed by a plugin defined in `serve-hydration.js`.

## Design Goals

Expand Down
Loading