Skip to content

Commit

Permalink
updated spec to check if the warranty expiry label goes off once updated
Browse files Browse the repository at this point in the history
  • Loading branch information
GokulramGHV committed Oct 14, 2023
1 parent bf1a714 commit 89136dd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cypress/e2e/assets_spec/assets_manage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("Asset", () => {
cy.awaitUrl("/assets");
});

it("Verify Asset Service History Alert", () => {
it("Verify Asset Warranty Expiry Label", () => {
assetSearchPage.typeSearchKeyword(assetname);
assetSearchPage.pressEnter();
assetSearchPage.verifyBadgeContent(assetname);
Expand All @@ -52,11 +52,10 @@ describe("Asset", () => {
assetPage.enterWarrantyExpiryDate(addDaysToDate(20)); // less than 1 month
assetPage.clickassetupdatebutton();
assetPage.verifyWarrantyExpiryLabel("1 month");
// assetPage.clickupdatedetailbutton(); // Can't check for expired warranty as it will fail since we can set only future dates for warranty expiry
// assetPage.scrollintoWarrantyDetails();
// assetPage.enterWarrantyExpiryDate(addDaysToDate(-10)); // expired
// assetPage.clickassetupdatebutton();
// assetPage.verifyWarrantyExpiryLabel("expired");
assetPage.clickupdatedetailbutton();
assetPage.scrollintoWarrantyDetails();
assetPage.enterWarrantyExpiryDate(addDaysToDate(100)); // check for greater than 3 months again to verify the label is removed
assetPage.clickassetupdatebutton();
});

it("Create & Edit a service history and verify reflection", () => {
Expand Down

0 comments on commit 89136dd

Please sign in to comment.