From 3f2bca7a34276fee0d0f6a299d359f77124979cb Mon Sep 17 00:00:00 2001 From: yellowee Date: Wed, 17 Jan 2024 08:52:05 +0100 Subject: [PATCH] CR fixes --- playwright/pages/shippingMethodsPage.ts | 2 +- playwright/tests/shippingMethods.spec.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/playwright/pages/shippingMethodsPage.ts b/playwright/pages/shippingMethodsPage.ts index 7f878febd15..7f1c67b8bbc 100644 --- a/playwright/pages/shippingMethodsPage.ts +++ b/playwright/pages/shippingMethodsPage.ts @@ -106,7 +106,7 @@ export class ShippingMethodsPage { await this.createShippingZoneButton.click(); } - async clickDeleteShippingRateFromTheList() { + async clickDeletePriceBasedShippingMethod() { await this.priceBasedRatesSection.locator(this.deleteShippingRateButtonOnList).click(); } diff --git a/playwright/tests/shippingMethods.spec.ts b/playwright/tests/shippingMethods.spec.ts index f32c9ef59c9..a691078b91b 100644 --- a/playwright/tests/shippingMethods.spec.ts +++ b/playwright/tests/shippingMethods.spec.ts @@ -96,7 +96,7 @@ test("TC: SALEOR_34 Delete a single shipping rate from the shipping zone details await expect(shippingMethodsPage.basePage.pageHeader).toBeVisible(); const priceBasedRate = SHIPPING_METHODS.shippingMethodWithRatesToBeDeleted.rates.priceBasedRateToBeDeleted.name; await expect(shippingMethodsPage.priceBasedRatesSection).toContainText(priceBasedRate); - await shippingMethodsPage.clickDeleteShippingRateFromTheList(); + await shippingMethodsPage.clickDeletePriceBasedShippingMethod(); await shippingMethodsPage.deleteShippingMethodDialog.clickDeleteButton(); await shippingMethodsPage.basePage.expectSuccessBanner(); await expect(shippingMethodsPage.priceBasedRatesSection).toContainText("No shipping rates found"); @@ -112,13 +112,9 @@ test("TC: SALEOR_35 Delete a single shipping rate from its details page @shippin const weightBasedRate = SHIPPING_METHODS.shippingMethodWithRatesToBeDeleted.rates.weightBasedRateToBeDeleted.name; await shippingMethodsPage.gotoExistingShippingRate(shippingMethodId, shippingRateId); - await expect(shippingMethodsPage.basePage.pageHeader).toBeVisible(); await shippingMethodsPage.clickDeleteShippingRateButton(); await shippingMethodsPage.deleteShippingMethodDialog.clickDeleteButton(); await shippingMethodsPage.basePage.expectSuccessBanner(); - await shippingMethodsPage.gotoExistingShippingMethod( - SHIPPING_METHODS.shippingMethodWithRatesToBeDeleted.id, - ); await expect(shippingMethodsPage.weightBasedRatesSection).toContainText("No shipping rates found"); await expect(shippingMethodsPage.weightBasedRatesSection).not.toContainText(weightBasedRate); });