Skip to content

Commit

Permalink
OBPIH-6683 improve assertion and use new filling method
Browse files Browse the repository at this point in the history
  • Loading branch information
kkrawczyk123 committed Jan 29, 2025
1 parent 47d2996 commit be9fed9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/tests/receiving/validationsOnDeliverOnDate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,15 @@ test.describe('Validations on edit Deliver On Date when receiving shipment', ()
await test.step('Edit Delivered on Date on check page to past date', async () => {
await receivingPage.checkStep.isLoaded();
await receivingPage.checkStep.deliveredOnField.click();
await receivingPage.checkStep.previousMonthOnDatePicker.click();
await receivingPage.checkStep.getDayOnDatePicker('1').nth(0).click();
await receivingPage.checkStep.deliveredOnField.click();
await receivingPage.checkStep.previousMonthOnDatePicker.click();
await receivingPage.checkStep.getDayOnDatePicker('1').nth(0).click();
await receivingPage.checkStep.deliveredOnDateField.fillWithFormat(
getDateByOffset(new Date(), -5),
'MM/DD/YYYY HH:mm:ss Z'
);
await receivingPage.checkStep.isLoaded();
await receivingPage.checkStep.receiveShipmentButton.click();
await receivingPage.checkStep.validationOnDeliveredOnPastDatePopup.assertvalidationDialogVisible();
await expect(
receivingPage.checkStep.validationOnDeliveredOnPastDatePopup
).toBeVisible();
});
});
});

0 comments on commit be9fed9

Please sign in to comment.