diff --git a/.changeset/serious-books-wave.md b/.changeset/serious-books-wave.md new file mode 100644 index 00000000000..b9e86aff1f8 --- /dev/null +++ b/.changeset/serious-books-wave.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": minor +--- + +Changed e2e test case ids to remove duplicate case ids and fix inconsistencies between repo and Testmo. Thanks to this, our QA reports will be more accurate diff --git a/playwright/pages/dialogs/productCreateDialog.ts b/playwright/pages/dialogs/productCreateDialog.ts index 0536a471b6e..130b41c5e1d 100644 --- a/playwright/pages/dialogs/productCreateDialog.ts +++ b/playwright/pages/dialogs/productCreateDialog.ts @@ -17,7 +17,8 @@ export class ProductCreateDialog { } async selectProductTypeWithVariants() { await this.dialogProductTypeInput.fill("beer"); - await this.promptedOptions.filter({ hasText: "Beer" }).click(); + await this.promptedOptions.filter({ hasText: "Beer" }).first().click(); + await this.confirmButton.waitFor({ state: "visible", timeout: 30000}); } async clickConfirmButton() { await this.confirmButton.click(); diff --git a/playwright/tests/discounts.spec.ts b/playwright/tests/discounts.spec.ts index a7d1e95dec8..2fdd02ac41e 100644 --- a/playwright/tests/discounts.spec.ts +++ b/playwright/tests/discounts.spec.ts @@ -13,7 +13,7 @@ test.beforeEach(({ page }) => { const discountType = ['Order', 'Catalog']; for (const type of discountType) { - test(`TC: SALEOR_97 Create promotion with ${type} predicate @discounts @e2e`, async () => { + test(`TC: SALEOR_149 Create promotion with ${type} predicate @discounts @e2e`, async () => { const discountName = `${faker.lorem.word()}+${type}`; await discounts.gotoListView(); await discounts.clickCreateDiscountButton(); @@ -33,7 +33,7 @@ const discountType = ['Order', 'Catalog']; })}; -test(`TC: SALEOR_98 Update existing promotion @discounts @e2e`, async () => { +test(`TC: SALEOR_151 Update existing promotion @discounts @e2e`, async () => { const newDiscountName = `${faker.lorem.word()}`; await discounts.gotoExistingDiscount(DISCOUNTS.promotionToBeEdited.id); await discounts.ruleSection.waitFor({ @@ -57,7 +57,7 @@ test(`TC: SALEOR_98 Update existing promotion @discounts @e2e`, async () => { const promotions = [DISCOUNTS.promotionWithoutRulesToBeDeleted, DISCOUNTS.promotionWithRulesToBeDeleted]; for (const promotion of promotions) { - test(`TC: SALEOR_99 Delete existing ${promotion.name} @discounts @e2e`, async () => { + test(`TC: SALEOR_153 Delete existing ${promotion.name} @discounts @e2e`, async () => { await discounts.gotoExistingDiscount(promotion.id); await discounts.ruleSection.waitFor({ state: "visible", @@ -83,7 +83,7 @@ const predicateValues = [categories, collections, products, variants]; const rewardValue = "10"; const channelName = CHANNELS.channelPLN.name for (const { promotionRule, predicateValue } of predicateValues) { - test(`TC: SALEOR_100 Create ${promotionRule} rule for ${predicateValue} in a catalogue promotion @discounts @e2e`, async () => { + test(`TC: SALEOR_155 Create ${promotionRule} rule for ${predicateValue} in a catalogue promotion @discounts @e2e`, async () => { await discounts.gotoExistingDiscount(promotion.id); await discounts.ruleSection.waitFor({ state: "visible", @@ -115,7 +115,7 @@ const conditionGte = { conditionType: "greater", value: "20.00", conditionDesc: const notEqConditions = [conditionLte, conditionGte] const orderPromotion = DISCOUNTS.orderPromotion for (const { conditionType, value, conditionDesc } of notEqConditions) { - test(`TC: SALEOR_101 Create subtotal type rule with multiple conditions with ${conditionDesc} in order promotion @discounts @e2e`, async () => { + test(`TC: SALEOR_157 Create subtotal type rule with multiple conditions with ${conditionDesc} in order promotion @discounts @e2e`, async () => { await discounts.gotoExistingDiscount(orderPromotion.id); await discounts.ruleSection.waitFor({ state: "visible", @@ -150,7 +150,7 @@ const condition1 = { condition: "Subtotal", gte:"150.00", lte: "170.00"} const condition2 = { condition: "Total", gte:"20.00", lte: "50.00"} const conditionsBetween = [condition1, condition2] for (const { condition, lte, gte } of conditionsBetween) { - test(`TC: SALEOR_102 Create gift reward rule with ${condition} between ${gte} and ${lte} in order promotion @discounts @e2e`, async () => { + test(`TC: SALEOR_160 Create gift reward rule with ${condition} between ${gte} and ${lte} in order promotion @discounts @e2e`, async () => { await discounts.gotoExistingDiscount(orderPromotion.id); await discounts.ruleSection.waitFor({ state: "visible", @@ -178,7 +178,7 @@ for (const { condition, lte, gte } of conditionsBetween) { const orderRules = [DISCOUNTS.orderPromotionWithRulesToBeUpdated.rules[0], DISCOUNTS.orderPromotionWithRulesToBeUpdated.rules[1]] for (const rule of orderRules) { - test(`TC: SALEOR_103 Update promotion ${rule.name} from Order promotion @discounts @e2e`, async () => { + test(`TC: SALEOR_163 Update promotion ${rule.name} from Order promotion @discounts @e2e`, async () => { await discounts.gotoExistingDiscount(DISCOUNTS.orderPromotionWithRulesToBeUpdated.id); await discounts.ruleSection.waitFor({ state: "visible", @@ -213,7 +213,7 @@ for (const rule of orderRules) { const catalogRules = [DISCOUNTS.catalogPromotionWithRulesToBeUpdated.rules[0], DISCOUNTS.catalogPromotionWithRulesToBeUpdated.rules[1]] for (const rule of catalogRules) { - test(`TC: SALEOR_104 Update promotion ${rule.name} from Catalog promotion @discounts @e2e`, async () => { + test(`TC: SALEOR_166 Update promotion ${rule.name} from Catalog promotion @discounts @e2e`, async () => { await discounts.gotoExistingDiscount(DISCOUNTS.catalogPromotionWithRulesToBeUpdated.id); await discounts.ruleSection.waitFor({ state: "visible", @@ -243,7 +243,7 @@ for (const rule of catalogRules) { const promotionsWithRules = [DISCOUNTS.orderPromotionWithRulesToBeDeleted, DISCOUNTS.catalogPromotionWithRulesToBeDeleted] for (const promotion of promotionsWithRules) { for (const rule of promotion.rules) { - test(`TC: SALEOR_105 Delete promotion ${rule.name} from ${promotion.type} promotion @discounts @e2e`, async () => { + test(`TC: SALEOR_167 Delete promotion ${rule.name} from ${promotion.type} promotion @discounts @e2e`, async () => { await discounts.gotoExistingDiscount(promotion.id); await discounts.ruleSection.waitFor({ state: "visible", diff --git a/playwright/tests/giftCards.spec.ts b/playwright/tests/giftCards.spec.ts index a7f17391126..04972f736d0 100644 --- a/playwright/tests/giftCards.spec.ts +++ b/playwright/tests/giftCards.spec.ts @@ -111,13 +111,13 @@ test("TC: SALEOR_111 Bulk delete gift cards @e2e @gift", async () => { ), ).toEqual([]); }); -test("TC: SALEOR_112 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(); await giftCardsPage.setGiftCardsBalanceDialog.setBalance("34") await giftCardsPage.expectSuccessBanner(); }); -test("TC: SALEOR_113 Export gift card codes in XLSX file @e2e @gift", async () => { +test("TC: SALEOR_182 Export gift card codes in XLSX file @e2e @gift", async () => { await giftCardsPage.gotoGiftCardsListView(); await giftCardsPage.clickShowMoreMenu(); await giftCardsPage.clickExportGiftCards(); @@ -129,7 +129,7 @@ test("TC: SALEOR_113 Export gift card codes in XLSX file @e2e @gift", async () = // "Your exported gift cards data is ready", // ); }); -test("TC: SALEOR_114 Export gift card codes in CSV file @e2e @gift", async () => { +test("TC: SALEOR_183 Export gift card codes in CSV file @e2e @gift", async () => { await giftCardsPage.gotoGiftCardsListView(); await giftCardsPage.clickShowMoreMenu(); await giftCardsPage.clickExportGiftCards(); diff --git a/playwright/tests/staffMembers.spec.ts b/playwright/tests/staffMembers.spec.ts index a791669dd6a..227ed315b37 100644 --- a/playwright/tests/staffMembers.spec.ts +++ b/playwright/tests/staffMembers.spec.ts @@ -6,7 +6,7 @@ import { expect, test } from "@playwright/test"; test.use({ storageState: "./playwright/.auth/admin.json" }); -test("TC: SALEOR_37 Admin User should be able to deactivate other user @e2e @staff-members", async ({ +test("TC: SALEOR_137 Admin User should be able to deactivate other user @e2e @staff-members", async ({ page, request, }) => {