diff --git a/cypress/e2e/configuration/attributes/createProductAttributes.js b/cypress/e2e/configuration/attributes/createProductAttributes.js index 518907013..6e1777de2 100644 --- a/cypress/e2e/configuration/attributes/createProductAttributes.js +++ b/cypress/e2e/configuration/attributes/createProductAttributes.js @@ -37,7 +37,7 @@ describe("As an admin I want to create product attribute", () => { const attributeReferenceType = [ { type: "PRODUCT", testCase: "SALEOR_0506" }, { type: "PAGE", testCase: "SALEOR_0507" }, - { type: "PRODUCT_VARIANT", testCase: "SALEOR_0539" }, + { type: "PRODUCT_VARIANT", testCase: "SALEOR_0540" }, ]; const attributeNumericType = [ { diff --git a/cypress/e2e/customerRegistration.js b/cypress/e2e/customerRegistration.js index 49403e709..4c0693a79 100644 --- a/cypress/e2e/customerRegistration.js +++ b/cypress/e2e/customerRegistration.js @@ -29,7 +29,7 @@ describe("Tests for customer registration", () => { }); }); - it("should register customer", { tags: ["@customer", "@allEnv"] }, () => { + it("should register customer TC: SALEOR_1212", { tags: ["@customer", "@allEnv"] }, () => { const email = `${startsWith}${faker.datatype.number()}@example.com`; customerRegistration({ email, channel: defaultChannel.slug }); const registrationLinkRegex = /\[(\s*http[^\]]*)\]/; @@ -53,7 +53,7 @@ describe("Tests for customer registration", () => { }); it( - "shouldn't register customer with duplicated email", + "shouldn't register customer with duplicated email TC: SALEOR_1213", { tags: ["@customer", "@allEnv", "@stable"] }, () => { const duplicatedEmail = Cypress.env("USER_NAME"); @@ -68,7 +68,7 @@ describe("Tests for customer registration", () => { ); it( - "should activate customer from dashboard", + "should activate customer from dashboard SALEOR_1211", { tags: ["@customer", "@allEnv", "@stable"] }, () => { customerRegistration({ email, channel: defaultChannel.slug }) diff --git a/cypress/e2e/metadata.js b/cypress/e2e/metadata.js index 33b6638cd..1c9189592 100644 --- a/cypress/e2e/metadata.js +++ b/cypress/e2e/metadata.js @@ -49,7 +49,7 @@ describe("Test for metadata", () => { }); it( - "should create metadata for product", + "should create metadata for product TC: SALEOR_3301", { tags: ["@metadata", "@allEnv", "@stable"] }, () => { cy.loginUserViaRequest(); @@ -91,7 +91,7 @@ describe("Test for metadata", () => { }, ); it( - "should create metadata for order", + "should create metadata for order TC: SALEOR_3302", { tags: ["@metadata", "@allEnv", "@stable"] }, () => { let order; diff --git a/cypress/e2e/pages/pages.js b/cypress/e2e/pages/pages.js index 5f56f078f..c8bf540e2 100644 --- a/cypress/e2e/pages/pages.js +++ b/cypress/e2e/pages/pages.js @@ -19,13 +19,14 @@ describe("Tests for pages", () => { let pageType; let pageTypeId; - const attributeValuesOnPage = { - NUMERIC: 1, - RICH_TEXT: faker.lorem.sentence(), - DROPDOWN: "value", - MULTISELECT: "value", - BOOLEAN: true, - }; + + const attributes = [ + { key: "DROPDOWN", value: "value", TC: "SALEOR_2203" }, + { key: "MULTISELECT", value: "value", TC: "SALEOR_2204" }, + { key: "RICH_TEXT", value: faker.lorem.sentence(), TC: "SALEOR_2205" }, + { key: "BOOLEAN", value: true, TC: "SALEOR_2206" }, + { key: "NUMERIC", value: 1, TC: "SALEOR_2207" }, + ]; before(() => { cy.loginUserViaRequest(); @@ -46,7 +47,7 @@ describe("Tests for pages", () => { }); it( - "should create not published page", + "should create not published page. TC: SALEOR_2201", { tags: ["@pages", "@allEnv", "@stable"] }, () => { cy.addAliasToGraphRequest("PageType"); @@ -69,7 +70,7 @@ describe("Tests for pages", () => { ); it( - "should create published page", + "should create published page. TC: SALEOR_2202", { tags: ["@pages", "@allEnv", "@stable"] }, () => { const randomName = `${startsWith}${faker.datatype.number()}`; @@ -91,19 +92,20 @@ describe("Tests for pages", () => { }, ); - Object.keys(pagesPage.attributesTypes).forEach(attributeType => { + attributes.forEach(attributeType => { it( - `should create page with ${attributeType} attribute`, - { tags: ["@pages", "@allEnv", "@stable"] }, + `should create page with ${attributeType.key} attribute TC: ${attributeType.TC}`, + { tags: ["@attribute", "@pages", "@allEnv"] }, () => { const randomName = `${startsWith}${faker.datatype.number()}`; - const attributeValues = [attributeValuesOnPage[attributeType]]; + const attributeKey = attributeType.key + const attributeValue = attributeType.value attributeRequests .createAttribute({ name: randomName, type: "PAGE_TYPE", - inputType: attributeType, - attributeValues, + inputType: attributeKey, + attributeValues: [attributeValue] }) .then(attributeResp => { attribute = attributeResp; @@ -119,15 +121,15 @@ describe("Tests for pages", () => { .createPageWithAttribute({ pageName: randomName, pageTypeName: randomName, - attributeType, - attributeValue: attributeValuesOnPage[attributeType], + attributeType: attributeKey, + attributeValue: attributeValue, }) .then(page => { pageRequests.getPage(page.id); }) .then(page => { expect(page.attributes[0].values[0].inputType).to.eq( - attributeType, + attributeKey, ); if (attributeType !== "BOOLEAN") { expect(page.attributes[0].values[0].name).to.eq( @@ -145,7 +147,8 @@ describe("Tests for pages", () => { ); }); - it("should delete page", { tags: ["@pages", "@allEnv", "@stable"] }, () => { + it("should delete page TC: SALEOR_2209", + { tags: ["@pages", "@allEnv", "@stable"] }, () => { const randomName = `${startsWith}${faker.datatype.number()}`; pageRequests @@ -165,7 +168,8 @@ describe("Tests for pages", () => { }); }); - it("should update page", { tags: ["@pages", "@allEnv", "@stable"] }, () => { + it("should update page TC: SALEOR_2208", + { tags: ["@pages", "@allEnv", "@stable"] }, () => { const randomName = `${startsWith}${faker.datatype.number()}`; const updatedName = `${startsWith}${faker.datatype.number()}`; diff --git a/cypress/e2e/products/productsList/productPresets.js b/cypress/e2e/products/productsList/productPresets.js index 85ed2e8a0..47a76f62f 100644 --- a/cypress/e2e/products/productsList/productPresets.js +++ b/cypress/e2e/products/productsList/productPresets.js @@ -23,7 +23,7 @@ describe("As a user I should be able to save selected filters with search querie }); it( - "should be able to add preset. TC: SALEOR_3802", + "should be able to add preset. TC: SALEOR_2712", { tags: ["@productsList", "@allEnv", "@stable"] }, () => { cy.visit(urlList.products);