From 24141019a32a1b7d2f98647797390ef27f02a081 Mon Sep 17 00:00:00 2001 From: yellowee Date: Thu, 11 Jan 2024 09:47:06 +0100 Subject: [PATCH] --amend --- playwright/pages/dialogs/deleteShippingMethodDialog.ts | 2 +- playwright/pages/shippingMethodsPage.ts | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/playwright/pages/dialogs/deleteShippingMethodDialog.ts b/playwright/pages/dialogs/deleteShippingMethodDialog.ts index 4c82742d3b2..4ca202ae4fe 100644 --- a/playwright/pages/dialogs/deleteShippingMethodDialog.ts +++ b/playwright/pages/dialogs/deleteShippingMethodDialog.ts @@ -12,6 +12,6 @@ export class DeleteShippingMethodDialog { } async clickDeleteButton() { - await this.deleteButton.first().click(); + await this.deleteButton.click(); } } diff --git a/playwright/pages/shippingMethodsPage.ts b/playwright/pages/shippingMethodsPage.ts index 0b4675402bf..c6b3304180f 100644 --- a/playwright/pages/shippingMethodsPage.ts +++ b/playwright/pages/shippingMethodsPage.ts @@ -1,6 +1,6 @@ import { URL_LIST } from "@data/url"; -import { BasePage } from "@pages/basePage"; import { DeleteShippingMethodDialog } from "@dialogs/deleteShippingMethodDialog"; +import { BasePage } from "@pages/basePage"; import { AssignCountriesDialog } from "@pages/dialogs/assignCountriesDialog"; import { RightSideDetailsPage } from "@pages/pageElements/rightSideDetailsSection"; import type { Page } from "@playwright/test"; @@ -27,18 +27,18 @@ export class ShippingMethodsPage { readonly deleteShippingMethodButton = page.getByTestId("shipping-method-row").getByRole("button").getByTestId("delete-button"), readonly priceBasedRatesSection = page.getByTestId("price-based-rates"), readonly weightBasedRatesSection = page.getByTestId("weight-based-rates"), -) { + ) { this.page = page; this.basePage = new BasePage(page); this.rightSideDetailsPage = new RightSideDetailsPage(page); this.assignCountriesDialog = new AssignCountriesDialog(page); - this.deleteShippingMethodDialog = new DeleteShippingMethodDialog(page) this.deleteShippingMethodDialog = new DeleteShippingMethodDialog(page); } async clickAddWeightRateButton() { await this.addWeightRateButton.click(); } + async clickAddPriceRateButton() { await this.addPriceRateButton.click(); } @@ -52,6 +52,7 @@ export class ShippingMethodsPage { `${shippingZoneName} - ${new Date().toISOString()}`, ); } + async typeShippingZoneDescription( shippingDescription = "Biggest zone in e2e world", ) { @@ -69,6 +70,7 @@ export class ShippingMethodsPage { timeout: 10000, }); } + async gotoExistingShippingMethod(shippingMethodId: string) { const existingShippingMethodUrl = `${URL_LIST.shippingMethods}${shippingMethodId}`; await console.log(