Skip to content

Scheduler: migrate the timezones e2e tests to Playwright - #36071

Draft
ajivanyandev wants to merge 3 commits into
DevExpress:mainfrom
ajivanyandev:scheduler-playwright-timezones
Draft

ajivanyandev wants to merge 3 commits into
DevExpress:mainfrom
ajivanyandev:scheduler-playwright-timezones

Conversation

@ajivanyandev

@ajivanyandev ajivanyandev commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Part 1 of 3 of the Scheduler e2e migration to Playwright (devextreme-private#4939). The other two parts follow in this order: scheduler/viewOffset, then scheduler/common.

What changes

Tests

  • tests/scheduler/timezones (6 files, 79 tests) is ported to e2e/playwright. The tests and screenshot names are the same as in TestCafe.
  • The TestCafe tests, their 48 etalons, and the two TestCafe timezone jobs are removed.
  • The Berlin job runs 40 tests and the Los Angeles job runs 39. That matches what TestCafe ran per job.

Shared infrastructure (@aleksei-semikozov, please review this part)

  • playwright.config.ts sets process.env.TZ to the job timezone.
    • TestCafe shared one machine clock between Node and the browser. The tests build local dates on both sides, for example currentDate: new Date(2021, 2, 1), so both sides need the same zone.
    • This also keeps a timezone that an earlier TestCafe job left on a shared agent out of the run.
    • timezones/check.spec.ts now checks the Node side as well as the browser.
  • createWidget accepts { arg } and passes it to the factory. Handlers that need test variables can use it. Existing calls are unaffected.
  • New helpers:
    • helpers/dragUtils.ts: t.drag/t.dragToElement semantics, i.e. the grab offset, scrolling into view, whole-pixel points and a stepped move.
    • helpers/timezones.ts: getTimezoneTest.
    • helpers/generateOptionMatrix.ts.
  • models/scheduler: only the members these tests use. It will grow with the next two parts.
  • Etalons from CI. A test without an etalon fails, and Playwright writes what it rendered in the etalon's place. The workflow now collects those files at their repository paths into a playwright-etalons artifact. The README explains how to use it.

Notes for the Scheduler team

  • Duplicate titles. Playwright rejects tests with the same title, so the titles now include the loop parameters (offset, view). In dragAndDropDst, the Los Angeles winter case was labelled summer, which also made two titles collide; it is now winter.
  • The height check in dragAndDropDst is dropped.
    • The TestCafe test compared the appointment height with its initial value. Both values came from the same Selector promise, which TestCafe resolves only once, so the check compared a value with itself.
    • Measured for real, an appointment dropped at 01:00 on the spring-forward day spans the 01:00 and 02:00 rows (50px rather than 25px). This affects Berlin and Los Angeles, offsets 0 and -360.
    • All position assertions are kept and pass. Is the 50px rendering intended?

Etalons

The CI run of this PR recorded 96 etalons: 48 fluent and 48 fluent-next. They pair 1:1 with the deleted TestCafe ones.

  • Every pair differs in the last pixel row, because the two runners crop differently.
  • The six summer week_usual-appts-render-dts fluent images also differ in the appointment date text. Scheduler: appointment title and date do not reach the AA contrast ratio #35089 darkened that text but never re-shot these TestCafe etalons; TestCafe's lenient comparer still let them pass. The new etalons show the current, correct render.

Test plan

  • lint and type-check pass for e2e/playwright.
  • Locally with --ignore-snapshots: 40 passed in Europe/Berlin, 39 passed in America/Los_Angeles, and all 79 skipped in GMT. The PivotGrid specs still pass.
  • Etalons recorded by CI, committed and reviewed against the TestCafe ones.
  • 5 consecutive green runs of the 4 timezone jobs (Berlin and Los Angeles × fluent and fluent-next). That is 790 test executions with 0 failures.

Stage 3 of the Playwright migration, part 1 of the Scheduler tests (devextreme-private#4939).

- Port tests/scheduler/timezones (6 files, 79 tests) to e2e/playwright and delete the TestCafe
  tests, their etalons and their two TestCafe jobs.
- Add the Scheduler models the ported tests use, a drag helper with the t.drag/t.dragToElement
  semantics, the timezone test gate and generateOptionMatrix.
- Point the Node timezone at the browser one, since the tests build local dates on both sides.
- Let a createWidget factory take an argument, for handlers that need test variables.
- Upload the etalons a CI run writes for new tests as the playwright-etalons artifact.
…t-timezones

# Conflicts:
#	.github/CODEOWNERS
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/day_usual-appts-start-cell-dts_t-America-Los_Angeles-summer_offset--60 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/day_usual-appts-start-cell-dts_t-America-Los_Angeles-summer_offset-0 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/day_usual-appts-start-cell-dts_t-America-Los_Angeles-summer_offset-60 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/day_usual-appts-start-cell-dts_t-America-Los_Angeles-winter_offset--60 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/day_usual-appts-start-cell-dts_t-America-Los_Angeles-winter_offset-0 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/day_usual-appts-start-cell-dts_t-America-Los_Angeles-winter_offset-60 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/day_usual-appts-start-cell-dts_t-Europe-Berlin-summer_offset--60 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/day_usual-appts-start-cell-dts_t-Europe-Berlin-summer_offset-0 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/day_usual-appts-start-cell-dts_t-Europe-Berlin-summer_offset-60 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/day_usual-appts-start-cell-dts_t-Europe-Berlin-winter_offset--60 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/day_usual-appts-start-cell-dts_t-Europe-Berlin-winter_offset-0 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/day_usual-appts-start-cell-dts_t-Europe-Berlin-winter_offset-60 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-America-Los_Angeles-summer-local_offset--360 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-America-Los_Angeles-summer-local_offset-0 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-America-Los_Angeles-summer-local_offset-360 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-America-Los_Angeles-summer-utc_offset--360 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-America-Los_Angeles-summer-utc_offset-0 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-America-Los_Angeles-summer-utc_offset-360 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-America-Los_Angeles-winter-local_offset--360 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-America-Los_Angeles-winter-local_offset-0 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-America-Los_Angeles-winter-local_offset-360 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-America-Los_Angeles-winter-utc_offset--360 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-America-Los_Angeles-winter-utc_offset-0 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-America-Los_Angeles-winter-utc_offset-360 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-Europe-Berlin-summer-local_offset--360 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-Europe-Berlin-summer-local_offset-0 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-Europe-Berlin-summer-local_offset-360 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-Europe-Berlin-summer-utc_offset--360 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-Europe-Berlin-summer-utc_offset-0 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-Europe-Berlin-summer-utc_offset-360 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-Europe-Berlin-winter-local_offset--360 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-Europe-Berlin-winter-local_offset-0 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-Europe-Berlin-winter-local_offset-360 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-Europe-Berlin-winter-utc_offset--360 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-Europe-Berlin-winter-utc_offset-0 (fluent.blue.light).png
#	e2e/testcafe-devextreme/tests/scheduler/timezones/etalons/week_appts-render-cross-dts_t-Europe-Berlin-winter-utc_offset-360 (fluent.blue.light).png
Recorded by CI (run 41435087508) in fluent.blue.light and fluent-next.blue.light. Against the
deleted TestCafe etalons every image differs only in its last pixel row (the two runners crop
differently), and the 6 summer week_usual-appts-render-dts fluent images also in the appointment
date text: DevExpress#35089 darkened it but did not re-shoot those TestCafe etalons.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant