test fix for order suite and add missing critical tags (#3690)

This commit is contained in:
wojteknowacki 2023-05-24 16:27:01 +02:00 committed by GitHub
parent 76cde7c7b1
commit 16f8e0b177
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 34 additions and 11 deletions

View file

@ -59,7 +59,7 @@ describe("As an unlogged customer I want to order physical and digital products"
it( it(
"should purchase digital product as unlogged customer. TC: SALEOR_0402", "should purchase digital product as unlogged customer. TC: SALEOR_0402",
{ tags: ["@checkout", "@allEnv", "@stable", "@oldRelease"] }, { tags: ["@checkout", "@allEnv", "@stable", "@oldRelease", "@critical"] },
() => { () => {
createAndCompleteCheckoutWithoutShipping({ createAndCompleteCheckoutWithoutShipping({
channelSlug: defaultChannel.slug, channelSlug: defaultChannel.slug,
@ -83,7 +83,7 @@ describe("As an unlogged customer I want to order physical and digital products"
it( it(
"should purchase physical product as unlogged customer. TC: SALEOR_0403", "should purchase physical product as unlogged customer. TC: SALEOR_0403",
{ tags: ["@checkout", "@allEnv", "@stable", "@oldRelease"] }, { tags: ["@checkout", "@allEnv", "@stable", "@oldRelease", "@critical"] },
() => { () => {
createWaitingForCaptureOrder({ createWaitingForCaptureOrder({
channelSlug: defaultChannel.slug, channelSlug: defaultChannel.slug,

View file

@ -23,7 +23,6 @@ describe("As an admin I want to create product attribute", () => {
const attributesTypes = [ const attributesTypes = [
{ type: "DROPDOWN", testCase: "SALEOR_0501" }, { type: "DROPDOWN", testCase: "SALEOR_0501" },
{ type: "MULTISELECT", testCase: "SALEOR_0502" }, { type: "MULTISELECT", testCase: "SALEOR_0502" },
{ type: "FILE", testCase: "SALEOR_0503" },
{ type: "RICH_TEXT", testCase: "SALEOR_0504" }, { type: "RICH_TEXT", testCase: "SALEOR_0504" },
{ type: "BOOLEAN", testCase: "SALEOR_0505" }, { type: "BOOLEAN", testCase: "SALEOR_0505" },
{ type: "DATE", testCase: "SALEOR_0523" }, { type: "DATE", testCase: "SALEOR_0523" },
@ -87,6 +86,28 @@ describe("As an admin I want to create product attribute", () => {
); );
}); });
it(
`should be able to create FILE attribute. TC: SALEOR_0503`,
{ tags: ["@attribute", "@allEnv", "@stable", "@oldRelease", "@critical"] },
() => {
const attributeName = `${startsWith}${faker.datatype.number()}`;
createAttributeWithInputType({
name: attributeName,
attributeType: "FILE",
})
.then(({ attribute }) => {
getAttribute(attribute.id);
})
.then(attribute => {
expectCorrectDataInAttribute(attribute, {
attributeName,
attributeType: "FILE",
});
});
},
);
attributeReferenceType.forEach(entityType => { attributeReferenceType.forEach(entityType => {
it( it(
`should be able to create ${entityType.type} attribute. TC:${entityType.testCase}`, `should be able to create ${entityType.type} attribute. TC:${entityType.testCase}`,

View file

@ -25,7 +25,9 @@ describe("As an admin I want to create product types", () => {
it( it(
"should be able to create product type without shipping required. TC: SALEOR_1501", "should be able to create product type without shipping required. TC: SALEOR_1501",
{ tags: ["@productType", "@allEnv", "@stable", "@oldRelease"] }, {
tags: ["@productType", "@allEnv", "@stable", "@oldRelease", "@critical"],
},
() => { () => {
const name = `${startsWith}${faker.datatype.number()}`; const name = `${startsWith}${faker.datatype.number()}`;
@ -43,7 +45,7 @@ describe("As an admin I want to create product types", () => {
it( it(
"should be able to create product type with shipping required. TC: SALEOR_1502", "should be able to create product type with shipping required. TC: SALEOR_1502",
{ tags: ["@productType", "@allEnv", "@stable"] }, { tags: ["@productType", "@allEnv", "@stable", "@critical"] },
() => { () => {
const name = `${startsWith}${faker.datatype.number()}`; const name = `${startsWith}${faker.datatype.number()}`;
const shippingWeight = 10; const shippingWeight = 10;
@ -63,7 +65,7 @@ describe("As an admin I want to create product types", () => {
it( it(
"should be able to create product type with gift card kind. TC: SALEOR_1510", "should be able to create product type with gift card kind. TC: SALEOR_1510",
{ tags: ["@productType", "@allEnv", "@stable"] }, { tags: ["@productType", "@allEnv", "@stable", "@critical"] },
() => { () => {
const name = `${startsWith}${faker.datatype.number()}`; const name = `${startsWith}${faker.datatype.number()}`;

View file

@ -112,7 +112,7 @@ describe("As a staff user I want to create shipping zone and rate", () => {
it( it(
"should be able to create price based shipping method. TC: SALEOR_0803", "should be able to create price based shipping method. TC: SALEOR_0803",
{ tags: ["@shipping", "@allEnv", "@stable", "@oldRelease"] }, { tags: ["@shipping", "@allEnv", "@stable", "@oldRelease", "@critical"] },
() => { () => {
const shippingName = `${startsWith}${faker.datatype.number()}`; const shippingName = `${startsWith}${faker.datatype.number()}`;
cy.clearSessionData().loginUserViaRequest( cy.clearSessionData().loginUserViaRequest(

View file

@ -45,7 +45,7 @@ describe("As an admin I want to manage warehouses", () => {
it( it(
"should be able to create warehouse. TC: SALEOR_1101", "should be able to create warehouse. TC: SALEOR_1101",
{ tags: ["@warehouse", "@allEnv", "@stable", "@oldRelease"] }, { tags: ["@warehouse", "@allEnv", "@stable", "@oldRelease", "@critical"] },
() => { () => {
const name = `${startsWith}${faker.datatype.number()}`; const name = `${startsWith}${faker.datatype.number()}`;
cy.visit(urlList.warehouses) cy.visit(urlList.warehouses)

View file

@ -151,7 +151,7 @@ describe("As an admin I want to see correct information on dashboard home page",
it( it(
"should display correct information on dashboard home page. SALEOR_2004", "should display correct information on dashboard home page. SALEOR_2004",
{ tags: ["@homePage", "@allEnv"] }, { tags: ["@homePage", "@allEnv", "@critical"] },
() => { () => {
cy.visit(urlList.homePage); cy.visit(urlList.homePage);
changeChannel(defaultChannel.name); changeChannel(defaultChannel.name);

View file

@ -48,7 +48,7 @@ import {
} from "../../support/pages/"; } from "../../support/pages/";
describe("Orders", () => { describe("Orders", () => {
const startsWith = "CyOrders-"; const startsWith = "Orders-Cy-";
const randomName = startsWith + faker.datatype.number(); const randomName = startsWith + faker.datatype.number();
let customer; let customer;
@ -152,7 +152,7 @@ describe("Orders", () => {
it( it(
"should create order with selected channel. TC: SALEOR_2104", "should create order with selected channel. TC: SALEOR_2104",
{ tags: ["@orders", "@allEnv", "@stable", "@oldRelease"] }, { tags: ["@orders", "@allEnv", "@stable", "@oldRelease", "@critical"] },
() => { () => {
cy.visit(urlList.orders).get(ORDERS_SELECTORS.createOrderButton).click(); cy.visit(urlList.orders).get(ORDERS_SELECTORS.createOrderButton).click();
selectChannelInPicker(defaultChannel.name); selectChannelInPicker(defaultChannel.name);