Scheduler: QUnit tests: ensure compatibility with Fluent and drop Generic theme testing#32470
Scheduler: QUnit tests: ensure compatibility with Fluent and drop Generic theme testing#32470aleksei-semikozov wants to merge 23 commits intoDevExpress:26_1from
Conversation
…cheduler tests and adjust width assertions
…cheduler tests and update expected values
…t values in virtual scrolling month view tests
…ration in scheduler tests
…ues in scheduler tests
…ion values in timeline tests
…alues in grouping by date tests
…positions in scheduler tests
…position values in layout manager tests
…position values in contentReadyEvent tests
…osition values in DateTime indicator tests
There was a problem hiding this comment.
Pull request overview
This PR updates DevExtreme QUnit integration tests to stop relying on the removed generic_light theme by switching them to fluent_blue_light, and re-baselines size/position assertions (widths/heights/offsets) affected by the theme change.
Changes:
- Replaced
generic_light.css!imports withfluent_blue_light.css!across Scheduler, PivotGrid, and Knockout Scheduler tests. - Updated many pixel-based expectations (sizes/positions/scroll offsets/rects) to match Fluent theme rendering.
- Adjusted a few test setups/options (e.g.,
maxAppointmentsPerCell, container sizes) to keep scenarios stable under the new theme.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/workSpaceWithHorizontalScroll.tests.js | Switch theme import and update workspace width expectations for Fluent. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/workSpace.week.tests.js | Switch theme import and update visible bounds expectations under Fluent. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/workSpace.month.tests.js | Switch theme import and update group header height/width assertions. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/workSpace.base.tests.js | Switch theme import and update min-width expectations. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/workSpace.api.tests.js | Switch theme import and update coordinate-based index tests. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/virtual_scrolling.timeline.tests.js | Switch theme import and re-baseline expected rect positions. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/virtual_scrolling.monthView.tests.js | Switch theme import and re-baseline virtual scrolling rect expectations (including some empty expected sets). |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/virtual_scrolling.integration.tests.js | Switch theme import and re-baseline integration virtual scrolling expectations (rects/indices/settings). |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/timezones.tests.js | Switch theme import and update expected popup positioning. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/timeline.tests.js | Switch theme import and update scroll sync and cell height-related expectations. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/subscribes.tests.js | Switch theme import and update expected appointment coordinates. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/pacificTime.tests.js | Switch theme import and update DST-related position/selection/count assertions. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/layoutManager.tests.js | Switch theme import; re-baseline many appointment sizing/position assertions; adjust some maxAppointmentsPerCell usage. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/currentTimeIndicator.tests.js | Switch theme import and re-baseline shader/indicator size/position assertions. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/contentReadyEvent.tests.js | Switch theme import and update expected appointment render positions. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.tests.js | Switch theme import; update test setup options and default cell height expectations. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.initialization.tests.js | Switch theme import for initialization tests. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.week.based.views.tests.js | Switch theme import and update expected appointment coordinates for integration scenarios. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.timeLines.tests.js | Switch theme import and update appointment top offset constant. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.templates.tests.js | Switch theme import and adjust template test case options for Fluent behavior. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.scroll.tests.js | Switch theme import and adjust viewport sizing for scroll scenario stability. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.monthView.tests.js | Switch theme import; update offsets and appointment layout expectations in month view. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/allDayAppointments.common-1.tests.js | Switch theme import and update all-day appointment positioning assertions. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/allDayAppointments.common-0.tests.js | Switch theme import; adjust max-per-cell related assertions and dropdown behavior expectations. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/pivotGrid.tests.js | Switch theme import; update multiple size/scrolling/virtualization expectations for Fluent. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/export.tests.js | Switch theme import and adjust icon-size assertion logic for Fluent. |
| packages/devextreme/testing/tests/DevExpress.knockout/scheduler.tests.js | Switch theme require and adjust KO scheduler collector scenario data/setup. |
| import { getTimeZones } from 'time_zone_utils'; | ||
|
|
||
| import { createWrapper, initTestMarkup } from '../../helpers/scheduler/helpers.js'; | ||
| import { createWrapper, initTestMarkup, moveSchedulerToMainBlock } from '../../helpers/scheduler/helpers.js'; |
There was a problem hiding this comment.
moveSchedulerToMainBlock is imported but never used in this file. This will typically fail linting (unused import); please remove it or use it where intended.
| type: 'month', | ||
| name: 'MONTH', | ||
| maxAppointmentsPerCell: 'auto' | ||
| maxAppointmentsPerCell: '2' |
There was a problem hiding this comment.
maxAppointmentsPerCell expects a number or one of the string literals 'auto' | 'unlimited'. Passing '2' as a string is an invalid option type and can cause runtime/type issues; use a numeric value instead.
| maxAppointmentsPerCell: '2' | |
| maxAppointmentsPerCell: 2 |
| import executeAsyncMock from '../../helpers/executeAsyncMock.js'; | ||
| import { checkDxFontIcon, DX_ICON_XLSX_FILE_CONTENT_CODE } from '../../helpers/checkDxFontIconHelper.js'; | ||
| import { DX_ICON_XLSX_FILE_CONTENT_CODE } from '../../helpers/checkDxFontIconHelper.js'; | ||
|
|
||
| import 'ui/pivot_grid/ui.pivot_grid'; | ||
| import 'generic_light.css!'; | ||
| import 'fluent_blue_light.css!'; | ||
|
|
||
| function checkDxFontIcon(assert, dxIconSelector, expectedIconCode) { | ||
| const FLUENT_BASE_ICON_SIZE = 20; | ||
|
|
||
| const iconBeforeElementStyle = getComputedStyle($(dxIconSelector).get(0), ':before'); | ||
| assert.strictEqual(iconBeforeElementStyle.content.charCodeAt(1), expectedIconCode, `icon code (${dxIconSelector})`); | ||
| const iconElementStyle = getComputedStyle($(dxIconSelector).get(0)); | ||
| assert.strictEqual(iconElementStyle.width, FLUENT_BASE_ICON_SIZE + 'px', `icon element width (${dxIconSelector})`); | ||
| assert.strictEqual(iconElementStyle.height, FLUENT_BASE_ICON_SIZE + 'px', `icon element height (${dxIconSelector})`); | ||
| } |
There was a problem hiding this comment.
This file redefines checkDxFontIcon, duplicating logic from the shared testing/helpers/checkDxFontIconHelper.js. To avoid divergence across tests, consider updating the shared helper to support Fluent icon sizing (or accept a base-size parameter) and keep using the shared helper here.
|
|
||
| scheduler.instance.option('dataSource', items); | ||
| await waitForAsync(() => scheduler.appointments.getAppointments().length === 3); | ||
| // moveSchedulerToMainBlock(); |
There was a problem hiding this comment.
Leftover commented-out call (// moveSchedulerToMainBlock();) looks like debugging scaffolding. Please remove it to keep the test clean and avoid confusion about required setup.
| // moveSchedulerToMainBlock(); |
No description provided.