From 5d389ccb93fa24844ad4bff83665cdb06a16e1dd Mon Sep 17 00:00:00 2001 From: nickevansuk <2616208+nickevansuk@users.noreply.github.com> Date: Tue, 3 Oct 2023 15:36:28 +0100 Subject: [PATCH] Simplify logic --- .../TestOpportunityBookableOutsideValidFromBeforeStartDate.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/test-interface-criteria/src/criteria/TestOpportunityBookableOutsideValidFromBeforeStartDate.js b/packages/test-interface-criteria/src/criteria/TestOpportunityBookableOutsideValidFromBeforeStartDate.js index 306acccabe..a76c8f2eef 100644 --- a/packages/test-interface-criteria/src/criteria/TestOpportunityBookableOutsideValidFromBeforeStartDate.js +++ b/packages/test-interface-criteria/src/criteria/TestOpportunityBookableOutsideValidFromBeforeStartDate.js @@ -12,9 +12,6 @@ const { InternalCriteriaFutureScheduledAndDoesNotRequireDetails } = require('./i function mustHaveBookingWindowAndBeOutsideOfIt(offer, opportunity, options) { const dateAfterWhichBookingsCanBeMade = getDateAfterWhichBookingsCanBeMade(offer, opportunity); const dateBeforeWhichBookingsCanBeMade = getDateBeforeWhichBookingsCanBeMade(offer, opportunity); - if (dateAfterWhichBookingsCanBeMade == null && dateBeforeWhichBookingsCanBeMade == null) { - return false; // has no booking window - } /* If, within 2 hours, the booking window would be reached, it may be possible for this to happen during the test run. So, to be on the safe side, we only accept Opportunities whose booking window starts at least 2 hours in the future. */