Fix cancel fulfillment test (#2169)

* Fix test for cancel fulfillment

* add TC numbers
This commit is contained in:
Karolina Rakoczy 2022-07-18 14:00:24 +03:00 committed by GitHub
parent 1879d0cfb3
commit 683527ebe9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,7 +106,7 @@ describe("Orders", () => {
}); });
xit( xit(
"should create order with selected channel", "should create order with selected channel. TC: SALEOR_2104",
{ tags: ["@orders", "@allEnv"] }, { tags: ["@orders", "@allEnv"] },
() => { () => {
cy.visit(urlList.orders) cy.visit(urlList.orders)
@ -124,7 +124,7 @@ describe("Orders", () => {
); );
it( it(
"should not be possible to change channel in order", "should not be possible to change channel in order. TC: SALEOR_2105",
{ tags: ["@orders", "@allEnv", "@stable"] }, { tags: ["@orders", "@allEnv", "@stable"] },
() => { () => {
createOrder({ createOrder({
@ -143,7 +143,10 @@ describe("Orders", () => {
}, },
); );
it("should cancel fulfillment", { tags: ["@orders", "@allEnv"] }, () => { it(
"should cancel fulfillment. TC: SALEOR_2106",
{ tags: ["@orders", "@allEnv"] },
() => {
let order; let order;
createFulfilledOrder({ createFulfilledOrder({
customerId: customer.id, customerId: customer.id,
@ -162,10 +165,11 @@ describe("Orders", () => {
.should("not.exist") .should("not.exist")
.get(ORDERS_SELECTORS.cancelFulfillment) .get(ORDERS_SELECTORS.cancelFulfillment)
.click() .click()
.fillAutocompleteSelect( .get(ORDERS_SELECTORS.cancelFulfillmentSelectField)
ORDERS_SELECTORS.cancelFulfillmentSelectField, .click()
warehouse.name, .get(BUTTON_SELECTORS.selectOption)
) .first()
.click()
.addAliasToGraphRequest("OrderFulfillmentCancel") .addAliasToGraphRequest("OrderFulfillmentCancel")
.get(BUTTON_SELECTORS.submit) .get(BUTTON_SELECTORS.submit)
.click() .click()
@ -175,10 +179,11 @@ describe("Orders", () => {
.then(orderResp => { .then(orderResp => {
expect(orderResp.status).to.be.eq("UNFULFILLED"); expect(orderResp.status).to.be.eq("UNFULFILLED");
}); });
}); },
);
it( it(
"should make a refund", "should make a refund. TC: 2107",
{ tags: ["@orders", "@allEnv", "@stable"] }, { tags: ["@orders", "@allEnv", "@stable"] },
() => { () => {
let order; let order;