Skip to content

Commit

Permalink
Fixing e2e test case ids and failing tests on 3.19 (#5074)
Browse files Browse the repository at this point in the history
* cherry pick bde2fe8

* adding changeset

* fixing brackets

* fixing failing tests
  • Loading branch information
yellowee authored Jul 29, 2024
1 parent 51e293b commit d121d19
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/serious-books-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

You can now run E2E tests on 3.19 with no issues
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();
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
5 changes: 3 additions & 2 deletions playwright/tests/discounts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ const promotionsWithRules = [
DISCOUNTS.orderPromotionWithRulesToBeDeleted,
DISCOUNTS.catalogPromotionWithRulesToBeDeleted,
];

for (const promotion of promotionsWithRules) {
for (const rule of promotion.rules) {
test(`TC: SALEOR_167 Delete promotion ${rule.name} from ${promotion.type} promotion @discounts @e2e`, async () => {
Expand All @@ -393,5 +394,5 @@ for (const promotion of promotionsWithRules) {
`${promotion.type}: ${rule.name}`,
);
});
}
}
};
};

0 comments on commit d121d19

Please sign in to comment.