mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
ACS-7747 Fix flaky test (#10131)
* ACS-7747 Fix flaky test * ACS-7747 Fix flaky test, apply pr remark
This commit is contained in:
@@ -176,9 +176,7 @@ describe('SearchDateRangeComponent', () => {
|
|||||||
expect(component.form.controls.betweenEndDate.errors.invalidDate).toBeTrue();
|
expect(component.form.controls.betweenEndDate.errors.invalidDate).toBeTrue();
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: very flaky test, to be refactored
|
it('should not be able to select a date after the max date when selecting the BETWEEN option', async () => {
|
||||||
// eslint-disable-next-line ban/ban
|
|
||||||
xit('should not be able to select a date after the max date when selecting the BETWEEN option', async () => {
|
|
||||||
component.form.controls.dateRangeType.setValue(component.DateRangeType.BETWEEN);
|
component.form.controls.dateRangeType.setValue(component.DateRangeType.BETWEEN);
|
||||||
component.maxDate = 'today';
|
component.maxDate = 'today';
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
@@ -188,7 +186,7 @@ describe('SearchDateRangeComponent', () => {
|
|||||||
|
|
||||||
const calendar = await loader.getHarness(MatCalendarHarness);
|
const calendar = await loader.getHarness(MatCalendarHarness);
|
||||||
|
|
||||||
const afterDate = format(addDays(new Date(), 1), 'MMM d, yyyy');
|
const afterDate = format(addDays(new Date().getTime(), 1), 'MMM d, yyyy');
|
||||||
const cell = await calendar.getCells({ disabled: true });
|
const cell = await calendar.getCells({ disabled: true });
|
||||||
expect(await cell[0].getAriaLabel()).toEqual(afterDate);
|
expect(await cell[0].getAriaLabel()).toEqual(afterDate);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user