Skip to content

Commit

Permalink
fixing failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowee committed Jul 29, 2024
1 parent 2361d33 commit c4c9caa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 5 additions & 3 deletions playwright/pages/pageElements/rightSideDetailsSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ export class RightSideDetailsPage extends BasePage {
await this.editShippingAddressButton.click();
}
async clickWarehouseSelectShippingPage() {
await this.selectWarehouseShippingMethodButton.click();
await this.selectWarehouseShippingMethodButton.waitFor({ state: "visible" });
await this.selectWarehouseShippingMethodButton.click({ force: true });
}
async expectOptionsSelected(section: Locator, names: string[]) {
for (const name of names) {
Expand All @@ -115,11 +116,11 @@ export class RightSideDetailsPage extends BasePage {
this.clickWarehouseSelectShippingPage();
}
async clickChannelsSelectShippingPage() {
await this.selectChannelShippingPageButton.click({force: true});
await this.selectChannelShippingPageButton.waitFor({ state: "visible" });
await this.selectChannelShippingPageButton.click({ force: true });
}
async selectSingleChannelShippingPage(channel = "PLN") {
await this.selectOption.filter({ hasText: `Channel-${channel}` }).click();
// below click hides prompted options
this.clickChannelsSelectShippingPage();
}
async openChannelsDialog() {
Expand Down Expand Up @@ -189,6 +190,7 @@ export class RightSideDetailsPage extends BasePage {
await this.channelSelectDialog.clickAllChannelsCheckbox();
await this.channelSelectDialog.selectChannel(channel);
await this.channelSelectDialog.clickConfirmButton();
await this.waitForDOMToFullyLoad();
}
async selectOneChannelAsAvailableWhenNoneSelected(channel: string) {
await this.manageChannelsButton.click();
Expand Down
2 changes: 0 additions & 2 deletions playwright/tests/discounts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ for (const type of discountType) {
});
}

test(`TC: SALEOR_151 Update existing promotion @discounts @e2e`, async () => {
test(`TC: SALEOR_151 Update existing promotion @discounts @e2e`, async () => {
const newDiscountName = `${faker.lorem.word()}`;

Expand Down Expand Up @@ -397,4 +396,3 @@ for (const promotion of promotionsWithRules) {
});
};
};
});
2 changes: 0 additions & 2 deletions playwright/tests/giftCards.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ test("TC: SALEOR_111 Bulk delete gift cards @e2e @gift", async () => {
await expect(giftCardsPage.gridCanvas).not.toContainText(`Code ending with ${last4Code}`);
}
});
test("TC: SALEOR_181 Set gift card balance @e2e @gift", async () => {
test("TC: SALEOR_181 Set gift card balance @e2e @gift", async () => {
await giftCardsPage.gotoExistingGiftCardView(GIFT_CARDS.giftCardToBeEdited.id);
await giftCardsPage.clickSetBalance();
Expand Down Expand Up @@ -134,4 +133,3 @@ test("TC: SALEOR_183 Export gift card codes in CSV file @e2e @gift", async () =>
"Your exported gift cards data is ready",
);
});
});

0 comments on commit c4c9caa

Please sign in to comment.