Skip to content

Commit

Permalink
Merge pull request #1448 from ghiscoding/chore/range-failing-cypress
Browse files Browse the repository at this point in the history
chore: fix failing Cypress test because of 1st day of month
  • Loading branch information
ghiscoding authored Aug 2, 2024
2 parents 204269e + f0bac08 commit 585d4f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/examples/grid-range.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class GridRangeComponent implements OnInit, OnDestroy {

const today = new Date();
const presetLowestDay = format(addDay(new Date(), -2), 'YYYY-MM-DD');
const presetHighestDay = format(addDay(new Date(), today.getDate() < 14 ? 30 : 25), 'YYYY-MM-DD');
const presetHighestDay = format(addDay(new Date(), today.getDate() < 14 ? 28 : 25), 'YYYY-MM-DD');

this.gridOptions = {
autoResize: {
Expand Down
2 changes: 1 addition & 1 deletion test/cypress/e2e/example25.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const presetMinDuration = 4;
const presetMaxDuration = 88;
const today = new Date();
const presetLowestDay = format(addDay(new Date(), -2), 'YYYY-MM-DD');
const presetHighestDay = format(addDay(new Date(), today.getDate() < 14 ? 30 : 25), 'YYYY-MM-DD');
const presetHighestDay = format(addDay(new Date(), today.getDate() < 14 ? 28 : 25), 'YYYY-MM-DD');

function isBetween(inputDate: Date | string, minDate: Date | string, maxDate: Date | string, isInclusive = false) {
let valid = false;
Expand Down

0 comments on commit 585d4f7

Please sign in to comment.