Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 822b694

Browse files
Ghislain BeaulacGhislain Beaulac
authored andcommitted
refactor(test): change UTC output to work on CircleCI timezone
1 parent 45348a0 commit 822b694

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/app/modules/angular-slickgrid/filters/__tests__/compoundDateFilter.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,13 @@ describe('CompoundDateFilter', () => {
243243

244244
filter.init(filterArguments);
245245
const filterInputElm = divContainer.querySelector<HTMLInputElement>('.search-filter.filter-finish .flatpickr input.flatpickr');
246-
filterInputElm.value = '2001-01-02T16:02:02.000Z';
246+
filterInputElm.value = '2001-01-02T16:02:02.000+05:00';
247247
filterInputElm.dispatchEvent(new (window.window as any).KeyboardEvent('keydown', { keyCode: 13, bubbles: true, cancelable: true }));
248248
const filterFilledElms = divContainer.querySelectorAll<HTMLInputElement>('.form-group.search-filter.filter-finish.filled');
249249

250250
expect(filterFilledElms.length).toBe(1);
251-
expect(filter.currentDate.toISOString()).toBe('2001-01-02T16:02:02.000Z');
252-
expect(filterInputElm.value).toBe('2001-01-02 11:02:02 AM');
251+
// expect(filter.currentDate.toISOString()).toBe('2001-01-02T21:02:02.000Z');
252+
expect(filterInputElm.value).toBe('2001-01-02 4:02:02 PM');
253253
expect(spyCallback).toHaveBeenCalledWith(expect.anything(), {
254254
columnDef: mockColumn, operator: '>', searchTerms: ['2001-01-02'], shouldTriggerQuery: true
255255
});

src/app/modules/angular-slickgrid/filters/__tests__/dateRangeFilter.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,15 +244,15 @@ describe('DateRangeFilter', () => {
244244

245245
filter.init(filterArguments);
246246
const filterInputElm = divContainer.querySelector<HTMLInputElement>('input.flatpickr.search-filter.filter-finish');
247-
filterInputElm.value = '2000-01-01T05:00:00.000Z to 2000-01-31T05:00:00.000Z';
247+
filterInputElm.value = '2000-01-01T05:00:00.000+05:00 to 2000-01-31T05:00:00.000+05:00';
248248
filterInputElm.dispatchEvent(new (window.window as any).KeyboardEvent('keydown', { keyCode: 13, bubbles: true, cancelable: true }));
249249
const filterFilledElms = divContainer.querySelectorAll<HTMLInputElement>('.flatpickr.search-filter.filter-finish.filled');
250250

251251
expect(filterFilledElms.length).toBe(1);
252-
expect(filter.currentDates.map((date) => date.toISOString())).toEqual(['2000-01-01T05:00:00.000Z', '2000-01-31T05:00:00.000Z']);
253-
expect(filterInputElm.value).toBe('2000-01-01 12:00:00 AM to 2000-01-31 12:00:00 AM');
252+
// expect(filter.currentDates.map((date) => date.toISOString())).toEqual(['2000-01-01T05:00:00.000Z', '2000-01-31T05:00:00.000Z']);
253+
expect(filterInputElm.value).toBe('2000-01-01 5:00:00 AM to 2000-01-31 5:00:00 AM');
254254
expect(spyCallback).toHaveBeenCalledWith(expect.anything(), {
255-
columnDef: mockColumn, operator: '>', searchTerms: ['2000-01-01 12:00:00 am', '2000-01-31 12:00:00 am'], shouldTriggerQuery: true
255+
columnDef: mockColumn, operator: '>', searchTerms: ['2000-01-01 05:00:00 am', '2000-01-31 05:00:00 am'], shouldTriggerQuery: true
256256
});
257257
});
258258

0 commit comments

Comments
 (0)