Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 0 additions & 163 deletions .github/workflows/web-test-runner.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Smoke Test Windows

on:
push:
branches:
- master
- release
- 'spring*'
- 'summer*'
- 'winter*'
pull_request:

env:
COVERAGE: '1'

jobs:
smoke-test-windows:
runs-on: windows-2025
steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '20.19.4'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run unit tests
run: yarn test run

- name: Get installed playwright version
id: playwright-version
run: |
version="$(yarn --silent --json list --depth 0 playwright 2>/dev/null | jq -r '.data.trees[0].name|split("@")[1]')"
echo "version=$version" >> "$GITHUB_OUTPUT"

- name: Restore playwright cache
uses: actions/cache@v4
id: playwright-cache
with:
path: ~\AppData\Local\ms-playwright
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}

- name: Install playwright dependencies
id: install-playwright
continue-on-error: true
run: yarn playwright install chromium --with-deps
timeout-minutes: 3 # Sometimes seems to just hang forever? :|

# If installing playwright times out, wait 1 minute then try again
- name: Install playwright dependencies
if: ${{ steps.install-playwright.outcome != 'success' }}
run: sleep 60 && yarn playwright install chromium --with-deps
timeout-minutes: 4

- name: Run integration tests
run: yarn test || yarn test
env:
BROWSERS: chromium
working-directory: packages/@lwc/integration-not-karma
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async function compileFixture({
.join('-') || 'default';
const modulesDir = path.resolve(dirname, './modules');
const outputFile = path.resolve(dirname, `./dist/compiled-${optionsAsString}.js`);
const input = 'virtual/fixture/test.js';
const input = path.normalize('virtual/fixture/test.js');

const bundle = await rollup({
input,
Expand Down
2 changes: 2 additions & 0 deletions packages/@lwc/integration-not-karma/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Environment variables are used as controls to run tests in different modes (e.g

By default, the tests are run using Playwright. If the `USE_SAUCE` env var is set, then SauceLabs is used instead. To use SauceLabs, the `SAUCE_USERNAME`, `SAUCE_ACCESS_KEY`, and `SAUCE_TUNNEL_ID` env vars must be set.

To run tests in a specific browser, rather than the defaults specified, set the `BROWSERS` env var.

### Integration Tests

Integration tests are simply `.spec.js` files that run in the browser. LWC components are transformed by a plugin defined in `serve-integration.js`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ export function getBrowsers(options) {
}),
];
} else {
return [
playwrightLauncher({ product: 'chromium' }),
playwrightLauncher({ product: 'firefox' }),
playwrightLauncher({ product: 'webkit' }),
];
const browsers = options.BROWSERS?.split(',') ?? ['chromium', 'firefox', 'webkit'];
return browsers.map((product) => playwrightLauncher({ product }));
}
}
31 changes: 9 additions & 22 deletions packages/@lwc/integration-not-karma/helpers/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ import { HIGHEST_API_VERSION } from '@lwc/shared';

// --- Boolean test flags --- //

/** Run SauceLabs tests using only "legacy" browsers. */
export const LEGACY_BROWSERS = Boolean(process.env.LEGACY_BROWSERS);

/** Force tests to run in native shadow mode with synthetic shadow polyfill patches. */
export const FORCE_NATIVE_SHADOW_MODE_FOR_TEST = Boolean(
process.env.FORCE_NATIVE_SHADOW_MODE_FOR_TEST
Expand Down Expand Up @@ -58,28 +55,16 @@ export const API_VERSION = process.env.API_VERSION
/** The `NODE_ENV` to set for tests (at runtime, in the browser). */
export const NODE_ENV_FOR_TEST = process.env.NODE_ENV_FOR_TEST || 'development';

/** Unique directory name that encodes the flags that the tests were executed with. */
export const COVERAGE_DIR_FOR_OPTIONS =
Object.entries({
API_VERSION,
DISABLE_STATIC_CONTENT_OPTIMIZATION,
SHADOW_MODE_OVERRIDE,
DISABLE_SYNTHETIC_SHADOW_SUPPORT_IN_COMPILER,
ENABLE_ARIA_REFLECTION_GLOBAL_POLYFILL,
FORCE_NATIVE_SHADOW_MODE_FOR_TEST,
LEGACY_BROWSERS,
NODE_ENV_FOR_TEST,
DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE,
ENGINE_SERVER,
DISABLE_DETACHED_REHYDRATION,
})
.filter(([, val]) => val)
.map(([key, val]) => `${key}=${val}`)
.join('/') || 'no-options';
/**
* Comma-delimited list of browser names to run with Playwright.
* Possible values are `chromium`, `firefox`, and `webkit`.
* Ignored if the `USE_SAUCE` env var is set.
*/
export const BROWSERS = process.env.BROWSERS;

// --- CI config --- //

/** Whether or not to report coverage. Currently unused. */
/** Whether or not to report coverage. */
export const COVERAGE = Boolean(process.env.COVERAGE);
/** Whether or not we're running in CI. */
export const CI = Boolean(process.env.CI);
Expand All @@ -102,3 +87,5 @@ export const {
/** SauceLabs tunnel ID. */
SAUCE_TUNNEL_ID,
} = process.env;
/** Run SauceLabs tests using only "legacy" browsers. */
export const LEGACY_BROWSERS = Boolean(process.env.LEGACY_BROWSERS);
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async function compileFixture({
}) {
const modulesDir = path.resolve(dirname, './modules');
const outputFile = path.resolve(dirname, './dist/compiled-experimental-ssr.js');
const input = 'virtual/fixture/test.js';
const input = path.normalize('virtual/fixture/test.js');

const bundle = await rollup({
input,
Expand Down
Loading