Fix test case numeration (#4087)
* update tec id for presets and pages * update tc id for creating page with attribute types tests * update tc id for customer registration * update tc id for metadata * restore original condition
This commit is contained in:
parent
7c38c29cae
commit
4c7ad92e76
5 changed files with 31 additions and 27 deletions
|
@ -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 = [
|
||||
{
|
||||
|
|
|
@ -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 })
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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()}`;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue