diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e21f06193..c5da29b5d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -87,6 +87,24 @@ jobs: echo "::set-output name=custom_api_uri::$(echo $pull_request_body | grep -Eo "$prefix$pattern" | sed s/$prefix// | head -n 1)" - name: Cypress run + if: ${{ steps.api_uri.outputs.custom_api_uri}} != 'https://qa.staging.saleor.cloud/graphql/' + uses: cypress-io/github-action@v2 + env: + API_URI: ${{ steps.api_uri.outputs.custom_api_uri || secrets.API_URI }} + APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }} + CYPRESS_baseUrl: ${{ secrets.CYPRESS_BASEURL }} + CYPRESS_USER_NAME: ${{ secrets.CYPRESS_USER_NAME }} + CYPRESS_SECOND_USER_NAME: ${{ secrets.CYPRESS_SECOND_USER_NAME }} + CYPRESS_USER_PASSWORD: ${{ secrets.CYPRESS_USER_PASSWORD }} + CYPRESS_PERMISSIONS_USERS_PASSWORD: ${{ secrets.CYPRESS_PERMISSIONS_USERS_PASSWORD }} + with: + build: npm run build + start: npx local-web-server --spa index.html + wait-on: http://localhost:9000/ + wait-on-timeout: 120 + spec: cypress/integration/allEnv/**/*.js + - name: Cypress run + if: ${{ steps.api_uri.outputs.custom_api_uri}} == 'https://qa.staging.saleor.cloud/graphql/' uses: cypress-io/github-action@v2 env: API_URI: ${{ steps.api_uri.outputs.custom_api_uri || secrets.API_URI }} @@ -106,7 +124,7 @@ jobs: with: name: cypress-videos path: cypress/videos - + translation-messages: runs-on: ubuntu-latest steps: diff --git a/cypress/apiRequests/Checkout.js b/cypress/apiRequests/Checkout.js index ccab375e4..f471fab10 100644 --- a/cypress/apiRequests/Checkout.js +++ b/cypress/apiRequests/Checkout.js @@ -1,4 +1,9 @@ -import { getDefaultAddress, getVariantsLines } from "./utils/Utils"; +import { + getDefaultAddress, + getPaymentDataLine, + getValueWithDefault, + getVariantsLines +} from "./utils/Utils"; export function createCheckout({ channelSlug, @@ -45,21 +50,33 @@ export function addShippingMethod(checkoutId, shippingMethodId) { const mutation = `mutation{ checkoutShippingMethodUpdate(checkoutId:"${checkoutId}", shippingMethodId:"${shippingMethodId}"){ - checkoutErrors{ - message + errors{ + message field - } + } + checkout{ + totalPrice{ + gross{ + amount + } + } + } } }`; - return cy.sendRequestWithQuery(mutation); + return cy + .sendRequestWithQuery(mutation) + .its("body.data.checkoutShippingMethodUpdate"); } -export function addPayment(checkoutId, gateway, token) { +export function addPayment({ checkoutId, gateway, token, amount }) { + const tokenLine = getValueWithDefault(token, `token:"${token}"`); + const amountLine = getValueWithDefault(amount, `amount: ${amount}`); const mutation = `mutation{ checkoutPaymentCreate(checkoutId:"${checkoutId}", input:{ gateway: "${gateway}" - token:"${token}" + ${tokenLine} + ${amountLine} }){ paymentErrors{ field @@ -72,9 +89,10 @@ export function addPayment(checkoutId, gateway, token) { .its("body.data.checkoutPaymentCreate"); } -export function completeCheckout(checkoutId) { +export function completeCheckout(checkoutId, paymentData) { + const paymentDataLine = getPaymentDataLine(paymentData); const mutation = `mutation{ - checkoutComplete(checkoutId:"${checkoutId}"){ + checkoutComplete(checkoutId:"${checkoutId}" ${paymentDataLine}){ order{ id } @@ -86,9 +104,7 @@ export function completeCheckout(checkoutId) { } } }`; - return cy - .sendRequestWithQuery(mutation) - .its("body.data.checkoutComplete.order"); + return cy.sendRequestWithQuery(mutation).its("body.data.checkoutComplete"); } export function addVoucher(checkoutId, voucherCode) { diff --git a/cypress/apiRequests/Order.js b/cypress/apiRequests/Order.js index 212255abf..dc1f8613d 100644 --- a/cypress/apiRequests/Order.js +++ b/cypress/apiRequests/Order.js @@ -69,6 +69,7 @@ export function getOrder(orderId) { const query = `query getOrder{ order(id:"${orderId}"){ status + paymentStatus isShippingRequired shippingMethod{ id diff --git a/cypress/apiRequests/utils/Utils.js b/cypress/apiRequests/utils/Utils.js index 4bd266a87..e199a0ca5 100644 --- a/cypress/apiRequests/utils/Utils.js +++ b/cypress/apiRequests/utils/Utils.js @@ -25,3 +25,7 @@ export function getVariantsLines(variantsList, quantity) { variantId:"${variant.id}"}` ); } +export const getPaymentDataLine = paymentData => + paymentData + ? `, paymentData:"{\\"riskData\\":{\\"clientData\\":\\"${paymentData.clientData}\\"}, \\"paymentMethod\\":{\\"type\\":\\"scheme\\", \\"encryptedCardNumber\\":\\"${paymentData.encryptedCardNumber}\\", \\"encryptedExpiryMonth\\":\\"${paymentData.encryptedExpiryMonth}\\", \\"encryptedExpiryYear\\":\\"${paymentData.encryptedExpiryYear}\\", \\"encryptedSecurityCode\\":\\"${paymentData.encryptedSecurityCode}\\", \\"brand\\":\\"${paymentData.brand}\\"}}"` + : ""; diff --git a/cypress/elements/channels/available-channels-form.js b/cypress/elements/channels/available-channels-form.js index c3316ad6a..7a14ed705 100644 --- a/cypress/elements/channels/available-channels-form.js +++ b/cypress/elements/channels/available-channels-form.js @@ -1,6 +1,6 @@ export const AVAILABLE_CHANNELS_FORM = { menageChannelsButton: "[data-test-id='channels-availiability-manage-button']", - assignedChannels: "[class*=expandIcon]", + assignedChannels: "[data-test-id='expand-icon']", publishedRadioButtons: "[name*='isPublished']", availableForPurchaseRadioButtons: "[name*='isAvailableForPurchase']", radioButtonsValueTrue: "[value='true']", diff --git a/cypress/elements/shared/button-selectors.js b/cypress/elements/shared/button-selectors.js index 2062b20dc..584f90913 100644 --- a/cypress/elements/shared/button-selectors.js +++ b/cypress/elements/shared/button-selectors.js @@ -8,5 +8,5 @@ export const BUTTON_SELECTORS = { selectOption: "[data-test*='select-option']", notSelectedOption: ":not([aria-selected])", deleteButton: '[data-test="button-bar-delete"]', - expandIcon: `[class*="expandIcon"]` + expandIcon: '[data-test-id="expand-icon"]' }; diff --git a/cypress/elements/shared/sharedElements.js b/cypress/elements/shared/sharedElements.js index 25291ab24..4a2375bb6 100644 --- a/cypress/elements/shared/sharedElements.js +++ b/cypress/elements/shared/sharedElements.js @@ -1,4 +1,5 @@ export const SHARED_ELEMENTS = { header: "[data-test-id='page-header']", - progressBar: '[role="progressbar"]' + progressBar: '[role="progressbar"]', + skeleton: '[data-test-id="skeleton"]' }; diff --git a/cypress/fixtures/addresses.json b/cypress/fixtures/addresses.json index 12107df59..a4ab78ac7 100644 --- a/cypress/fixtures/addresses.json +++ b/cypress/fixtures/addresses.json @@ -12,5 +12,19 @@ "phone": "123456787", "currency": "PLN", "countryFullName": "Poland" + }, + "usAddress": { + "firstName": "test", + "lastName": "test", + "companyName": "Test2", + "streetAddress1": "Antonio Ridge", + "streetAddress2": "34930", + "city": "North Patrickfort", + "postalCode": "70957", + "country": "US", + "countryArea": "LA", + "phone": "2025550189", + "currency": "USD", + "countryFullName": "United States of America" } } \ No newline at end of file diff --git a/cypress/fixtures/cards.json b/cypress/fixtures/cards.json new file mode 100644 index 000000000..aa4dcfa16 --- /dev/null +++ b/cypress/fixtures/cards.json @@ -0,0 +1,35 @@ +{ + "clientData": "eyJ2ZXJzaW9uIjoiMS4wLjAiLCJkZXZpY2VGaW5nZXJwcmludCI6InpabUlDMEVYOHcwMDMwMDAwMDAwMDAwMDAwS1piSVFqNmt6czAwNjA4MjQxOTBjVkI5NGlLekJHS1IybWJMc3JmckFKUEdCY2JHSG0wMDZpdmJTdVlkRzBSMDAwMDBZVnhFcjAwMDAwVk1yM0h5dHhQNmlaQ3FuSTRsc2s6NDAiLCJwZXJzaXN0ZW50Q29va2llIjpbXSwiY29tcG9uZW50cyI6eyJ1c2VyQWdlbnQiOiJkYzJjNDM2MThlOTM0YjY2NmIwOWIxNmEzZDE4NmViZCIsIndlYmRyaXZlciI6MCwibGFuZ3VhZ2UiOiJwbC1QTCIsImNvbG9yRGVwdGgiOjMwLCJkZXZpY2VNZW1vcnkiOjgsInBpeGVsUmF0aW8iOjIsImhhcmR3YXJlQ29uY3VycmVuY3kiOjEyLCJzY3JlZW5XaWR0aCI6MTc5Miwic2NyZWVuSGVpZ2h0IjoxMTIwLCJhdmFpbGFibGVTY3JlZW5XaWR0aCI6MTc5MiwiYXZhaWxhYmxlU2NyZWVuSGVpZ2h0IjoxMDMwLCJ0aW1lem9uZU9mZnNldCI6LTEyMCwidGltZXpvbmUiOiJFdXJvcGUvV2Fyc2F3Iiwic2Vzc2lvblN0b3JhZ2UiOjEsImxvY2FsU3RvcmFnZSI6MSwiaW5kZXhlZERiIjoxLCJhZGRCZWhhdmlvciI6MCwib3BlbkRhdGFiYXNlIjoxLCJwbGF0Zm9ybSI6Ik1hY0ludGVsIiwicGx1Z2lucyI6ImMxMzU2NDM4NzUxNzZkZWU5MTkyZTE5ZDRkOGM3YTkwIiwiY2FudmFzIjoiZDYxNjRlNzA3ZWQ4NDdlNTE4OGE1YjUyMDhmNDI1OGIiLCJ3ZWJnbCI6IjcwM2ZjZWMyM2MxNjhlYjAzNmM0MjA3MzA1ODYzZmNlIiwid2ViZ2xWZW5kb3JBbmRSZW5kZXJlciI6IkludGVsIEluYy5+SW50ZWwoUikgVUhEIEdyYXBoaWNzIDYzMCIsImFkQmxvY2siOjAsImhhc0xpZWRMYW5ndWFnZXMiOjAsImhhc0xpZWRSZXNvbHV0aW9uIjowLCJoYXNMaWVkT3MiOjAsImhhc0xpZWRCcm93c2VyIjowLCJmb250cyI6IjI5MmVhMmNjZWNjZDAyYjAxYzBjNGMxZDQxMzIxNzVlIiwiYXVkaW8iOiIzOTRmNjQwMGY0NDg5NDIwNDIzZGYzMzY1OGU1NGJlNiIsImVudW1lcmF0ZURldmljZXMiOiJmMjA4Yzc3MWExNjBiNjRmNDkzOWFmYmE1OTY2YTRhZiJ9fQ==", + "encryptedExpiryMonth": "test_03", + "encryptedExpiryYear": "test_2030", + "encryptedSecurityCodes": { + "unknown": "665", + "matches": "test_001" + }, + "cards": { + "simpleCard": { + "brand": "visa", + "encryptedCardNumber": "test_4111111145551142" + }, + "threeDSecureOneAuth": { + "brand": "visa", + "encryptedCardNumber": "test_4212345678901237" + }, + "threeDSecureTwoAuth": { + "encryptedCardNumber": "test_5454545454545454", + "brand": "mc" + }, + "errorCard": { + "brand": "visa", + "encryptedCardNumber": "test_5201282999005515" + }, + "closeAccount" : { + "brand": "visa", + "encryptedCardNumber" : "test_5454541580311093" + }, + "avs" : { + "brand": "visa", + "encryptedCardNumber" : "test_4400000000000008" + } + } +} \ No newline at end of file diff --git a/cypress/integration/collections.js b/cypress/integration/allEnv/collections.js similarity index 86% rename from cypress/integration/collections.js rename to cypress/integration/allEnv/collections.js index 4677d3544..ecbf11f7c 100644 --- a/cypress/integration/collections.js +++ b/cypress/integration/allEnv/collections.js @@ -1,24 +1,24 @@ // import faker from "faker"; -import { createChannel } from "../apiRequests/Channels"; -import { updateChannelInProduct } from "../apiRequests/Product"; -import { getCollection } from "../apiRequests/storeFront/Collections"; -import { searchInShop } from "../apiRequests/storeFront/Search"; +import { createChannel } from "../../apiRequests/Channels"; +import { updateChannelInProduct } from "../../apiRequests/Product"; +import { getCollection } from "../../apiRequests/storeFront/Collections"; +import { searchInShop } from "../../apiRequests/storeFront/Search"; import { assignProductsToCollection, createCollection -} from "../steps/collectionsSteps"; -import { urlList } from "../url/urlList"; -import * as channelsUtils from "../utils/channelsUtils"; -import { deleteCollectionsStartsWith } from "../utils/collectionsUtils"; -import * as productsUtils from "../utils/products/productsUtils"; -import { deleteShippingStartsWith } from "../utils/shippingUtils"; +} from "../../steps/collectionsSteps"; +import { urlList } from "../../url/urlList"; +import * as channelsUtils from "../../utils/channelsUtils"; +import { deleteCollectionsStartsWith } from "../../utils/collectionsUtils"; +import * as productsUtils from "../../utils/products/productsUtils"; +import { deleteShippingStartsWith } from "../../utils/shippingUtils"; import { isCollectionVisible, isProductInCollectionVisible -} from "../utils/storeFront/collectionsUtils"; -import { isProductVisibleInSearchResult } from "../utils/storeFront/storeFrontProductUtils"; +} from "../../utils/storeFront/collectionsUtils"; +import { isProductVisibleInSearchResult } from "../../utils/storeFront/storeFrontProductUtils"; describe("Collections", () => { const startsWith = "CyCollections-"; diff --git a/cypress/integration/configuration/channels.js b/cypress/integration/allEnv/configuration/channels.js similarity index 73% rename from cypress/integration/configuration/channels.js rename to cypress/integration/allEnv/configuration/channels.js index 0cc10de34..0ac6d515f 100644 --- a/cypress/integration/configuration/channels.js +++ b/cypress/integration/allEnv/configuration/channels.js @@ -1,23 +1,23 @@ // import faker from "faker"; -import { createChannel } from "../../apiRequests/Channels"; -import { LEFT_MENU_SELECTORS } from "../../elements/account/left-menu/left-menu-selectors"; -import { PRODUCTS_LIST } from "../../elements/catalog/products/products-list"; -import { ADD_CHANNEL_FORM_SELECTORS } from "../../elements/channels/add-channel-form-selectors"; -import { AVAILABLE_CHANNELS_FORM } from "../../elements/channels/available-channels-form"; -import { CHANNEL_FORM_SELECTORS } from "../../elements/channels/channel-form-selectors"; -import { CHANNELS_SELECTORS } from "../../elements/channels/channels-selectors"; -import { SELECT_CHANNELS_TO_ASSIGN } from "../../elements/channels/select-channels-to-assign"; -import { CONFIGURATION_SELECTORS } from "../../elements/configuration/configuration-selectors"; -import { HEADER_SELECTORS } from "../../elements/header/header-selectors"; -import { DRAFT_ORDER_SELECTORS } from "../../elements/orders/draft-order-selectors"; -import { ORDERS_SELECTORS } from "../../elements/orders/orders-selectors"; -import { BUTTON_SELECTORS } from "../../elements/shared/button-selectors"; -import { SHARED_ELEMENTS } from "../../elements/shared/sharedElements"; -import { createChannelByView } from "../../steps/channelsSteps"; -import { urlList } from "../../url/urlList"; -import { deleteChannelsStartsWith } from "../../utils/channelsUtils"; +import { createChannel } from "../../../apiRequests/Channels"; +import { LEFT_MENU_SELECTORS } from "../../../elements/account/left-menu/left-menu-selectors"; +import { PRODUCTS_LIST } from "../../../elements/catalog/products/products-list"; +import { ADD_CHANNEL_FORM_SELECTORS } from "../../../elements/channels/add-channel-form-selectors"; +import { AVAILABLE_CHANNELS_FORM } from "../../../elements/channels/available-channels-form"; +import { CHANNEL_FORM_SELECTORS } from "../../../elements/channels/channel-form-selectors"; +import { CHANNELS_SELECTORS } from "../../../elements/channels/channels-selectors"; +import { SELECT_CHANNELS_TO_ASSIGN } from "../../../elements/channels/select-channels-to-assign"; +import { CONFIGURATION_SELECTORS } from "../../../elements/configuration/configuration-selectors"; +import { HEADER_SELECTORS } from "../../../elements/header/header-selectors"; +import { DRAFT_ORDER_SELECTORS } from "../../../elements/orders/draft-order-selectors"; +import { ORDERS_SELECTORS } from "../../../elements/orders/orders-selectors"; +import { BUTTON_SELECTORS } from "../../../elements/shared/button-selectors"; +import { SHARED_ELEMENTS } from "../../../elements/shared/sharedElements"; +import { createChannelByView } from "../../../steps/channelsSteps"; +import { urlList } from "../../../url/urlList"; +import { deleteChannelsStartsWith } from "../../../utils/channelsUtils"; describe("Channels", () => { const channelStartsWith = `CyChannels:`; @@ -68,10 +68,8 @@ describe("Channels", () => { cy.addAliasToGraphRequest("InitialProductFilterAttributes"); cy.visit(urlList.products); cy.wait("@InitialProductFilterAttributes"); - cy.get(SHARED_ELEMENTS.progressBar) - .should("not.exist") - .get(PRODUCTS_LIST.emptyProductRow) - .should("not.exist"); + cy.get(SHARED_ELEMENTS.progressBar).should("not.exist"); + cy.get(PRODUCTS_LIST.emptyProductRow).should("not.exist"); cy.get(PRODUCTS_LIST.productsList) .first() .click() diff --git a/cypress/integration/configuration/productTypes/purchaseWithProductTypes.js b/cypress/integration/allEnv/configuration/purchaseWithProductTypes.js similarity index 99% rename from cypress/integration/configuration/productTypes/purchaseWithProductTypes.js rename to cypress/integration/allEnv/configuration/purchaseWithProductTypes.js index 91d0498aa..9b3897989 100644 --- a/cypress/integration/configuration/productTypes/purchaseWithProductTypes.js +++ b/cypress/integration/allEnv/configuration/purchaseWithProductTypes.js @@ -219,7 +219,7 @@ describe("Purchase products with all products types", () => { .then(() => { completeCheckout(checkout.id); }) - .then(order => { + .then(({ order }) => { getOrder(order.id); }) .then(order => { diff --git a/cypress/integration/configuration/shippingMethod.js b/cypress/integration/allEnv/configuration/shippingMethod.js similarity index 86% rename from cypress/integration/configuration/shippingMethod.js rename to cypress/integration/allEnv/configuration/shippingMethod.js index 0b6ff900c..af13fa2e9 100644 --- a/cypress/integration/configuration/shippingMethod.js +++ b/cypress/integration/allEnv/configuration/shippingMethod.js @@ -1,26 +1,26 @@ // import faker from "faker"; -import { createChannel } from "../../apiRequests/Channels"; -import { createCheckout } from "../../apiRequests/Checkout"; +import { createChannel } from "../../../apiRequests/Channels"; +import { createCheckout } from "../../../apiRequests/Checkout"; import { addChannelToShippingMethod, addChannelToShippingZone -} from "../../apiRequests/ShippingMethod"; -import { createWarehouse } from "../../apiRequests/Warehouse"; -import { SHIPPING_ZONE_DETAILS } from "../../elements/shipping/shipping-zone-details"; -import { selectChannelInHeader } from "../../steps/channelsSteps"; +} from "../../../apiRequests/ShippingMethod"; +import { createWarehouse } from "../../../apiRequests/Warehouse"; +import { SHIPPING_ZONE_DETAILS } from "../../../elements/shipping/shipping-zone-details"; +import { selectChannelInHeader } from "../../../steps/channelsSteps"; import { createShippingRate, createShippingZone, rateOptions -} from "../../steps/shippingMethodSteps"; -import { getFormattedCurrencyAmount } from "../../support/format/formatCurrencyAmount"; -import { urlList } from "../../url/urlList"; -import * as channelsUtils from "../../utils/channelsUtils"; -import * as productsUtils from "../../utils/products/productsUtils"; -import * as shippingUtils from "../../utils/shippingUtils"; -import { isShippingAvailableInCheckout } from "../../utils/storeFront/checkoutUtils"; +} from "../../../steps/shippingMethodSteps"; +import { getFormattedCurrencyAmount } from "../../../support/format/formatCurrencyAmount"; +import { urlList } from "../../../url/urlList"; +import * as channelsUtils from "../../../utils/channelsUtils"; +import * as productsUtils from "../../../utils/products/productsUtils"; +import * as shippingUtils from "../../../utils/shippingUtils"; +import { isShippingAvailableInCheckout } from "../../../utils/storeFront/checkoutUtils"; describe("Shipping methods", () => { const startsWith = "CyShippingMethods-"; diff --git a/cypress/integration/configuration/warehouse.js b/cypress/integration/allEnv/configuration/warehouse.js similarity index 92% rename from cypress/integration/configuration/warehouse.js rename to cypress/integration/allEnv/configuration/warehouse.js index 549a9ab53..8c3820023 100644 --- a/cypress/integration/configuration/warehouse.js +++ b/cypress/integration/allEnv/configuration/warehouse.js @@ -1,5 +1,5 @@ // -import { urlList } from "../../url/urlList"; +import { urlList } from "../../../url/urlList"; describe("Warehouse settings", () => { beforeEach(() => { diff --git a/cypress/integration/discounts/sales.js b/cypress/integration/allEnv/discounts/sales.js similarity index 89% rename from cypress/integration/discounts/sales.js rename to cypress/integration/allEnv/discounts/sales.js index 00145c0cc..5b739ad55 100644 --- a/cypress/integration/discounts/sales.js +++ b/cypress/integration/allEnv/discounts/sales.js @@ -2,22 +2,22 @@ import faker from "faker"; -import { createChannel } from "../../apiRequests/Channels"; -import { updateChannelInProduct } from "../../apiRequests/Product"; +import { createChannel } from "../../../apiRequests/Channels"; +import { updateChannelInProduct } from "../../../apiRequests/Product"; import { assignProducts, createSale, discountOptions -} from "../../steps/discounts/salesSteps"; -import { urlList } from "../../url/urlList"; -import * as channelsUtils from "../../utils/channelsUtils"; -import { deleteSalesStartsWith } from "../../utils/discounts/salesUtils"; -import * as productsUtils from "../../utils/products/productsUtils"; +} from "../../../steps/discounts/salesSteps"; +import { urlList } from "../../../url/urlList"; +import * as channelsUtils from "../../../utils/channelsUtils"; +import { deleteSalesStartsWith } from "../../../utils/discounts/salesUtils"; +import * as productsUtils from "../../../utils/products/productsUtils"; import { createShipping, deleteShippingStartsWith -} from "../../utils/shippingUtils"; -import { getProductPrice } from "../../utils/storeFront/storeFrontProductUtils"; +} from "../../../utils/shippingUtils"; +import { getProductPrice } from "../../../utils/storeFront/storeFrontProductUtils"; describe("Sales discounts", () => { const startsWith = "CySales-"; diff --git a/cypress/integration/discounts/vouchers.js b/cypress/integration/allEnv/discounts/vouchers.js similarity index 90% rename from cypress/integration/discounts/vouchers.js rename to cypress/integration/allEnv/discounts/vouchers.js index 48bf82bca..58c13b490 100644 --- a/cypress/integration/discounts/vouchers.js +++ b/cypress/integration/allEnv/discounts/vouchers.js @@ -1,20 +1,20 @@ // import faker from "faker"; -import { createChannel } from "../../apiRequests/Channels"; +import { createChannel } from "../../../apiRequests/Channels"; import { createVoucher, discountOptions -} from "../../steps/discounts/vouchersSteps"; -import { urlList } from "../../url/urlList"; -import * as channelsUtils from "../../utils/channelsUtils"; -import { deleteVouchersStartsWith } from "../../utils/discounts/vouchersUtils"; -import { createCheckoutWithVoucher } from "../../utils/ordersUtils"; -import * as productsUtils from "../../utils/products/productsUtils"; +} from "../../../steps/discounts/vouchersSteps"; +import { urlList } from "../../../url/urlList"; +import * as channelsUtils from "../../../utils/channelsUtils"; +import { deleteVouchersStartsWith } from "../../../utils/discounts/vouchersUtils"; +import { createCheckoutWithVoucher } from "../../../utils/ordersUtils"; +import * as productsUtils from "../../../utils/products/productsUtils"; import { createShipping, deleteShippingStartsWith -} from "../../utils/shippingUtils"; +} from "../../../utils/shippingUtils"; describe("Vouchers discounts", () => { const startsWith = "CyVou-"; diff --git a/cypress/integration/homePage/homePage.js b/cypress/integration/allEnv/homePage/homePage.js similarity index 77% rename from cypress/integration/homePage/homePage.js rename to cypress/integration/allEnv/homePage/homePage.js index 26fd69ed4..96c525e92 100644 --- a/cypress/integration/homePage/homePage.js +++ b/cypress/integration/allEnv/homePage/homePage.js @@ -1,6 +1,6 @@ -import { TEST_ADMIN_USER, USER_WITHOUT_NAME } from "../../Data/users"; -import { HOMEPAGE_SELECTORS } from "../../elements/homePage/homePage-selectors"; -import { urlList } from "../../url/urlList"; +import { TEST_ADMIN_USER, USER_WITHOUT_NAME } from "../../../Data/users"; +import { HOMEPAGE_SELECTORS } from "../../../elements/homePage/homePage-selectors"; +import { urlList } from "../../../url/urlList"; describe("Displaying welcome message on home page", () => { it("should display user name on home page", () => { diff --git a/cypress/integration/homePage/homePageAnalitics.js b/cypress/integration/allEnv/homePage/homePageAnalitics.js similarity index 93% rename from cypress/integration/homePage/homePageAnalitics.js rename to cypress/integration/allEnv/homePage/homePageAnalitics.js index f0762ed84..d4a741107 100644 --- a/cypress/integration/homePage/homePageAnalitics.js +++ b/cypress/integration/allEnv/homePage/homePageAnalitics.js @@ -3,18 +3,18 @@ import faker from "faker"; import { createCustomer, deleteCustomersStartsWith -} from "../../apiRequests/Customer"; -import { HOMEPAGE_SELECTORS } from "../../elements/homePage/homePage-selectors"; -import { changeChannel } from "../../steps/homePageSteps"; -import { urlList } from "../../url/urlList"; -import { getDefaultChannel } from "../../utils/channelsUtils"; -import * as homePageUtils from "../../utils/homePageUtils"; +} from "../../../apiRequests/Customer"; +import { HOMEPAGE_SELECTORS } from "../../../elements/homePage/homePage-selectors"; +import { changeChannel } from "../../../steps/homePageSteps"; +import { urlList } from "../../../url/urlList"; +import { getDefaultChannel } from "../../../utils/channelsUtils"; +import * as homePageUtils from "../../../utils/homePageUtils"; import { createReadyToFulfillOrder, createWaitingForCaptureOrder -} from "../../utils/ordersUtils"; -import * as productsUtils from "../../utils/products/productsUtils"; -import * as shippingUtils from "../../utils/shippingUtils"; +} from "../../../utils/ordersUtils"; +import * as productsUtils from "../../../utils/products/productsUtils"; +import * as shippingUtils from "../../../utils/shippingUtils"; // describe("Homepage analytics", () => { diff --git a/cypress/integration/login_form.js b/cypress/integration/allEnv/login_form.js similarity index 89% rename from cypress/integration/login_form.js rename to cypress/integration/allEnv/login_form.js index c970a8855..71021af35 100644 --- a/cypress/integration/login_form.js +++ b/cypress/integration/allEnv/login_form.js @@ -1,6 +1,6 @@ // -import { LOGIN_SELECTORS } from "../elements/account/login-selectors"; -import { urlList } from "../url/urlList"; +import { LOGIN_SELECTORS } from "../../elements/account/login-selectors"; +import { urlList } from "../../url/urlList"; describe("User authorization", () => { beforeEach(() => { diff --git a/cypress/integration/navigation.js b/cypress/integration/allEnv/navigation.js similarity index 91% rename from cypress/integration/navigation.js rename to cypress/integration/allEnv/navigation.js index 1da549182..f2661e044 100644 --- a/cypress/integration/navigation.js +++ b/cypress/integration/allEnv/navigation.js @@ -1,5 +1,5 @@ -import { PERMISSIONS_OPTIONS } from "../Data/permissionsUsers"; -import * as permissionsSteps from "../steps/permissions"; +import { PERMISSIONS_OPTIONS } from "../../Data/permissionsUsers"; +import * as permissionsSteps from "../../steps/permissions"; describe("Navigation for users with different permissions", () => { Object.keys(PERMISSIONS_OPTIONS).forEach(key => { diff --git a/cypress/integration/orders/channelsInDraftOrders.js b/cypress/integration/allEnv/orders/channelsInDraftOrders.js similarity index 83% rename from cypress/integration/orders/channelsInDraftOrders.js rename to cypress/integration/allEnv/orders/channelsInDraftOrders.js index f24b4590a..464e58303 100644 --- a/cypress/integration/orders/channelsInDraftOrders.js +++ b/cypress/integration/allEnv/orders/channelsInDraftOrders.js @@ -1,17 +1,17 @@ // import faker from "faker"; -import { createChannel } from "../../apiRequests/Channels"; -import { CHANNEL_FORM_SELECTORS } from "../../elements/channels/channel-form-selectors"; -import { HEADER_SELECTORS } from "../../elements/header/header-selectors"; -import { DRAFT_ORDER_SELECTORS } from "../../elements/orders/draft-order-selectors"; -import { ORDERS_SELECTORS } from "../../elements/orders/orders-selectors"; +import { createChannel } from "../../../apiRequests/Channels"; +import { CHANNEL_FORM_SELECTORS } from "../../../elements/channels/channel-form-selectors"; +import { HEADER_SELECTORS } from "../../../elements/header/header-selectors"; +import { DRAFT_ORDER_SELECTORS } from "../../../elements/orders/draft-order-selectors"; +import { ORDERS_SELECTORS } from "../../../elements/orders/orders-selectors"; import { selectChannelInHeader, selectChannelInPicker -} from "../../steps/channelsSteps"; -import { urlList } from "../../url/urlList"; -import * as channelsUtils from "../../utils/channelsUtils"; +} from "../../../steps/channelsSteps"; +import { urlList } from "../../../url/urlList"; +import * as channelsUtils from "../../../utils/channelsUtils"; describe("Channels in draft orders", () => { const startsWith = "CyChannelInDraftOrders-"; diff --git a/cypress/integration/orders/draftOrders.js b/cypress/integration/allEnv/orders/draftOrders.js similarity index 81% rename from cypress/integration/orders/draftOrders.js rename to cypress/integration/allEnv/orders/draftOrders.js index 98e30938b..38e30c859 100644 --- a/cypress/integration/orders/draftOrders.js +++ b/cypress/integration/allEnv/orders/draftOrders.js @@ -4,18 +4,18 @@ import faker from "faker"; import { createCustomer, deleteCustomersStartsWith -} from "../../apiRequests/Customer"; -import { DRAFT_ORDERS_LIST_SELECTORS } from "../../elements/orders/draft-orders-list-selectors"; -import { ORDERS_SELECTORS } from "../../elements/orders/orders-selectors"; -import { selectChannelInPicker } from "../../steps/channelsSteps"; -import { finalizeDraftOrder } from "../../steps/draftOrderSteps"; -import { urlList } from "../../url/urlList"; -import { getDefaultChannel } from "../../utils/channelsUtils"; -import * as productsUtils from "../../utils/products/productsUtils"; +} from "../../../apiRequests/Customer"; +import { DRAFT_ORDERS_LIST_SELECTORS } from "../../../elements/orders/draft-orders-list-selectors"; +import { ORDERS_SELECTORS } from "../../../elements/orders/orders-selectors"; +import { selectChannelInPicker } from "../../../steps/channelsSteps"; +import { finalizeDraftOrder } from "../../../steps/draftOrderSteps"; +import { urlList } from "../../../url/urlList"; +import { getDefaultChannel } from "../../../utils/channelsUtils"; +import * as productsUtils from "../../../utils/products/productsUtils"; import { createShipping, deleteShippingStartsWith -} from "../../utils/shippingUtils"; +} from "../../../utils/shippingUtils"; describe("Draft orders", () => { const startsWith = "CyDraftOrders-"; diff --git a/cypress/integration/orders/orders.js b/cypress/integration/allEnv/orders/orders.js similarity index 84% rename from cypress/integration/orders/orders.js rename to cypress/integration/allEnv/orders/orders.js index 184575e8f..c46373f3a 100644 --- a/cypress/integration/orders/orders.js +++ b/cypress/integration/allEnv/orders/orders.js @@ -4,18 +4,18 @@ import faker from "faker"; import { createCustomer, deleteCustomersStartsWith -} from "../../apiRequests/Customer"; -import { ORDERS_SELECTORS } from "../../elements/orders/orders-selectors"; -import { selectChannelInPicker } from "../../steps/channelsSteps"; -import { finalizeDraftOrder } from "../../steps/draftOrderSteps"; -import { urlList } from "../../url/urlList"; -import { getDefaultChannel } from "../../utils/channelsUtils"; -import { createOrder } from "../../utils/ordersUtils"; -import * as productsUtils from "../../utils/products/productsUtils"; +} from "../../../apiRequests/Customer"; +import { ORDERS_SELECTORS } from "../../../elements/orders/orders-selectors"; +import { selectChannelInPicker } from "../../../steps/channelsSteps"; +import { finalizeDraftOrder } from "../../../steps/draftOrderSteps"; +import { urlList } from "../../../url/urlList"; +import { getDefaultChannel } from "../../../utils/channelsUtils"; +import { createOrder } from "../../../utils/ordersUtils"; +import * as productsUtils from "../../../utils/products/productsUtils"; import { createShipping, deleteShippingStartsWith -} from "../../utils/shippingUtils"; +} from "../../../utils/shippingUtils"; describe("Orders", () => { const startsWith = "CyOrders-"; diff --git a/cypress/integration/allEnv/productTypes/purchaseWithProductTypes.js b/cypress/integration/allEnv/productTypes/purchaseWithProductTypes.js new file mode 100644 index 000000000..9b3897989 --- /dev/null +++ b/cypress/integration/allEnv/productTypes/purchaseWithProductTypes.js @@ -0,0 +1,233 @@ +import faker from "faker"; + +import { createAttribute } from "../../../apiRequests/Attribute"; +import { createCategory } from "../../../apiRequests/Category"; +import { + checkoutShippingAddressUpdate, + checkoutShippingMethodUpdate, + checkoutVariantsUpdate, + completeCheckout, + createCheckout +} from "../../../apiRequests/Checkout"; +import { getOrder } from "../../../apiRequests/Order"; +import { createTypeProduct } from "../../../apiRequests/Product"; +import { getDefaultChannel } from "../../../utils/channelsUtils"; +import { + addPayment, + createAndCompleteCheckoutWithoutShipping, + createWaitingForCaptureOrder +} from "../../../utils/ordersUtils"; +import { + createProductInChannel, + deleteProductsStartsWith +} from "../../../utils/products/productsUtils"; +import { + createShipping, + deleteShippingStartsWith +} from "../../../utils/shippingUtils"; + +describe("Purchase products with all products types", () => { + const startsWith = `CyPurchaseByType`; + const name = `${startsWith}${faker.datatype.number()}`; + const email = `${startsWith}@example.com`; + const testsMessage = "Check order status"; + const { softExpect } = chai; + + let defaultChannel; + let address; + let warehouse; + let attribute; + let category; + let shippingMethod; + let createProductData; + + before(() => { + cy.clearSessionData().loginUserViaRequest(); + deleteProductsStartsWith(startsWith); + deleteShippingStartsWith(startsWith); + getDefaultChannel().then(channelResp => (defaultChannel = channelResp)); + cy.fixture("addresses") + .then(addresses => { + address = addresses.usAddress; + createShipping({ + channelId: defaultChannel.id, + name, + address, + price: 10 + }); + }) + .then( + ({ warehouse: warehouseResp, shippingMethod: shippingMethodResp }) => { + warehouse = warehouseResp; + shippingMethod = shippingMethodResp; + } + ); + createAttribute(name) + .then(attributeResp => { + attribute = attributeResp; + createCategory(name); + }) + .then(categoryResp => { + category = categoryResp; + }); + }); + + beforeEach(() => { + cy.clearSessionData().loginUserViaRequest(); + createProductData = { + channelId: defaultChannel.id, + warehouseId: warehouse.id, + quantityInWarehouse: 10, + attributeId: attribute.id, + categoryId: category.id, + price: 10 + }; + }); + + it("should purchase digital product", () => { + const digitalName = `${startsWith}${faker.datatype.number()}`; + createTypeProduct({ + name: digitalName, + attributeId: attribute.id, + shippable: false + }) + .then(productType => { + createProductData.name = digitalName; + createProductData.productTypeId = productType.id; + createProductInChannel(createProductData); + }) + .then(({ variantsList }) => { + createAndCompleteCheckoutWithoutShipping({ + channelSlug: defaultChannel.slug, + email, + billingAddress: address, + variantsList, + auth: "token" + }); + }) + .then(({ order }) => { + getOrder(order.id); + }) + .then(order => { + softExpect( + order.isShippingRequired, + "Check if is shipping required in order" + ).to.eq(false); + expect(order.status, testsMessage).to.be.eq("UNFULFILLED"); + }); + }); + + it("should purchase physical product", () => { + const physicalName = `${startsWith}${faker.datatype.number()}`; + createTypeProduct({ + name: physicalName, + attributeId: attribute.id, + shippable: true + }) + .then(productType => { + createProductData.name = physicalName; + createProductData.productTypeId = productType.id; + createProductInChannel(createProductData); + }) + .then(({ variantsList }) => { + createWaitingForCaptureOrder( + defaultChannel.slug, + email, + variantsList, + shippingMethod.id, + address + ); + }) + .then(({ order }) => { + getOrder(order.id); + }) + .then(order => { + softExpect( + order.isShippingRequired, + "Check if is shipping required in order" + ).to.eq(true); + expect(order.status, testsMessage).to.be.eq("UNFULFILLED"); + }); + }); + it("should purchase multiple products with all product types", () => { + const physicalName = `${startsWith}${faker.datatype.number()}`; + const digitalName = `${startsWith}${faker.datatype.number()}`; + let digitalProductVariantsList; + let checkout; + createTypeProduct({ + name: digitalName, + attributeId: attribute.id, + shippable: false + }) + .then(productType => { + createProductData.name = digitalName; + createProductData.productTypeId = productType.id; + createProductInChannel(createProductData); + }) + .then(({ variantsList }) => { + digitalProductVariantsList = variantsList; + createCheckout({ + channelSlug: defaultChannel.slug, + email, + variantsList: digitalProductVariantsList, + billingAddress: address, + auth: "token" + }); + }) + .then(checkoutResp => { + checkout = checkoutResp; + addPayment(checkout.id); + }) + .then(() => { + createTypeProduct({ + name: physicalName, + attributeId: attribute.id, + shippable: true + }); + }) + .then(productType => { + createProductData.name = physicalName; + createProductData.productTypeId = productType.id; + createProductInChannel(createProductData); + }) + .then(({ variantsList }) => { + checkoutVariantsUpdate(checkout.id, variantsList); + }) + .then(() => { + checkoutShippingMethodUpdate(checkout.id, shippingMethod.id); + }) + .then(({ checkoutErrors }) => { + expect( + checkoutErrors, + "Should be not possible to add shipping method without shipping address" + ).to.have.lengthOf(1); + checkoutShippingAddressUpdate(checkout.id, address); + }) + .then(() => { + addPayment(checkout.id); + }) + .then(({ paymentErrors }) => { + expect( + paymentErrors, + "Should be not possible to add payment without shipping" + ).to.have.lengthOf(1); + checkoutShippingMethodUpdate(checkout.id, shippingMethod.id); + }) + .then(() => { + addPayment(checkout.id); + }) + .then(() => { + completeCheckout(checkout.id); + }) + .then(({ order }) => { + getOrder(order.id); + }) + .then(order => { + softExpect( + order.isShippingRequired, + "Check if is shipping required in order" + ).to.eq(true); + expect(order.status, testsMessage).to.be.eq("UNFULFILLED"); + }); + }); +}); diff --git a/cypress/integration/products/createProduct.js b/cypress/integration/allEnv/products/createProduct.js similarity index 80% rename from cypress/integration/products/createProduct.js rename to cypress/integration/allEnv/products/createProduct.js index da7538338..0bd63ea19 100644 --- a/cypress/integration/products/createProduct.js +++ b/cypress/integration/allEnv/products/createProduct.js @@ -1,24 +1,24 @@ // import faker from "faker"; -import { createAttribute } from "../../apiRequests/Attribute"; -import { createTypeProduct } from "../../apiRequests/Product"; -import { PRODUCT_DETAILS } from "../../elements/catalog/products/product-details"; -import { PRODUCTS_LIST } from "../../elements/catalog/products/products-list"; -import { BUTTON_SELECTORS } from "../../elements/shared/button-selectors"; -import { metadataForms } from "../../steps/catalog/metadataSteps"; +import { createAttribute } from "../../../apiRequests/Attribute"; +import { createTypeProduct } from "../../../apiRequests/Product"; +import { PRODUCT_DETAILS } from "../../../elements/catalog/products/product-details"; +import { PRODUCTS_LIST } from "../../../elements/catalog/products/products-list"; +import { BUTTON_SELECTORS } from "../../../elements/shared/button-selectors"; +import { metadataForms } from "../../../steps/catalog/metadataSteps"; import { fillUpPriceList, priceInputLists -} from "../../steps/catalog/products/priceList"; -import { fillUpCommonFieldsForAllProductTypes } from "../../steps/catalog/products/productSteps"; -import { selectChannelInDetailsPages } from "../../steps/channelsSteps"; -import { urlList } from "../../url/urlList"; +} from "../../../steps/catalog/products/priceList"; +import { fillUpCommonFieldsForAllProductTypes } from "../../../steps/catalog/products/productSteps"; +import { selectChannelInDetailsPages } from "../../../steps/channelsSteps"; +import { urlList } from "../../../url/urlList"; import { expectCorrectProductInformation, expectCorrectProductVariantInformation -} from "../../utils/products/checkProductInfo"; -import * as productUtils from "../../utils/products/productsUtils"; +} from "../../../utils/products/checkProductInfo"; +import * as productUtils from "../../../utils/products/productsUtils"; describe("Create product", () => { const startsWith = "CyCreateProduct-"; diff --git a/cypress/integration/products/menageProducts/availableForPurchaseProducts.js b/cypress/integration/allEnv/products/menageProducts/availableForPurchaseProducts.js similarity index 84% rename from cypress/integration/products/menageProducts/availableForPurchaseProducts.js rename to cypress/integration/allEnv/products/menageProducts/availableForPurchaseProducts.js index 15c466bec..d291612c1 100644 --- a/cypress/integration/products/menageProducts/availableForPurchaseProducts.js +++ b/cypress/integration/allEnv/products/menageProducts/availableForPurchaseProducts.js @@ -1,12 +1,12 @@ import faker from "faker"; -import { getProductDetails } from "../../../apiRequests/storeFront/ProductDetails"; -import { updateProductIsAvailableForPurchase } from "../../../steps/catalog/products/productSteps"; -import { productDetailsUrl } from "../../../url/urlList"; -import { getDefaultChannel } from "../../../utils/channelsUtils"; -import * as productsUtils from "../../../utils/products/productsUtils"; -import * as shippingUtils from "../../../utils/shippingUtils"; -import { isProductAvailableForPurchase } from "../../../utils/storeFront/storeFrontProductUtils"; +import { getProductDetails } from "../../../../apiRequests/storeFront/ProductDetails"; +import { updateProductIsAvailableForPurchase } from "../../../../steps/catalog/products/productSteps"; +import { productDetailsUrl } from "../../../../url/urlList"; +import { getDefaultChannel } from "../../../../utils/channelsUtils"; +import * as productsUtils from "../../../../utils/products/productsUtils"; +import * as shippingUtils from "../../../../utils/shippingUtils"; +import { isProductAvailableForPurchase } from "../../../../utils/storeFront/storeFrontProductUtils"; // describe("Products available in listings", () => { diff --git a/cypress/integration/products/menageProducts/publishedProducts.js b/cypress/integration/allEnv/products/menageProducts/publishedProducts.js similarity index 86% rename from cypress/integration/products/menageProducts/publishedProducts.js rename to cypress/integration/allEnv/products/menageProducts/publishedProducts.js index 3ff563de5..9c8767fb2 100644 --- a/cypress/integration/products/menageProducts/publishedProducts.js +++ b/cypress/integration/allEnv/products/menageProducts/publishedProducts.js @@ -1,11 +1,11 @@ import faker from "faker"; -import { getProductDetails } from "../../../apiRequests/storeFront/ProductDetails"; -import { updateProductPublish } from "../../../steps/catalog/products/productSteps"; -import { productDetailsUrl } from "../../../url/urlList"; -import { getDefaultChannel } from "../../../utils/channelsUtils"; -import * as productsUtils from "../../../utils/products/productsUtils"; -import { isProductVisible } from "../../../utils/storeFront/storeFrontProductUtils"; +import { getProductDetails } from "../../../../apiRequests/storeFront/ProductDetails"; +import { updateProductPublish } from "../../../../steps/catalog/products/productSteps"; +import { productDetailsUrl } from "../../../../url/urlList"; +import { getDefaultChannel } from "../../../../utils/channelsUtils"; +import * as productsUtils from "../../../../utils/products/productsUtils"; +import { isProductVisible } from "../../../../utils/storeFront/storeFrontProductUtils"; // describe("Published products", () => { diff --git a/cypress/integration/products/menageProducts/visibleInListingsProducts.js b/cypress/integration/allEnv/products/menageProducts/visibleInListingsProducts.js similarity index 86% rename from cypress/integration/products/menageProducts/visibleInListingsProducts.js rename to cypress/integration/allEnv/products/menageProducts/visibleInListingsProducts.js index 4dbea964d..b4e74260c 100644 --- a/cypress/integration/products/menageProducts/visibleInListingsProducts.js +++ b/cypress/integration/allEnv/products/menageProducts/visibleInListingsProducts.js @@ -1,11 +1,11 @@ import faker from "faker"; -import { searchInShop } from "../../../apiRequests/storeFront/Search"; -import { updateProductVisibleInListings } from "../../../steps/catalog/products/productSteps"; -import { productDetailsUrl } from "../../../url/urlList"; -import { getDefaultChannel } from "../../../utils/channelsUtils"; -import * as productsUtils from "../../../utils/products/productsUtils"; -import { isProductVisibleInSearchResult } from "../../../utils/storeFront/storeFrontProductUtils"; +import { searchInShop } from "../../../../apiRequests/storeFront/Search"; +import { updateProductVisibleInListings } from "../../../../steps/catalog/products/productSteps"; +import { productDetailsUrl } from "../../../../url/urlList"; +import { getDefaultChannel } from "../../../../utils/channelsUtils"; +import * as productsUtils from "../../../../utils/products/productsUtils"; +import { isProductVisibleInSearchResult } from "../../../../utils/storeFront/storeFrontProductUtils"; // describe("Products displayed in listings", () => { diff --git a/cypress/integration/products/productsList/filteringProducts.js b/cypress/integration/allEnv/products/productsList/filteringProducts.js similarity index 83% rename from cypress/integration/products/productsList/filteringProducts.js rename to cypress/integration/allEnv/products/productsList/filteringProducts.js index 80a39d461..45ad95f41 100644 --- a/cypress/integration/products/productsList/filteringProducts.js +++ b/cypress/integration/allEnv/products/productsList/filteringProducts.js @@ -1,24 +1,24 @@ import faker from "faker"; -import { createCollection } from "../../../apiRequests/Collections"; -import { updateProduct } from "../../../apiRequests/Product"; -import { PRODUCTS_LIST } from "../../../elements/catalog/products/products-list"; +import { createCollection } from "../../../../apiRequests/Collections"; +import { updateProduct } from "../../../../apiRequests/Product"; +import { PRODUCTS_LIST } from "../../../../elements/catalog/products/products-list"; import { selectFilterOption, selectProductsOutOfStock -} from "../../../steps/catalog/products/productsListSteps"; -import { selectChannelInHeader } from "../../../steps/channelsSteps"; -import { urlList } from "../../../url/urlList"; -import { getDefaultChannel } from "../../../utils/channelsUtils"; +} from "../../../../steps/catalog/products/productsListSteps"; +import { selectChannelInHeader } from "../../../../steps/channelsSteps"; +import { urlList } from "../../../../url/urlList"; +import { getDefaultChannel } from "../../../../utils/channelsUtils"; import { createProductInChannel, createTypeAttributeAndCategoryForProduct, deleteProductsStartsWith -} from "../../../utils/products/productsUtils"; +} from "../../../../utils/products/productsUtils"; import { createShipping, deleteShippingStartsWith -} from "../../../utils/shippingUtils"; +} from "../../../../utils/shippingUtils"; describe("Products", () => { const startsWith = "CyFilterProducts-"; diff --git a/cypress/integration/products/productsList/pagination.js b/cypress/integration/allEnv/products/productsList/pagination.js similarity index 83% rename from cypress/integration/products/productsList/pagination.js rename to cypress/integration/allEnv/products/productsList/pagination.js index 096886a5a..f7a6fa7a9 100644 --- a/cypress/integration/products/productsList/pagination.js +++ b/cypress/integration/allEnv/products/productsList/pagination.js @@ -1,11 +1,11 @@ -import { PRODUCTS_LIST } from "../../../elements/catalog/products/products-list"; -import { BUTTON_SELECTORS } from "../../../elements/shared/button-selectors"; -import { SHARED_ELEMENTS } from "../../../elements/shared/sharedElements"; +import { PRODUCTS_LIST } from "../../../../elements/catalog/products/products-list"; +import { BUTTON_SELECTORS } from "../../../../elements/shared/button-selectors"; +import { SHARED_ELEMENTS } from "../../../../elements/shared/sharedElements"; import { getDisplayedColumnArray, isNumberOfProductsSameAsInSelectResultsOnPage -} from "../../../steps/catalog/products/productsListSteps"; -import { urlList } from "../../../url/urlList"; +} from "../../../../steps/catalog/products/productsListSteps"; +import { urlList } from "../../../../url/urlList"; describe("Products", () => { beforeEach(() => { diff --git a/cypress/integration/products/productsList/sortingProducts.js b/cypress/integration/allEnv/products/productsList/sortingProducts.js similarity index 72% rename from cypress/integration/products/productsList/sortingProducts.js rename to cypress/integration/allEnv/products/productsList/sortingProducts.js index 5e0883d0e..8039735c6 100644 --- a/cypress/integration/products/productsList/sortingProducts.js +++ b/cypress/integration/allEnv/products/productsList/sortingProducts.js @@ -1,7 +1,7 @@ -import { PRODUCTS_LIST } from "../../../elements/catalog/products/products-list"; -import { SHARED_ELEMENTS } from "../../../elements/shared/sharedElements"; -import { urlList } from "../../../url/urlList"; -import { expectProductsSortedBy } from "../../../utils/products/productsListUtils"; +import { PRODUCTS_LIST } from "../../../../elements/catalog/products/products-list"; +import { SHARED_ELEMENTS } from "../../../../elements/shared/sharedElements"; +import { urlList } from "../../../../url/urlList"; +import { expectProductsSortedBy } from "../../../../utils/products/productsListUtils"; describe("Sorting products", () => { const sortByList = ["name", "type", "price"]; diff --git a/cypress/integration/products/productsVariants.js b/cypress/integration/allEnv/products/productsVariants.js similarity index 91% rename from cypress/integration/products/productsVariants.js rename to cypress/integration/allEnv/products/productsVariants.js index 2c8755fac..0a6cecdb2 100644 --- a/cypress/integration/products/productsVariants.js +++ b/cypress/integration/allEnv/products/productsVariants.js @@ -1,24 +1,24 @@ import faker from "faker"; -import { createChannel } from "../../apiRequests/Channels"; +import { createChannel } from "../../../apiRequests/Channels"; import { createProduct, updateChannelInProduct -} from "../../apiRequests/Product"; +} from "../../../apiRequests/Product"; import { createFirstVariant, createVariant, variantsShouldBeVisible -} from "../../steps/catalog/products/VariantsSteps"; -import { selectChannelInHeader } from "../../steps/channelsSteps"; -import { urlList } from "../../url/urlList"; +} from "../../../steps/catalog/products/VariantsSteps"; +import { selectChannelInHeader } from "../../../steps/channelsSteps"; +import { urlList } from "../../../url/urlList"; import { deleteChannelsStartsWith, getDefaultChannel -} from "../../utils/channelsUtils"; -import * as productUtils from "../../utils/products/productsUtils"; -import * as shippingUtils from "../../utils/shippingUtils"; -import { getProductVariants } from "../../utils/storeFront/storeFrontProductUtils"; +} from "../../../utils/channelsUtils"; +import * as productUtils from "../../../utils/products/productsUtils"; +import * as shippingUtils from "../../../utils/shippingUtils"; +import { getProductVariants } from "../../../utils/storeFront/storeFrontProductUtils"; // describe("Creating variants", () => { diff --git a/cypress/integration/products/updatingProducts.js b/cypress/integration/allEnv/products/updatingProducts.js similarity index 81% rename from cypress/integration/products/updatingProducts.js rename to cypress/integration/allEnv/products/updatingProducts.js index dfa64ad81..318afd3bb 100644 --- a/cypress/integration/products/updatingProducts.js +++ b/cypress/integration/allEnv/products/updatingProducts.js @@ -1,21 +1,21 @@ import faker from "faker"; -import { createCategory } from "../../apiRequests/Category"; -import { createCollection } from "../../apiRequests/Collections"; -import { getProductDetails } from "../../apiRequests/storeFront/ProductDetails"; -import { PRODUCT_DETAILS } from "../../elements/catalog/products/product-details"; -import { BUTTON_SELECTORS } from "../../elements/shared/button-selectors"; -import { metadataForms } from "../../steps/catalog/metadataSteps"; -import { fillUpCommonFieldsForAllProductTypes } from "../../steps/catalog/products/productSteps"; -import { productDetailsUrl } from "../../url/urlList"; -import { getDefaultChannel } from "../../utils/channelsUtils"; -import { deleteCollectionsStartsWith } from "../../utils/collectionsUtils"; -import { expectCorrectProductInformation } from "../../utils/products/checkProductInfo"; +import { createCategory } from "../../../apiRequests/Category"; +import { createCollection } from "../../../apiRequests/Collections"; +import { getProductDetails } from "../../../apiRequests/storeFront/ProductDetails"; +import { PRODUCT_DETAILS } from "../../../elements/catalog/products/product-details"; +import { BUTTON_SELECTORS } from "../../../elements/shared/button-selectors"; +import { metadataForms } from "../../../steps/catalog/metadataSteps"; +import { fillUpCommonFieldsForAllProductTypes } from "../../../steps/catalog/products/productSteps"; +import { productDetailsUrl } from "../../../url/urlList"; +import { getDefaultChannel } from "../../../utils/channelsUtils"; +import { deleteCollectionsStartsWith } from "../../../utils/collectionsUtils"; +import { expectCorrectProductInformation } from "../../../utils/products/checkProductInfo"; import { createProductInChannel, createTypeAttributeAndCategoryForProduct, deleteProductsStartsWith -} from "../../utils/products/productsUtils"; +} from "../../../utils/products/productsUtils"; describe("Update products", () => { const startsWith = "Cy-"; diff --git a/cypress/integration/stagedOnly/adyen.js b/cypress/integration/stagedOnly/adyen.js new file mode 100644 index 000000000..5b7962f17 --- /dev/null +++ b/cypress/integration/stagedOnly/adyen.js @@ -0,0 +1,173 @@ +import faker from "faker"; + +import { + addShippingMethod, + completeCheckout, + completeCheckoutWithAdyen, + createCheckout +} from "../../apiRequests/Checkout"; +import { getOrder } from "../../apiRequests/Order"; +import { getDefaultChannel } from "../../utils/channelsUtils"; +import { addAdyenPayment } from "../../utils/ordersUtils"; +import { + createProductInChannel, + createTypeAttributeAndCategoryForProduct, + deleteProductsStartsWith +} from "../../utils/products/productsUtils"; +import { + createShipping, + deleteShippingStartsWith +} from "../../utils/shippingUtils"; + +describe("Adyen payments", () => { + const startsWith = "CyChannelInDraftOrders-"; + const name = startsWith + faker.datatype.number(); + const email = `CyChannelInDraftOrders@example.com`; + + let address; + let defaultChannel; + let warehouse; + let shippingMethod; + let variantsList; + let checkout; + let paymentCards; + let cardData; + + before(() => { + cy.clearSessionData().loginUserViaRequest(); + deleteProductsStartsWith(startsWith); + deleteShippingStartsWith(startsWith); + cy.fixture("cards").then(cardsResp => { + paymentCards = cardsResp; + cardData = { + clientData: paymentCards.clientData, + encryptedExpiryMonth: paymentCards.encryptedExpiryMonth, + encryptedExpiryYear: paymentCards.encryptedExpiryYear, + encryptedSecurityCode: paymentCards.encryptedSecurityCodes.matches + }; + }); + cy.fixture("addresses") + .then(addresses => { + address = addresses.usAddress; + getDefaultChannel(); + }) + .then(channelResp => { + defaultChannel = channelResp; + createShipping({ + channelId: channelResp.id, + name, + address, + price: 10 + }); + }) + .then( + ({ + warehouse: warehouseResp, + shippingZone: shippingZoneResp, + shippingMethod: shippingMethodResp + }) => { + warehouse = warehouseResp; + shippingMethod = shippingMethodResp; + } + ); + createTypeAttributeAndCategoryForProduct(name) + .then(({ productType, attribute, category }) => { + createProductInChannel({ + name, + channelId: defaultChannel.id, + warehouseId: warehouse.id, + productTypeId: productType.id, + attributeId: attribute.id, + categoryId: category.id + }); + }) + .then(({ variantsList: variants }) => (variantsList = variants)); + }); + beforeEach(() => { + cy.clearSessionData().loginUserViaRequest(); + createCheckout({ + channelSlug: defaultChannel.slug, + email, + variantsList, + address, + billingAddress: address, + auth: "token" + }) + .then(checkoutResp => { + checkout = checkoutResp; + addShippingMethod(checkout.id, shippingMethod.id); + }) + .then(({ checkout: checkoutResp }) => { + addAdyenPayment(checkout.id, checkoutResp.totalPrice.gross.amount); + }); + }); + it("should purchase products with simple card", () => { + const simpleCard = cardData; + simpleCard.encryptedCardNumber = + paymentCards.cards.simpleCard.encryptedCardNumber; + simpleCard.brand = paymentCards.cards.simpleCard.brand; + completeCheckout(checkout.id, simpleCard) + .then(({ order }) => { + getOrder(order.id); + }) + .then(order => { + expect(order.paymentStatus).to.eq("FULLY_CHARGED"); + }); + }); + it("should purchase product with 3D secure 2 Auth", () => { + const threeDSecureCard = cardData; + threeDSecureCard.encryptedCardNumber = + paymentCards.cards.threeDSecureTwoAuth.encryptedCardNumber; + threeDSecureCard.brand = paymentCards.cards.threeDSecureTwoAuth.brand; + completeCheckout(checkout.id, threeDSecureCard) + .then(({ order }) => { + getOrder(order.id); + }) + .then(order => { + expect(order.paymentStatus).to.eq("FULLY_CHARGED"); + }); + }); + it("should purchase product with 3D secure 1 Auth", () => { + const threeDSecureCardOneAuth = cardData; + threeDSecureCardOneAuth.encryptedCardNumber = + paymentCards.cards.threeDSecureOneAuth.encryptedCardNumber; + threeDSecureCardOneAuth.brand = + paymentCards.cards.threeDSecureOneAuth.brand; + completeCheckout(checkout.id, threeDSecureCardOneAuth) + .then(({ order }) => { + getOrder(order.id); + }) + .then(order => { + expect(order.paymentStatus).to.eq("FULLY_CHARGED"); + }); + }); + it("should fail with unknown security number", () => { + const simpleCard = cardData; + simpleCard.encryptedCardNumber = + paymentCards.cards.simpleCard.encryptedCardNumber; + simpleCard.brand = paymentCards.cards.simpleCard.brand; + simpleCard.encryptedSecurityCode = + paymentCards.encryptedSecurityCodes.unknown; + completeCheckout(checkout.id, simpleCard).then(({ checkoutErrors }) => { + expect(checkoutErrors).to.have.length(1); + }); + }); + it("should fail with timeout in 3D authorization", () => { + const errorCard = cardData; + errorCard.encryptedCardNumber = + paymentCards.cards.errorCard.encryptedCardNumber; + errorCard.brand = paymentCards.cards.errorCard.brand; + completeCheckout(checkout.id, errorCard).then(({ checkoutErrors }) => { + expect(checkoutErrors).to.have.length(1); + }); + }); + it("should fail with closed account", () => { + const closeAccount = cardData; + closeAccount.encryptedCardNumber = + paymentCards.cards.closeAccount.encryptedCardNumber; + closeAccount.brand = paymentCards.cards.closeAccount.brand; + completeCheckout(checkout.id, closeAccount).then(({ checkoutErrors }) => { + expect(checkoutErrors).to.have.length(1); + }); + }); +}); diff --git a/cypress/steps/draftOrderSteps.js b/cypress/steps/draftOrderSteps.js index e5753351b..5533473ec 100644 --- a/cypress/steps/draftOrderSteps.js +++ b/cypress/steps/draftOrderSteps.js @@ -1,13 +1,16 @@ import { ASSIGN_PRODUCTS_SELECTORS } from "../elements/catalog/products/assign-products-selectors"; import { DRAFT_ORDER_SELECTORS } from "../elements/orders/draft-order-selectors"; +import { BUTTON_SELECTORS } from "../elements/shared/button-selectors"; +import { SHARED_ELEMENTS } from "../elements/shared/sharedElements"; import { SELECT_SHIPPING_METHOD_FORM } from "../elements/shipping/select-shipping-method-form"; -import { fillUpAddressForm } from "./shared/addressForm"; export function finalizeDraftOrder(name, address) { cy.get(DRAFT_ORDER_SELECTORS.addProducts) .click() .get(ASSIGN_PRODUCTS_SELECTORS.searchInput) - .type(name); + .type(name) + .get(SHARED_ELEMENTS.progressBar) + .should("not.be.visible"); cy.contains(ASSIGN_PRODUCTS_SELECTORS.tableRow, name) .find(ASSIGN_PRODUCTS_SELECTORS.checkbox) .click() @@ -21,12 +24,11 @@ export function finalizeDraftOrder(name, address) { .click() .get(DRAFT_ORDER_SELECTORS.customerEmail) .should("be.visible") - .get(DRAFT_ORDER_SELECTORS.editShippingAddress) - .click(); - fillUpAddressForm(address); - cy.get(DRAFT_ORDER_SELECTORS.editBillingAddress).click(); - fillUpAddressForm(address); - cy.get(DRAFT_ORDER_SELECTORS.addShippingCarrierLink) + .get(SHARED_ELEMENTS.skeleton) + .should("not.exist") + .get(BUTTON_SELECTORS.submit) + .click() + .get(DRAFT_ORDER_SELECTORS.addShippingCarrierLink) .click() .get(SELECT_SHIPPING_METHOD_FORM.selectShippingMethod) .click() diff --git a/cypress/steps/shared/addressForm.js b/cypress/steps/shared/addressForm.js index b43dc4f5d..3836b41ff 100644 --- a/cypress/steps/shared/addressForm.js +++ b/cypress/steps/shared/addressForm.js @@ -1,4 +1,5 @@ import { ADDRESS_SELECTORS } from "../../elements/shared/addressForm"; +import { BUTTON_SELECTORS } from "../../elements/shared/button-selectors"; import { fillAutocompleteSelect } from "./autocompleteSelect"; export function fillUpAddressForm(address) { @@ -21,6 +22,6 @@ export function fillUpAddressForm(address) { fillAutocompleteSelect(ADDRESS_SELECTORS.country, address.countryFullName); cy.get(ADDRESS_SELECTORS.countryArea) .type(address.countryArea) - .get(ADDRESS_SELECTORS.saveButton) + .get(BUTTON_SELECTORS.submit) .click(); } diff --git a/cypress/support/index.js b/cypress/support/index.js index e432eddd2..611f817f4 100644 --- a/cypress/support/index.js +++ b/cypress/support/index.js @@ -54,3 +54,10 @@ Cypress.Commands.add("sendRequestWithQuery", (query, authorization = "auth") => url: urlList.apiUri }) ); +Cypress.on( + "uncaught:exception", + (err, runnable) => + // returning false here prevents Cypress from + // failing the test + false +); diff --git a/cypress/utils/ordersUtils.js b/cypress/utils/ordersUtils.js index af426f3ca..a5eb9f3d7 100644 --- a/cypress/utils/ordersUtils.js +++ b/cypress/utils/ordersUtils.js @@ -19,8 +19,9 @@ export function createWaitingForCaptureOrder( }) .then(() => addPayment(checkout.id)) .then(() => checkoutRequest.completeCheckout(checkout.id)) - .then(order => ({ checkout, order })); + .then(({ order }) => ({ checkout, order })); } + export function createCheckoutWithVoucher({ channelSlug, email = "email@example.com", @@ -51,7 +52,8 @@ export function createReadyToFulfillOrder( address ) { let order; - return createDraftOrder(customerId, shippingMethodId, channelId, address) + return orderRequest + .createDraftOrder(customerId, shippingMethodId, channelId, address) .then(orderResp => { order = orderResp; assignVariantsToOrder(order, variantsList); @@ -68,7 +70,8 @@ export function createOrder({ address }) { let order; - return createDraftOrder(customerId, shippingMethodId, channelId, address) + return orderRequest + .createDraftOrder(customerId, shippingMethodId, channelId, address) .then(orderResp => { order = orderResp; assignVariantsToOrder(order, variantsList); @@ -83,16 +86,22 @@ function assignVariantsToOrder(order, variantsList) { }); } -export function createDraftOrder( - customerId, - shippingMethodId, - channelId, - address -) { - return orderRequest - .createDraftOrder(customerId, shippingMethodId, channelId, address) - .its("body.data.draftOrderCreate.order"); +export function addPayment(checkoutId) { + return checkoutRequest.addPayment({ + checkoutId, + gateway: "mirumee.payments.dummy", + token: "not-charged" + }); } + +export function addAdyenPayment(checkoutId, amount) { + return checkoutRequest.addPayment({ + checkoutId, + gateway: "mirumee.payments.adyen", + amount + }); +} + export function createAndCompleteCheckoutWithoutShipping({ channelSlug, email, @@ -108,5 +117,5 @@ export function createAndCompleteCheckoutWithoutShipping({ addPayment(checkout.id); }) .then(() => checkoutRequest.completeCheckout(checkout.id)) - .then(order => ({ checkout, order })); + .then(({ order }) => ({ checkout, order })); } diff --git a/package-lock.json b/package-lock.json index c36ae3d46..fa3d49439 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1706,12 +1706,6 @@ "restore-cursor": "^1.0.1" } }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, "onetime": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", @@ -1773,17 +1767,6 @@ "uuid": "^3.3.2" }, "dependencies": { - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", @@ -5786,9 +5769,9 @@ "dev": true }, "@types/sizzle": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.2.tgz", - "integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", + "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==", "dev": true }, "@types/source-list-map": { @@ -10972,19 +10955,19 @@ "dev": true }, "cypress": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-6.9.1.tgz", - "integrity": "sha512-/RVx6sOhsyTR9sd9v0BHI4tnDZAhsH9rNat7CIKCUEr5VPWxyfGH0EzK4IHhAqAH8vjFcD4U14tPiJXshoUrmQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-7.2.0.tgz", + "integrity": "sha512-lHHGay+YsffDn4M0bkkwezylBVHUpwwhtqte4LNPrFRCHy77X38+1PUe3neFb3glVTM+rbILtTN6FhO2djcOuQ==", "dev": true, "requires": { "@cypress/listr-verbose-renderer": "^0.4.1", "@cypress/request": "^2.88.5", "@cypress/xvfb": "^1.2.4", - "@types/node": "12.12.50", - "@types/sinonjs__fake-timers": "^6.0.1", + "@types/node": "^14.14.31", + "@types/sinonjs__fake-timers": "^6.0.2", "@types/sizzle": "^2.3.2", - "arch": "^2.1.2", - "blob-util": "2.0.2", + "arch": "^2.2.0", + "blob-util": "^2.0.2", "bluebird": "^3.7.2", "cachedir": "^2.3.0", "chalk": "^4.1.0", @@ -10992,49 +10975,59 @@ "cli-table3": "~0.6.0", "commander": "^5.1.0", "common-tags": "^1.8.0", - "dayjs": "^1.9.3", + "dayjs": "^1.10.4", "debug": "4.3.2", - "eventemitter2": "^6.4.2", - "execa": "^4.0.2", + "eventemitter2": "^6.4.3", + "execa": "4.1.0", "executable": "^4.1.1", "extract-zip": "^1.7.0", - "fs-extra": "^9.0.1", + "fs-extra": "^9.1.0", "getos": "^3.2.1", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.3.2", + "is-ci": "^3.0.0", + "is-installed-globally": "~0.4.0", "lazy-ass": "^1.6.0", "listr": "^0.14.3", - "lodash": "^4.17.19", + "lodash": "^4.17.21", "log-symbols": "^4.0.0", "minimist": "^1.2.5", - "moment": "^2.29.1", "ospath": "^1.2.2", - "pretty-bytes": "^5.4.1", + "pretty-bytes": "^5.6.0", "ramda": "~0.27.1", "request-progress": "^3.0.0", - "supports-color": "^7.2.0", + "supports-color": "^8.1.1", "tmp": "~0.2.1", "untildify": "^4.0.0", "url": "^0.11.0", "yauzl": "^2.10.0" }, "dependencies": { - "@types/node": { - "version": "12.12.50", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.50.tgz", - "integrity": "sha512-5ImO01Fb8YsEOYpV+aeyGYztcYcjGsBvN4D7G5r1ef2cuQOpymjWNQi5V0rKHE6PC2ru3HkoUr/Br2/8GUA84w==", - "dev": true - }, "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" + }, + "dependencies": { + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, + "ci-info": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.1.1.tgz", + "integrity": "sha512-kdRWLBIJwdsYJWYJFtAFFYxybguqeF91qpZaggjG5Nf8QKdizFG2hjqvaTXbxFIcYbSaD74KpAXv6BSm17DHEQ==", + "dev": true + }, "cli-table3": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.0.tgz", @@ -11052,17 +11045,6 @@ "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", "dev": true }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, "debug": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", @@ -11072,23 +11054,6 @@ "ms": "2.1.2" } }, - "execa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", - "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - } - }, "fs-extra": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", @@ -11101,21 +11066,21 @@ "universalify": "^2.0.0" } }, - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "is-ci": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.0.tgz", + "integrity": "sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ==", + "dev": true, + "requires": { + "ci-info": "^3.1.1" + } + }, "jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -11136,31 +11101,10 @@ "is-unicode-supported": "^0.1.0" } }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -11180,15 +11124,6 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } } } }, @@ -12414,6 +12349,12 @@ "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", "dev": true }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, "escodegen": { "version": "1.14.3", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", @@ -13064,6 +13005,66 @@ "integrity": "sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w==", "dev": true }, + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "executable": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", @@ -13465,15 +13466,6 @@ "ms": "2.0.0" } }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -14199,6 +14191,17 @@ } } }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, "format": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", @@ -14467,6 +14470,15 @@ "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", "dev": true }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -14784,18 +14796,18 @@ } }, "global-dirs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz", - "integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", "dev": true, "requires": { - "ini": "1.3.7" + "ini": "2.0.0" }, "dependencies": { "ini": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", - "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", "dev": true } } @@ -16397,13 +16409,13 @@ "integrity": "sha1-Vv9NtoOgeMYILrldrX3GLh0E+DU=" }, "is-installed-globally": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", - "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", "dev": true, "requires": { - "global-dirs": "^2.0.1", - "is-path-inside": "^3.0.1" + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" } }, "is-interactive": { @@ -19700,6 +19712,15 @@ } } }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, "mock-apollo-client": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/mock-apollo-client/-/mock-apollo-client-0.4.0.tgz", diff --git a/package.json b/package.json index 5f60a5d11..99d3d91c0 100644 --- a/package.json +++ b/package.json @@ -134,7 +134,7 @@ "codecov": "^3.7.1", "core-js": "^3.7.0", "cross-env": "^6.0.3", - "cypress": "^6.9.1", + "cypress": "^7.2.0", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.5", "enzyme-to-json": "^3.6.1", @@ -239,6 +239,7 @@ "cy:run": "cypress run", "cy:run:record": "npm run cy:run -- --record", "cy:open": "cypress open", + "cy:run:allEnv": "cypress run --spec 'cypress/integration/stagedOnly/*'", "test:e2e:run": "start-server-and-test start http://localhost:9000 cy:run", "test:e2e:run:record": "start-server-and-test start http://localhost:9000 cy:run:record", "test:e2e:dev": "start-server-and-test start http://localhost:9000 cy:open", diff --git a/src/components/Skeleton.tsx b/src/components/Skeleton.tsx index 0af6740d7..f9f0995d7 100644 --- a/src/components/Skeleton.tsx +++ b/src/components/Skeleton.tsx @@ -42,6 +42,7 @@ const Skeleton: React.FC = props => { return ( { return ( diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index 385e27dce..5cf630338 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -1627,6 +1627,7 @@ exports[`Storyshots Channels / Channels with variants availability card default class="MuiIconButton-label-id" > @@ -3829,6 +3832,7 @@ exports[`Storyshots Generics / Channels availability card with onChange 1`] = ` class="MuiIconButton-label-id" > @@ -7919,6 +7925,7 @@ exports[`Storyshots Generics / Metadata loading 1`] = ` > @@ -10166,6 +10173,7 @@ exports[`Storyshots Generics / PageHeader without title 1`] = ` > ‌ @@ -12340,6 +12348,7 @@ exports[`Storyshots Generics / Skeleton default 1`] = ` > @@ -12865,6 +12874,7 @@ exports[`Storyshots Generics / Sortable chips field loading 1`] = `
@@ -14917,6 +14927,7 @@ exports[`Storyshots Orders / Draft order channel section loading 1`] = ` > @@ -15037,6 +15048,7 @@ exports[`Storyshots Orders / Order details channel section loading 1`] = ` > @@ -15379,6 +15391,7 @@ exports[`Storyshots Orders / OrderCustomer loading 1`] = ` > @@ -15400,6 +15413,7 @@ exports[`Storyshots Orders / OrderCustomer loading 1`] = `
@@ -15421,6 +15435,7 @@ exports[`Storyshots Orders / OrderCustomer loading 1`] = ` @@ -16245,6 +16260,7 @@ exports[`Storyshots Orders / OrderInvoiceList loading 1`] = ` > @@ -21042,6 +21058,7 @@ exports[`Storyshots Shipping zones card with no options selected 1`] = ` class="MuiIconButton-label-id" > @@ -22048,6 +22067,7 @@ exports[`Storyshots Views / Apps / App details loading 1`] = ` > @@ -22082,6 +22102,7 @@ exports[`Storyshots Views / Apps / App details loading 1`] = ` > @@ -22925,6 +22946,7 @@ exports[`Storyshots Views / Apps / Apps list loading 1`] = ` > @@ -22993,6 +23015,7 @@ exports[`Storyshots Views / Apps / Apps list loading 1`] = ` > @@ -23562,6 +23585,7 @@ exports[`Storyshots Views / Apps / Install App loading 1`] = ` > @@ -23581,6 +23605,7 @@ exports[`Storyshots Views / Apps / Install App loading 1`] = ` > @@ -23615,6 +23640,7 @@ exports[`Storyshots Views / Apps / Install App loading 1`] = ` > @@ -36285,6 +36311,7 @@ exports[`Storyshots Views / Attributes / Attribute details loading 1`] = ` > ‌ @@ -36628,6 +36655,7 @@ exports[`Storyshots Views / Attributes / Attribute details loading 1`] = ` > @@ -36637,6 +36665,7 @@ exports[`Storyshots Views / Attributes / Attribute details loading 1`] = ` > @@ -36703,6 +36732,7 @@ exports[`Storyshots Views / Attributes / Attribute details loading 1`] = ` > @@ -36740,6 +36770,7 @@ exports[`Storyshots Views / Attributes / Attribute details loading 1`] = ` > @@ -38498,6 +38529,7 @@ exports[`Storyshots Views / Attributes / Attribute details no values 1`] = ` > @@ -38507,6 +38539,7 @@ exports[`Storyshots Views / Attributes / Attribute details no values 1`] = ` > @@ -40730,6 +40763,7 @@ exports[`Storyshots Views / Attributes / Attribute list loading 1`] = ` > @@ -40740,6 +40774,7 @@ exports[`Storyshots Views / Attributes / Attribute list loading 1`] = ` > @@ -40750,6 +40785,7 @@ exports[`Storyshots Views / Attributes / Attribute list loading 1`] = ` > @@ -40760,6 +40796,7 @@ exports[`Storyshots Views / Attributes / Attribute list loading 1`] = ` > @@ -40770,6 +40807,7 @@ exports[`Storyshots Views / Attributes / Attribute list loading 1`] = ` > @@ -43607,6 +43645,7 @@ exports[`Storyshots Views / Categories / Category list loading 1`] = ` > @@ -43616,6 +43655,7 @@ exports[`Storyshots Views / Categories / Category list loading 1`] = ` > @@ -43625,6 +43665,7 @@ exports[`Storyshots Views / Categories / Category list loading 1`] = ` > @@ -46053,6 +46094,7 @@ exports[`Storyshots Views / Categories / Update category loading 1`] = ` > ‌ @@ -46200,6 +46242,7 @@ exports[`Storyshots Views / Categories / Update category loading 1`] = ` > @@ -46286,6 +46329,7 @@ exports[`Storyshots Views / Categories / Update category loading 1`] = ` > @@ -46323,6 +46367,7 @@ exports[`Storyshots Views / Categories / Update category loading 1`] = ` > @@ -46589,6 +46634,7 @@ exports[`Storyshots Views / Categories / Update category loading 1`] = ` > @@ -46598,6 +46644,7 @@ exports[`Storyshots Views / Categories / Update category loading 1`] = ` > @@ -46607,6 +46654,7 @@ exports[`Storyshots Views / Categories / Update category loading 1`] = ` > @@ -50961,6 +51009,7 @@ exports[`Storyshots Views / Channels / Channel details default 1`] = ` class="MuiIconButton-label-id" > ‌ @@ -58328,6 +58385,7 @@ exports[`Storyshots Views / Collections / Collection detailsCollection details l > @@ -58367,6 +58425,7 @@ exports[`Storyshots Views / Collections / Collection detailsCollection details l > @@ -58404,6 +58463,7 @@ exports[`Storyshots Views / Collections / Collection detailsCollection details l > @@ -58423,6 +58483,7 @@ exports[`Storyshots Views / Collections / Collection detailsCollection details l > @@ -58692,6 +58753,7 @@ exports[`Storyshots Views / Collections / Collection detailsCollection details l class="MuiIconButton-label-id" > @@ -60972,6 +61036,7 @@ exports[`Storyshots Views / Collections / Collection list loading 1`] = ` > @@ -60983,6 +61048,7 @@ exports[`Storyshots Views / Collections / Collection list loading 1`] = ` > @@ -61745,6 +61811,7 @@ exports[`Storyshots Views / Collections / Create collection default 1`] = ` class="MuiIconButton-label-id" > @@ -68435,6 +68523,7 @@ exports[`Storyshots Views / Customers / Address Book loading 1`] = ` > @@ -72719,6 +72808,7 @@ exports[`Storyshots Views / Customers / Customer details loading 1`] = ` > ‌ @@ -72747,11 +72837,13 @@ exports[`Storyshots Views / Customers / Customer details loading 1`] = ` > ‌ @@ -73124,6 +73216,7 @@ exports[`Storyshots Views / Customers / Customer details loading 1`] = ` > @@ -73161,6 +73254,7 @@ exports[`Storyshots Views / Customers / Customer details loading 1`] = ` > @@ -73212,6 +73306,7 @@ exports[`Storyshots Views / Customers / Customer details loading 1`] = ` @@ -73251,6 +73346,7 @@ exports[`Storyshots Views / Customers / Customer details loading 1`] = ` @@ -73268,6 +73364,7 @@ exports[`Storyshots Views / Customers / Customer details loading 1`] = ` @@ -78648,6 +78745,7 @@ exports[`Storyshots Views / Customers / Customer list loading 1`] = ` > @@ -78657,6 +78755,7 @@ exports[`Storyshots Views / Customers / Customer list loading 1`] = ` > @@ -85876,6 +85975,7 @@ exports[`Storyshots Views / Discounts / Sale details loading 1`] = ` > ‌ @@ -86900,6 +87000,7 @@ exports[`Storyshots Views / Discounts / Sale details loading 1`] = ` > @@ -86917,6 +87018,7 @@ exports[`Storyshots Views / Discounts / Sale details loading 1`] = ` > @@ -86940,6 +87042,7 @@ exports[`Storyshots Views / Discounts / Sale details loading 1`] = ` > @@ -86957,6 +87060,7 @@ exports[`Storyshots Views / Discounts / Sale details loading 1`] = ` > @@ -89917,6 +90021,7 @@ exports[`Storyshots Views / Discounts / Sale list loading 1`] = ` > @@ -89926,6 +90031,7 @@ exports[`Storyshots Views / Discounts / Sale list loading 1`] = ` > @@ -89935,6 +90041,7 @@ exports[`Storyshots Views / Discounts / Sale list loading 1`] = ` > @@ -89944,6 +90051,7 @@ exports[`Storyshots Views / Discounts / Sale list loading 1`] = ` > @@ -98258,6 +98366,7 @@ exports[`Storyshots Views / Discounts / Voucher details loading 1`] = ` > ‌ @@ -99741,6 +99850,7 @@ exports[`Storyshots Views / Discounts / Voucher details loading 1`] = ` > @@ -99758,6 +99868,7 @@ exports[`Storyshots Views / Discounts / Voucher details loading 1`] = ` > @@ -99775,6 +99886,7 @@ exports[`Storyshots Views / Discounts / Voucher details loading 1`] = ` > @@ -99798,6 +99910,7 @@ exports[`Storyshots Views / Discounts / Voucher details loading 1`] = ` > @@ -99815,6 +99928,7 @@ exports[`Storyshots Views / Discounts / Voucher details loading 1`] = ` > @@ -99838,6 +99952,7 @@ exports[`Storyshots Views / Discounts / Voucher details loading 1`] = ` > @@ -99855,6 +99970,7 @@ exports[`Storyshots Views / Discounts / Voucher details loading 1`] = ` > @@ -100992,6 +101108,7 @@ exports[`Storyshots Views / Discounts / Voucher list loading 1`] = ` > @@ -101001,6 +101118,7 @@ exports[`Storyshots Views / Discounts / Voucher list loading 1`] = ` > @@ -101010,6 +101128,7 @@ exports[`Storyshots Views / Discounts / Voucher list loading 1`] = ` > @@ -101019,6 +101138,7 @@ exports[`Storyshots Views / Discounts / Voucher list loading 1`] = ` > @@ -101028,6 +101148,7 @@ exports[`Storyshots Views / Discounts / Voucher list loading 1`] = ` > @@ -101037,6 +101158,7 @@ exports[`Storyshots Views / Discounts / Voucher list loading 1`] = ` > @@ -102724,6 +102846,7 @@ exports[`Storyshots Views / HomePage loading 1`] = ` > ‌ @@ -102734,6 +102857,7 @@ exports[`Storyshots Views / HomePage loading 1`] = ` > ‌ @@ -102774,6 +102898,7 @@ exports[`Storyshots Views / HomePage loading 1`] = ` > ‌ @@ -102822,6 +102947,7 @@ exports[`Storyshots Views / HomePage loading 1`] = ` > ‌ @@ -105620,6 +105746,7 @@ exports[`Storyshots Views / Navigation / Menu details loading 1`] = ` > @@ -106494,6 +106621,7 @@ exports[`Storyshots Views / Navigation / Menu list loading 1`] = ` > @@ -106503,6 +106631,7 @@ exports[`Storyshots Views / Navigation / Menu list loading 1`] = ` > @@ -108861,6 +108990,7 @@ exports[`Storyshots Views / Orders / Draft order list loading 1`] = ` > @@ -108870,6 +109000,7 @@ exports[`Storyshots Views / Orders / Draft order list loading 1`] = ` > @@ -108879,6 +109010,7 @@ exports[`Storyshots Views / Orders / Draft order list loading 1`] = ` > @@ -108888,6 +109020,7 @@ exports[`Storyshots Views / Orders / Draft order list loading 1`] = ` > @@ -110659,6 +110792,7 @@ exports[`Storyshots Views / Orders / Fulfill order loading 1`] = ` > @@ -110670,6 +110804,7 @@ exports[`Storyshots Views / Orders / Fulfill order loading 1`] = ` > @@ -110680,6 +110815,7 @@ exports[`Storyshots Views / Orders / Fulfill order loading 1`] = ` @@ -116567,6 +116703,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` > ‌ @@ -116587,6 +116724,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` > @@ -116615,6 +116753,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` @@ -116624,6 +116763,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` > @@ -116636,6 +116776,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` @@ -116645,6 +116786,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` > @@ -116657,6 +116799,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` @@ -116666,6 +116809,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` > @@ -116683,6 +116827,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` > @@ -116710,6 +116855,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` > @@ -116724,6 +116870,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` > @@ -116738,6 +116885,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` > @@ -116754,6 +116902,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` > @@ -116795,6 +116944,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` > @@ -116832,6 +116982,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` > @@ -116850,6 +117001,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` /> @@ -116882,6 +117034,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` > @@ -116920,6 +117073,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` @@ -116958,6 +117112,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` @@ -116993,6 +117148,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` > @@ -117039,6 +117195,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` > @@ -117073,6 +117230,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = ` > @@ -136409,6 +136567,7 @@ exports[`Storyshots Views / Orders / Order draft loading 1`] = ` > ‌ @@ -136452,6 +136611,7 @@ exports[`Storyshots Views / Orders / Order draft loading 1`] = ` > ‌ @@ -136521,6 +136681,7 @@ exports[`Storyshots Views / Orders / Order draft loading 1`] = ` /> @@ -136566,6 +136727,7 @@ exports[`Storyshots Views / Orders / Order draft loading 1`] = ` > @@ -136604,6 +136766,7 @@ exports[`Storyshots Views / Orders / Order draft loading 1`] = ` @@ -136642,6 +136805,7 @@ exports[`Storyshots Views / Orders / Order draft loading 1`] = ` @@ -136677,6 +136841,7 @@ exports[`Storyshots Views / Orders / Order draft loading 1`] = ` > @@ -141781,6 +141946,7 @@ exports[`Storyshots Views / Orders / Order list loading 1`] = ` > @@ -141790,6 +141956,7 @@ exports[`Storyshots Views / Orders / Order list loading 1`] = ` > @@ -141799,6 +141966,7 @@ exports[`Storyshots Views / Orders / Order list loading 1`] = ` > @@ -141808,6 +141976,7 @@ exports[`Storyshots Views / Orders / Order list loading 1`] = ` > @@ -141817,6 +141986,7 @@ exports[`Storyshots Views / Orders / Order list loading 1`] = ` > @@ -141826,6 +141996,7 @@ exports[`Storyshots Views / Orders / Order list loading 1`] = ` > @@ -148517,6 +148688,7 @@ exports[`Storyshots Views / Page types / Page type details loading 1`] = ` > ‌ @@ -148759,6 +148931,7 @@ exports[`Storyshots Views / Page types / Page type details loading 1`] = ` > @@ -148769,6 +148942,7 @@ exports[`Storyshots Views / Page types / Page type details loading 1`] = ` > @@ -148841,6 +149015,7 @@ exports[`Storyshots Views / Page types / Page type details loading 1`] = ` > @@ -148878,6 +149053,7 @@ exports[`Storyshots Views / Page types / Page type details loading 1`] = ` > @@ -150085,6 +150261,7 @@ exports[`Storyshots Views / Page types / Page types list loading 1`] = ` > @@ -152150,6 +152327,7 @@ exports[`Storyshots Views / Pages / Page details loading 1`] = ` > ‌ @@ -152330,6 +152508,7 @@ exports[`Storyshots Views / Pages / Page details loading 1`] = ` > @@ -152367,6 +152546,7 @@ exports[`Storyshots Views / Pages / Page details loading 1`] = ` > @@ -153555,6 +153735,7 @@ exports[`Storyshots Views / Pages / Page list loading 1`] = ` > @@ -153572,6 +153753,7 @@ exports[`Storyshots Views / Pages / Page list loading 1`] = ` > @@ -153589,6 +153771,7 @@ exports[`Storyshots Views / Pages / Page list loading 1`] = ` > @@ -157773,6 +157956,7 @@ exports[`Storyshots Views / Permission Groups / Permission Group Details loading > ‌ @@ -158442,6 +158626,7 @@ exports[`Storyshots Views / Permission Groups / Permission Group Details loading > @@ -160062,6 +160247,7 @@ exports[`Storyshots Views / Permission Groups / Permission Group List loading 1` > @@ -160071,6 +160257,7 @@ exports[`Storyshots Views / Permission Groups / Permission Group List loading 1` > @@ -160080,6 +160267,7 @@ exports[`Storyshots Views / Permission Groups / Permission Group List loading 1` > @@ -160733,6 +160921,7 @@ exports[`Storyshots Views / Plugins / Plugin details loading 1`] = ` > @@ -161768,6 +161957,7 @@ exports[`Storyshots Views / Plugins / Plugin list loading 1`] = ` > @@ -162865,6 +163055,7 @@ exports[`Storyshots Views / Product types / Create product type loading 1`] = ` > ‌ @@ -165304,6 +165495,7 @@ exports[`Storyshots Views / Product types / Product type details loading 1`] = ` > ‌ @@ -165609,6 +165801,7 @@ exports[`Storyshots Views / Product types / Product type details loading 1`] = ` > @@ -165619,6 +165812,7 @@ exports[`Storyshots Views / Product types / Product type details loading 1`] = ` > @@ -165729,6 +165923,7 @@ exports[`Storyshots Views / Product types / Product type details loading 1`] = ` > @@ -165766,6 +165961,7 @@ exports[`Storyshots Views / Product types / Product type details loading 1`] = ` > @@ -167448,6 +167644,7 @@ exports[`Storyshots Views / Product types / Product types list loading 1`] = ` > @@ -167457,6 +167654,7 @@ exports[`Storyshots Views / Product types / Product types list loading 1`] = ` > @@ -167466,6 +167664,7 @@ exports[`Storyshots Views / Product types / Product types list loading 1`] = ` > @@ -181162,6 +181361,7 @@ exports[`Storyshots Views / Products / Create product variant when loading data > @@ -196271,6 +196471,7 @@ exports[`Storyshots Views / Products / Product edit when loading data 1`] = ` > ‌ @@ -196871,6 +197072,7 @@ exports[`Storyshots Views / Products / Product edit when loading data 1`] = ` > @@ -196908,6 +197110,7 @@ exports[`Storyshots Views / Products / Product edit when loading data 1`] = ` > @@ -202747,6 +202950,7 @@ exports[`Storyshots Views / Products / Product image details when loading data 1 > @@ -202851,6 +203055,7 @@ exports[`Storyshots Views / Products / Product image details when loading data 1 > @@ -208957,6 +209162,7 @@ exports[`Storyshots Views / Products / Product list loading 1`] = ` > @@ -208969,6 +209175,7 @@ exports[`Storyshots Views / Products / Product list loading 1`] = ` > @@ -208980,6 +209187,7 @@ exports[`Storyshots Views / Products / Product list loading 1`] = ` > @@ -208990,6 +209198,7 @@ exports[`Storyshots Views / Products / Product list loading 1`] = ` > @@ -217654,6 +217863,7 @@ exports[`Storyshots Views / Products / Product variant details attribute errors class="MuiIconButton-label-id" > ‌ @@ -222910,6 +223123,7 @@ exports[`Storyshots Views / Products / Product variant details when loading data > @@ -222967,6 +223181,7 @@ exports[`Storyshots Views / Products / Product variant details when loading data > @@ -223143,6 +223358,7 @@ exports[`Storyshots Views / Products / Product variant details when loading data > @@ -223523,6 +223739,7 @@ exports[`Storyshots Views / Products / Product variant details when loading data > @@ -223560,6 +223777,7 @@ exports[`Storyshots Views / Products / Product variant details when loading data > @@ -226723,6 +226941,7 @@ exports[`Storyshots Views / Shipping / Shipping rate loading 1`] = ` > ‌ @@ -227618,6 +227837,7 @@ exports[`Storyshots Views / Shipping / Shipping rate loading 1`] = ` > @@ -227655,6 +227875,7 @@ exports[`Storyshots Views / Shipping / Shipping rate loading 1`] = ` > @@ -232646,6 +232867,7 @@ exports[`Storyshots Views / Shipping / Shipping zone details loading 1`] = ` > ‌ @@ -232955,6 +233177,7 @@ exports[`Storyshots Views / Shipping / Shipping zone details loading 1`] = ` > @@ -232964,6 +233187,7 @@ exports[`Storyshots Views / Shipping / Shipping zone details loading 1`] = ` > @@ -232974,6 +233198,7 @@ exports[`Storyshots Views / Shipping / Shipping zone details loading 1`] = ` > @@ -233122,6 +233347,7 @@ exports[`Storyshots Views / Shipping / Shipping zone details loading 1`] = ` > @@ -233131,6 +233357,7 @@ exports[`Storyshots Views / Shipping / Shipping zone details loading 1`] = ` > @@ -233141,6 +233368,7 @@ exports[`Storyshots Views / Shipping / Shipping zone details loading 1`] = ` > @@ -233232,6 +233460,7 @@ exports[`Storyshots Views / Shipping / Shipping zone details loading 1`] = ` > @@ -233269,6 +233498,7 @@ exports[`Storyshots Views / Shipping / Shipping zone details loading 1`] = ` > @@ -234429,6 +234659,7 @@ exports[`Storyshots Views / Shipping / Shipping zones list loading 1`] = ` > @@ -234438,6 +234669,7 @@ exports[`Storyshots Views / Shipping / Shipping zones list loading 1`] = ` > @@ -237957,6 +238189,7 @@ exports[`Storyshots Views / Staff / Staff member details loading 1`] = ` > ‌ @@ -240915,6 +241148,7 @@ exports[`Storyshots Views / Staff / Staff members when loading 1`] = ` > @@ -240924,6 +241158,7 @@ exports[`Storyshots Views / Staff / Staff members when loading 1`] = ` > @@ -240934,6 +241169,7 @@ exports[`Storyshots Views / Staff / Staff members when loading 1`] = ` > @@ -241989,6 +242225,7 @@ exports[`Storyshots Views / Taxes / Country List loading 1`] = ` > @@ -241998,6 +242235,7 @@ exports[`Storyshots Views / Taxes / Country List loading 1`] = ` > @@ -242007,6 +242245,7 @@ exports[`Storyshots Views / Taxes / Country List loading 1`] = ` > @@ -242221,6 +242460,7 @@ exports[`Storyshots Views / Taxes / Reduced Tax Categories loading 1`] = ` > ‌ @@ -242278,6 +242518,7 @@ exports[`Storyshots Views / Taxes / Reduced Tax Categories loading 1`] = ` > @@ -242287,6 +242528,7 @@ exports[`Storyshots Views / Taxes / Reduced Tax Categories loading 1`] = ` > @@ -242723,6 +242965,7 @@ exports[`Storyshots Views / Translations / Language list loading 1`] = ` > @@ -245261,6 +245504,7 @@ exports[`Storyshots Views / Warehouses / Warehouse details loading 1`] = ` > ‌ @@ -247179,6 +247423,7 @@ exports[`Storyshots Views / Warehouses / Warehouse list loading 1`] = ` > @@ -247189,6 +247434,7 @@ exports[`Storyshots Views / Warehouses / Warehouse list loading 1`] = ` >