Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
f620a4a
Migrate wrappers e2e tests from TestCafe to Playwright
Aug 12, 2026
6213e22
Address review: validate port, read CI versions in docker script, doc…
Aug 12, 2026
8c224ab
Keep Chrome scrollbars visible and align the local container with the…
Aug 13, 2026
0632420
Upload the Playwright report and traces as separate CI artifacts, add…
Aug 16, 2026
8734d88
Shorten the artifact upload comment to the reason only
Aug 25, 2026
ca51622
Drop the artifact upload comment
Aug 25, 2026
15af875
Rewrite the wrappers static server as an ES module and drop minimist
Aug 27, 2026
e62c407
Trim the wrappers README to the three things it needs to answer
Aug 27, 2026
f827903
Trim the docker script to its usage line and drop redundant guards
Aug 27, 2026
ff9c146
Forward playwright arguments in the docker UI mode
Aug 27, 2026
8b908e3
Add the e2e/playwright package with the component test infrastructure
Aug 27, 2026
2173e1b
Fall back to the default theme and timezone when the matrix leaves th…
Aug 27, 2026
2c84240
Lint the new package in the lint workflow and keep its e2e run out of…
Aug 27, 2026
c8772f5
Run a theme job only on the tests that opted into that theme
Aug 27, 2026
2ab615b
Match the TestCafe semantics in the runner flags, the request mocks a…
Aug 27, 2026
9f0bf21
Name the workflow after Playwright, accept the "1 of 4" shard form an…
Aug 27, 2026
db2db0f
Use PivotGrid as the reference component instead of widgets another s…
Aug 28, 2026
a968a6f
Keep the Button and CheckBox models: the composite models build on them
Aug 28, 2026
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
1 change: 1 addition & 0 deletions .github/workflows/default_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
devextreme-react-storybook
devextreme-angular-playground
devextreme-testcafe-tests
devextreme-playwright-tests
devextreme-demos
devextreme-react-playground
devextreme-vue-playground
6 changes: 6 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ jobs:
DEBUG: eslint:cli-engine
run: pnpm exec nx lint

- name: Lint Playwright tests
working-directory: ./e2e/playwright
env:
DEBUG: eslint:cli-engine
run: pnpm exec nx lint

JS:
runs-on: devextreme-shr2
timeout-minutes: 60
Expand Down
321 changes: 321 additions & 0 deletions .github/workflows/playwright_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,321 @@
name: Playwright tests

concurrency:
group: wf-${{github.event.pull_request.number || github.sha}}-${{github.workflow}}
cancel-in-progress: true

on:
pull_request:
paths-ignore:
- 'apps/**/*.md'
merge_group:
workflow_dispatch:

env:
NX_SKIP_NX_CACHE: ${{ contains(github.event.pull_request.labels.*.name, 'skip-cache') && 'true' || 'false' }}
RUN_TESTS: true

jobs:
check-should-run:
name: Check if tests should run
runs-on: ubuntu-latest
outputs:
should-run: ${{ steps.check.outputs.should-run }}
styles-changed: ${{ steps.changes.outputs.styles }}
steps:
- uses: actions/checkout@v6
- name: Check RUN_TESTS flag
id: check
run: echo "should-run=${{ env.RUN_TESTS }}" >> $GITHUB_OUTPUT

- uses: dorny/paths-filter@v4
id: changes
with:
filters: |
styles:
- 'packages/devextreme-scss/scss/**'
- 'packages/devextreme-scss/icons/**'
- 'packages/devextreme-scss/images/**'
- 'packages/devextreme-scss/fonts/**'
- 'packages/devextreme/js/**/themes/**'
- 'e2e/playwright/helpers/accessibility/**'

build:
name: Build DevExtreme
needs: check-should-run
if: needs.check-should-run.outputs.should-run == 'true'

runs-on: devextreme-shr2
timeout-minutes: 15

steps:
- name: Get sources
uses: actions/checkout@v6

- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: '.node-version'

- uses: pnpm/action-setup@v6
with:
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v5
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-cache

- uses: actions/cache@v5
name: Setup nx cache
with:
path: |
.nx/cache
.nx/workspace-data/*.db
.nx/workspace-data/*.db-wal
.nx/workspace-data/*.db-shm
key: ${{ runner.os }}-nx-v2-${{ github.workflow }}-${{ github.job }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-nx-v2-${{ github.workflow }}-${{ github.job }}-${{ github.sha }}-
${{ runner.os }}-nx-v2-${{ github.workflow }}-${{ github.job }}-
${{ runner.os }}-nx-v2-

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

- name: Build
shell: bash
env:
NODE_OPTIONS: --max-old-space-size=8192
run: |
pnpm exec nx build devextreme-scss
pnpm exec nx build devextreme -c testing

- name: Zip artifacts
working-directory: ./packages/devextreme
run: |
7z a -tzip -mx3 -mmt2 artifacts.zip artifacts ../devextreme-scss/scss/bundles

- name: Upload build artifacts
uses: actions/upload-artifact@v7
with:
name: devextreme-artifacts-playwright
path: ./packages/devextreme/artifacts.zip
retention-days: 1

determine-playwright-matrix:
runs-on: ubuntu-latest
name: Determine Playwright matrix
needs: check-should-run
if: needs.check-should-run.outputs.should-run == 'true'
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}

steps:
- name: Build matrix
id: matrix
run: |
base_matrix_start=$(cat <<'JSON'
[
{ "componentFolder": "accessibility", "name": "accessibility", "concurrency": 6 }
]
JSON
)

base_matrix_end=$(cat <<'JSON'
[
{ "componentFolder": "common", "name": "common", "concurrency": 3 },

{ "name": "generic", "theme": "generic.light", "concurrency": 2 },
{ "name": "material", "theme": "material.blue.light", "concurrency": 2 },
{ "name": "material - compact", "theme": "material.blue.light.compact", "concurrency": 2 },

{ "componentFolder": "cardView", "name": "cardView" },
{ "componentFolder": "dataGrid", "name": "dataGrid (1/4)", "indices": "1/4", "concurrency": 5 },
{ "componentFolder": "dataGrid", "name": "dataGrid (2/4)", "indices": "2/4", "concurrency": 5 },
{ "componentFolder": "dataGrid", "name": "dataGrid (3/4)", "indices": "3/4", "concurrency": 5 },
{ "componentFolder": "dataGrid", "name": "dataGrid (4/4)", "indices": "4/4", "concurrency": 5 },

{ "componentFolder": "editors", "name": "editors" },
{ "componentFolder": "navigation", "name": "navigation", "concurrency": 6 },

{ "componentFolder": "scheduler/common", "name": "scheduler / common (1/3)", "indices": "1/3", "concurrency": 6 },
{ "componentFolder": "scheduler/common", "name": "scheduler / common (2/3)", "indices": "2/3", "concurrency": 6 },
{ "componentFolder": "scheduler/common", "name": "scheduler / common (3/3)", "indices": "3/3", "concurrency": 6 },
{ "componentFolder": "scheduler/viewOffset", "name": "scheduler / viewOffset (1/2)", "indices": "1/2", "concurrency": 4 },
{ "componentFolder": "scheduler/viewOffset", "name": "scheduler / viewOffset (2/2)", "indices": "2/2", "concurrency": 4 },
{ "componentFolder": "scheduler/timezones", "name": "scheduler / timezones (Europe/Berlin)", "timezone": "Europe/Berlin" },
{ "componentFolder": "scheduler/timezones", "name": "scheduler / timezones (America/Los_Angeles)", "timezone": "America/Los_Angeles" }
]
JSON
)

style_dependent_matrix=$(cat <<'JSON'
[
{ "componentFolder": "accessibility", "name": "accessibility - fluent.dark", "theme": "fluent.blue.dark", "concurrency": 6 },
{ "componentFolder": "accessibility", "name": "accessibility - material.light", "theme": "material.blue.light", "concurrency": 6 },
{ "componentFolder": "accessibility", "name": "accessibility - material.dark", "theme": "material.blue.dark", "concurrency": 6 }
]
JSON
)

matrix=$(jq -c -n \
--argjson baseStart "$base_matrix_start" \
--argjson baseEnd "$base_matrix_end" \
--argjson styleDependent "$style_dependent_matrix" \
--arg stylesChanged "${{ needs.check-should-run.outputs.styles-changed }}" \
'{ include: ($baseStart + (if $stylesChanged == "true" then $styleDependent else [] end) + $baseEnd) }')

echo "matrix=$matrix" >> $GITHUB_OUTPUT

playwright:
name: ${{ matrix.name }}${{ !matrix.theme && ' - fluent' || '' }}
if: |
needs.check-should-run.outputs.should-run == 'true' &&
needs.determine-playwright-matrix.result == 'success' &&
needs.build.result == 'success'
needs: [check-should-run, build, determine-playwright-matrix]
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.determine-playwright-matrix.outputs.matrix) }}
runs-on: devextreme-shr2
timeout-minutes: 45

steps:
- name: Get sources
uses: actions/checkout@v6

- name: Download artifacts
uses: actions/download-artifact@v8
with:
name: devextreme-artifacts-playwright
path: ./packages/devextreme

- name: Unpack artifacts
working-directory: ./packages/devextreme
run: 7z x artifacts.zip -aoa

- name: Setup Chrome
uses: ./.github/actions/setup-chrome
with:
chrome-version: '150.0.7871.181'

- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: '.node-version'

- uses: pnpm/action-setup@v6
with:
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache/restore@v5
name: Restore pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-cache

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

- name: Run Playwright tests
working-directory: ./e2e/playwright
env:
NODE_OPTIONS: --max-old-space-size=8192
# The browser context takes the timezone, so the agent clock is left alone.
TIMEZONE: ${{ matrix.timezone }}
run: |
THEME="--theme ${{ matrix.theme || 'fluent.blue.light' }}"
[ "${{ matrix.componentFolder }}" != "" ] && COMPONENT_FOLDER="--componentFolder ${{ matrix.componentFolder }}"
[ "${{ matrix.indices }}" != "" ] && INDICES="--indices ${{ matrix.indices }}"
[ "${{ matrix.concurrency }}" != "" ] && CONCURRENCY="--concurrency ${{ matrix.concurrency }}"
all_args="$COMPONENT_FOLDER $CONCURRENCY $INDICES $THEME"
echo "$all_args"
pnpm run test $all_args

- name: Sanitize job name
if: ${{ always() }}
run: echo "JOB_NAME=$(echo "${{ matrix.name }}" | tr '/' '-')" >> $GITHUB_ENV

- name: Upload test report
if: ${{ failure() }}
uses: actions/upload-artifact@v7
with:
name: playwright-report-${{ env.JOB_NAME }}
path: ${{ github.workspace }}/e2e/playwright/artifacts/playwright-report
if-no-files-found: ignore

- name: Upload test traces and screenshot diffs
if: ${{ failure() }}
uses: actions/upload-artifact@v7
with:
name: playwright-traces-${{ env.JOB_NAME }}
path: ${{ github.workspace }}/e2e/playwright/artifacts/test-results
if-no-files-found: ignore

merge-artifacts:
runs-on: ubuntu-latest
needs: [playwright]
if: ${{ always() }}

steps:
- name: Detect mergeable artifacts
id: mergeable-artifacts
uses: actions/github-script@v9
with:
script: |
const artifacts = await github.paginate(github.rest.actions.listWorkflowRunArtifacts, {
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.runId,
per_page: 100,
});

const artifactGroups = {
reports: /^playwright-report-/,
traces: /^playwright-traces-/,
};

for (const [outputName, pattern] of Object.entries(artifactGroups)) {
const names = artifacts
.map((artifact) => artifact.name)
.filter((name) => pattern.test(name));

core.setOutput(outputName, names.length > 0 ? 'true' : 'false');
core.info(`${outputName}: ${names.length ? names.join(', ') : '(none)'}`);
}

- name: Merge test reports
if: steps.mergeable-artifacts.outputs.reports == 'true'
uses: actions/upload-artifact/merge@v7
continue-on-error: true
with:
name: playwright-reports
pattern: playwright-report-*
separate-directories: true
delete-merged: true

- name: Merge test traces
if: steps.mergeable-artifacts.outputs.traces == 'true'
uses: actions/upload-artifact/merge@v7
continue-on-error: true
with:
name: playwright-traces
pattern: playwright-traces-*
separate-directories: true
delete-merged: true
20 changes: 11 additions & 9 deletions .github/workflows/wrapper_tests_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,20 +170,22 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Start server for ${{ matrix.framework }}
working-directory: e2e/wrappers
run: |
pnpm run start:${{ matrix.framework }} &
sleep 10

- name: Run tests for ${{ matrix.framework }}
working-directory: e2e/wrappers
run: pnpm run test:${{ matrix.framework }}

- name: Upload test artifacts on failure
- name: Upload test report on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v7
with:
name: playwright-report-${{matrix.framework}}
path: e2e/wrappers/playwright-report
if-no-files-found: ignore

- name: Upload test traces on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v7
with:
name: test-fails-${{matrix.framework}}
path: e2e/wrappers/screenshots
name: playwright-traces-${{matrix.framework}}
path: e2e/wrappers/test-results
if-no-files-found: ignore
1 change: 0 additions & 1 deletion apps/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"webpack-dev-server": "5.2.6"
},
"scripts": {
"test": "node runner.js",
"start": "webpack-dev-server",
"build": "webpack"
},
Expand Down
1 change: 0 additions & 1 deletion apps/react/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"!{projectRoot}/public/js/app/bundle*",
"{projectRoot}/*.tsx",
"{projectRoot}/*.js",
"!{projectRoot}/test.js",
"{projectRoot}/tsconfig.json",
"{workspaceRoot}/tsconfig.json"
],
Expand Down
Loading
Loading