Skip to content

Commit

Permalink
T1243679 test case
Browse files Browse the repository at this point in the history
  • Loading branch information
tongsonbarbs committed Jul 23, 2024
1 parent c33a98a commit 6fb2e92
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions e2e/testcafe-devextreme/tests/scheduler/workSpace.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ClientFunction } from 'testcafe';
import { createScreenshotsComparer } from 'devextreme-screenshot-comparer';
import Scheduler, { CLASS } from 'devextreme-testcafe-models/scheduler';
import Button from 'devextreme-testcafe-models/button';
import { extend } from 'devextreme/core/utils/extend';
import { createWidget } from '../../helpers/createWidget';
import url from '../../helpers/getPageUrl';
Expand Down Expand Up @@ -360,3 +361,40 @@ test('[T716993]: should has horizontal scrollbar with multiple resources and fix
}).after(async () => {
await removeStylesheetRulesFromPage();
});

test('Scheduler appointments should change color on update resources', async (t) => {
await t.wait(2000);

await t.eval(() => {
// @ts-expect-error instance
const schedulerWidget = $('#container').dxScheduler('instance');
schedulerWidget.option('resources', [{
fieldExpr: 'resource',
dataSource: [{ id: 1, text: 'new res 1', color: 'pink' }],
}]);
schedulerWidget.getDataSource().reload();
});

const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
await takeScreenshot('scheduler-appointments-should-update-color.png');
await t.expect(compareResults.isValid()).ok(compareResults.errorMessages());
}).before(async () => {
await createWidget('dxScheduler', {
timeZone: 'America/Los_Angeles',
dataSource: [{
text: 'Website Re-Design Plan',
startDate: new Date('2021-03-29T16:30:00.000Z'),
endDate: new Date('2021-03-29T18:30:00.000Z'),
resource: 1,
}],
views: ['week', 'month'],
currentView: 'week',
currentDate: new Date(2021, 2, 28),
startDayHour: 9,
height: 730,
resources: [{
fieldExpr: 'resource',
dataSource: [{ id: 1, text: 'res 1', color: 'red' }],
}],
});
});

0 comments on commit 6fb2e92

Please sign in to comment.