Skip to content

Commit

Permalink
CR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowee committed Jan 17, 2024
1 parent 5aa0cb7 commit 3f2bca7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion playwright/pages/shippingMethodsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class ShippingMethodsPage {
await this.createShippingZoneButton.click();
}

async clickDeleteShippingRateFromTheList() {
async clickDeletePriceBasedShippingMethod() {
await this.priceBasedRatesSection.locator(this.deleteShippingRateButtonOnList).click();

}
Expand Down
6 changes: 1 addition & 5 deletions playwright/tests/shippingMethods.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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);
});

0 comments on commit 3f2bca7

Please sign in to comment.