From 757833ca5792900b1cf9e78e3cc260b0bff60a30 Mon Sep 17 00:00:00 2001 From: wojteknowacki <124166231+wojteknowacki@users.noreply.github.com> Date: Thu, 18 May 2023 09:47:12 +0200 Subject: [PATCH] test fix create product without sku (#3623) --- .../productsWithoutSku/createProductWithoutSku.js | 8 ++++---- .../support/pages/catalog/products/productDetailsPage.js | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cypress/e2e/products/productsWithoutSku/createProductWithoutSku.js b/cypress/e2e/products/productsWithoutSku/createProductWithoutSku.js index 1ed19ca16..e431f7b70 100644 --- a/cypress/e2e/products/productsWithoutSku/createProductWithoutSku.js +++ b/cypress/e2e/products/productsWithoutSku/createProductWithoutSku.js @@ -150,13 +150,13 @@ describe("Creating variants", () => { getProductVariants(createdProduct.id, defaultChannel.slug); }) .then(([firstVariant, secondVariant]) => { - expect(firstVariant).to.have.property("price", variants[0].price); - expect(secondVariant).to.have.property("name", name); - expect(secondVariant).to.have.property("price", variants[1].price); + expect(secondVariant).to.have.property("price", variants[0].price); + expect(firstVariant).to.have.property("name", name); + expect(firstVariant).to.have.property("price", variants[1].price); createWaitingForCaptureOrder({ channelSlug: defaultChannel.slug, email: "example@example.com", - variantsList: [secondVariant], + variantsList: [firstVariant], shippingMethodName: shippingMethod.name, address, }); diff --git a/cypress/support/pages/catalog/products/productDetailsPage.js b/cypress/support/pages/catalog/products/productDetailsPage.js index b2873c749..fe6b6a839 100644 --- a/cypress/support/pages/catalog/products/productDetailsPage.js +++ b/cypress/support/pages/catalog/products/productDetailsPage.js @@ -152,6 +152,7 @@ export function addVariantToDataGrid(variantName) { export function enterVariantEditPage() { cy.get(PRODUCT_DETAILS.dataGridTable) + .scrollIntoView() .should("be.visible") .wait(1000) .get(PRODUCT_DETAILS.editVariant)