Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QA] Correcting e2e test case ids #4764

Merged
merged 3 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": 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
3 changes: 2 additions & 1 deletion playwright/pages/dialogs/productCreateDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
18 changes: 9 additions & 9 deletions playwright/tests/discounts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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({
Expand All @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions playwright/tests/giftCards.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion playwright/tests/staffMembers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}) => {
Expand Down
Loading