diff --git a/cypress/e2e/yves/order-amendment/order-amendment-cancel.cy.ts b/cypress/e2e/yves/order-amendment/order-amendment-cancel.cy.ts new file mode 100644 index 00000000..3573b1ae --- /dev/null +++ b/cypress/e2e/yves/order-amendment/order-amendment-cancel.cy.ts @@ -0,0 +1,57 @@ +import { container } from '@utils'; +import { OrderAmendmentCancelDynamicFixtures, OrderAmendmentStaticFixtures } from '@interfaces/yves'; +import { CartPage, CustomerOverviewPage, OrderDetailsPage } from '@pages/yves'; +import { CheckoutScenario, CustomerLoginScenario } from '@scenarios/yves'; + +/** + * Order Amendment checklists: {@link https://spryker.atlassian.net/wiki/spaces/CCS/pages/4545871873/Initialisation+Order+Amendment+Process} + */ +(['b2c', 'b2c-mp', 'b2b', 'b2b-mp'].includes(Cypress.env('repositoryId')) ? describe.skip : describe)( + 'order amendment cancel', + { tags: ['@order-amendment'] }, + (): void => { + const customerOverviewPage = container.get(CustomerOverviewPage); + const orderDetailsPage = container.get(OrderDetailsPage); + const cartPage = container.get(CartPage); + + const customerLoginScenario = container.get(CustomerLoginScenario); + const checkoutScenario = container.get(CheckoutScenario); + + let staticFixtures: OrderAmendmentStaticFixtures; + let dynamicFixtures: OrderAmendmentCancelDynamicFixtures; + + before((): void => { + ({ staticFixtures, dynamicFixtures } = Cypress.env()); + }); + + it('customer should be able to cancel order amendment', (): void => { + placeCustomerOrder(); + customerOverviewPage.viewLastPlacedOrder(); + + orderDetailsPage.getOrderReferenceBlock().then((orderReference: string) => { + orderDetailsPage.editOrder(); + cartPage.assertCartName(`Editing Order ${orderReference}`); + + cartPage.clearCart(); + + cartPage.visit(); + cartPage.assertCartName('Shopping cart'); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.containsOrderState('Payment pending'); + }); + }); + + function placeCustomerOrder(): void { + customerLoginScenario.execute({ + email: dynamicFixtures.customer.email, + password: staticFixtures.defaultPassword, + }); + + checkoutScenario.execute({ + idCustomerAddress: dynamicFixtures.address.id_customer_address, + shouldTriggerOmsInCli: true, + }); + } + } +); diff --git a/cypress/e2e/yves/order-amendment/order-amendment-finish.cy.ts b/cypress/e2e/yves/order-amendment/order-amendment-finish.cy.ts new file mode 100644 index 00000000..4d4cd169 --- /dev/null +++ b/cypress/e2e/yves/order-amendment/order-amendment-finish.cy.ts @@ -0,0 +1,79 @@ +import { container } from '@utils'; +import { OrderAmendmentFinishDynamicFixtures, OrderAmendmentStaticFixtures } from '@interfaces/yves'; +import { CartPage, CatalogPage, CustomerOverviewPage, OrderDetailsPage, ProductPage } from '@pages/yves'; +import { CheckoutScenario, CustomerLoginScenario } from '@scenarios/yves'; + +/** + * Order Amendment checklists: {@link https://spryker.atlassian.net/wiki/spaces/CCS/pages/4545871873/Initialisation+Order+Amendment+Process} + */ +(['b2c', 'b2c-mp', 'b2b', 'b2b-mp'].includes(Cypress.env('repositoryId')) ? describe.skip : describe)( + 'order amendment finish', + { tags: ['@order-amendment'] }, + (): void => { + const customerOverviewPage = container.get(CustomerOverviewPage); + const orderDetailsPage = container.get(OrderDetailsPage); + const cartPage = container.get(CartPage); + const catalogPage = container.get(CatalogPage); + const productPage = container.get(ProductPage); + + const customerLoginScenario = container.get(CustomerLoginScenario); + const checkoutScenario = container.get(CheckoutScenario); + + let staticFixtures: OrderAmendmentStaticFixtures; + let dynamicFixtures: OrderAmendmentFinishDynamicFixtures; + + before((): void => { + ({ staticFixtures, dynamicFixtures } = Cypress.env()); + }); + + it('customer should be able to finish amended order with new item in cart', (): void => { + placeCustomerOrder(dynamicFixtures.customer1.email, dynamicFixtures.address1.id_customer_address); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.editOrder(); + + catalogPage.visit(); + catalogPage.searchProductFromSuggestions({ query: dynamicFixtures.product2.sku }); + productPage.addToCart(); + + placeCustomerOrder(dynamicFixtures.customer1.email, dynamicFixtures.address1.id_customer_address); + assertOrderCancellationForPrevOrder(); + + customerOverviewPage.viewLastPlacedOrder(); + customerOverviewPage.assertProductQuantity(dynamicFixtures.product1.name, 1); + customerOverviewPage.assertProductQuantity(dynamicFixtures.product2.name, 1); + }); + + it('customer should be able to finish amended order with updated product quantity', (): void => { + placeCustomerOrder(dynamicFixtures.customer2.email, dynamicFixtures.address2.id_customer_address); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.editOrder(); + + cartPage.visit(); + cartPage.changeQuantity({ sku: dynamicFixtures.product1.sku, quantity: 3 }); + + placeCustomerOrder(dynamicFixtures.customer2.email, dynamicFixtures.address2.id_customer_address); + assertOrderCancellationForPrevOrder(); + + customerOverviewPage.viewLastPlacedOrder(); + customerOverviewPage.assertProductQuantity(dynamicFixtures.product1.name, 3); + }); + + function assertOrderCancellationForPrevOrder(): void { + customerOverviewPage.visit(); + customerOverviewPage.viewOrder(2); + + orderDetailsPage.containsOrderState('Canceled'); + } + + function placeCustomerOrder(email: string, idCustomerAddress: number): void { + customerLoginScenario.execute({ + email: email, + password: staticFixtures.defaultPassword, + }); + + checkoutScenario.execute({ idCustomerAddress: idCustomerAddress, shouldTriggerOmsInCli: true }); + } + } +); diff --git a/cypress/e2e/yves/order-amendment/order-amendment-start.cy.ts b/cypress/e2e/yves/order-amendment/order-amendment-start.cy.ts new file mode 100644 index 00000000..2dab55d7 --- /dev/null +++ b/cypress/e2e/yves/order-amendment/order-amendment-start.cy.ts @@ -0,0 +1,184 @@ +import { container } from '@utils'; +import { OrderAmendmentStartDynamicFixtures, OrderAmendmentStaticFixtures } from '@interfaces/yves'; +import { CartPage, CatalogPage, CustomerOverviewPage, OrderDetailsPage, ProductPage } from '@pages/yves'; +import { CheckoutScenario, CustomerLoginScenario } from '@scenarios/yves'; +import { RemoveProductStockScenario, UserLoginScenario } from '@scenarios/backoffice'; +import { SalesDetailPage, SalesIndexPage } from '@pages/backoffice'; +import { DeactivateProductScenario } from '../../../support/scenarios/backoffice/deactivate-product-scenario'; + +/** + * Order Amendment checklists: {@link https://spryker.atlassian.net/wiki/spaces/CCS/pages/4545871873/Initialisation+Order+Amendment+Process} + */ +(['b2c', 'b2c-mp', 'b2b', 'b2b-mp'].includes(Cypress.env('repositoryId')) ? describe.skip : describe)( + 'order amendment start', + { tags: ['@order-amendment'] }, + (): void => { + const customerOverviewPage = container.get(CustomerOverviewPage); + const orderDetailsPage = container.get(OrderDetailsPage); + const cartPage = container.get(CartPage); + const catalogPage = container.get(CatalogPage); + const productPage = container.get(ProductPage); + const salesIndexPage = container.get(SalesIndexPage); + const salesDetailPage = container.get(SalesDetailPage); + + const customerLoginScenario = container.get(CustomerLoginScenario); + const checkoutScenario = container.get(CheckoutScenario); + const deactivateProductScenario = container.get(DeactivateProductScenario); + const userLoginScenario = container.get(UserLoginScenario); + const removeProductStockScenario = container.get(RemoveProductStockScenario); + + let staticFixtures: OrderAmendmentStaticFixtures; + let dynamicFixtures: OrderAmendmentStartDynamicFixtures; + + before((): void => { + ({ staticFixtures, dynamicFixtures } = Cypress.env()); + }); + + it('customer should be able to create order amendment and lock previous order', (): void => { + placeCustomerOrder(dynamicFixtures.customer1.email, dynamicFixtures.address1.id_customer_address); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.containsOrderState('Payment pending'); + + orderDetailsPage.getOrderReferenceBlock().then((orderReference: string) => { + orderDetailsPage.editOrder(); + + cartPage.assertPageLocation(); + cartPage.assertCartName(`Editing Order ${orderReference}`); + cy.get('body').contains(dynamicFixtures.product.name).should('exist'); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.containsOrderState('Editing in Progress'); + }); + }); + + it('customer should not be able to create order amendment when order not in payment-pending state', (): void => { + placeCustomerOrder(dynamicFixtures.customer2.email, dynamicFixtures.address2.id_customer_address); + triggerOmsOrderToPaidState(); + + customerLoginScenario.execute({ + email: dynamicFixtures.customer2.email, + password: staticFixtures.defaultPassword, + }); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.editOrder(); + + cy.contains('The order cannot be amended.').should('exist'); + }); + + it('customer should be able to replace current cart (quote) with previous order items', (): void => { + placeCustomerOrder(dynamicFixtures.customer3.email, dynamicFixtures.address3.id_customer_address); + + catalogPage.visit(); + catalogPage.searchProductFromSuggestions({ query: dynamicFixtures.product.sku }); + productPage.addToCart({ quantity: 2 }); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.editOrder(); + + cartPage.getCartItemChangeQuantityField(dynamicFixtures.product.sku).should('have.value', '1'); + }); + + it('customer should be able to modify new cart (change quantity, add new items)', (): void => { + placeCustomerOrder(dynamicFixtures.customer4.email, dynamicFixtures.address4.id_customer_address); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.editOrder(); + + cartPage.visit(); + cartPage.changeQuantity({ sku: dynamicFixtures.product.sku, quantity: 2 }); + + catalogPage.visit(); + catalogPage.searchProductFromSuggestions({ query: dynamicFixtures.product.sku }); + productPage.addToCart({ quantity: 2 }); + + cartPage.getCartItemChangeQuantityField(dynamicFixtures.product.sku).each(($input) => { + cy.wrap($input).should('have.value', '2'); + }); + }); + + it('customer should not be able to amend order when item was deactivated', (): void => { + placeCustomerOrder(dynamicFixtures.customer5.email, dynamicFixtures.address5.id_customer_address); + deactivateProductInBackoffice(); + + customerLoginScenario.execute({ + email: dynamicFixtures.customer5.email, + password: staticFixtures.defaultPassword, + }); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.editOrder(); + + cartPage.assertPageLocation(); + cy.contains(`Inactive item ${dynamicFixtures.productInActive.sku} was removed from your shopping cart.`).should( + 'exist' + ); + cy.get('body').contains(dynamicFixtures.product.name).should('exist'); + cy.get('body').contains(dynamicFixtures.productInActive.name).should('not.exist'); + }); + + it('customer should not be able to amend order when item was out-of-stock', (): void => { + placeCustomerOrder(dynamicFixtures.customer6.email, dynamicFixtures.address6.id_customer_address); + removeProductStock(); + + customerLoginScenario.execute({ + email: dynamicFixtures.customer6.email, + password: staticFixtures.defaultPassword, + }); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.editOrder(); + + cartPage.assertPageLocation(); + cy.contains(`Product ${dynamicFixtures.productOutOfStock.sku} is not available at the moment.`).should('exist'); + cy.get('body').contains(dynamicFixtures.product.name).should('exist'); + cy.get('body').contains(dynamicFixtures.productOutOfStock.name).should('not.exist'); + }); + + function placeCustomerOrder(email: string, idCustomerAddress: number): void { + customerLoginScenario.execute({ + email: email, + password: staticFixtures.defaultPassword, + }); + + checkoutScenario.execute({ idCustomerAddress: idCustomerAddress, shouldTriggerOmsInCli: true }); + } + + function deactivateProductInBackoffice(): void { + userLoginScenario.execute({ + username: dynamicFixtures.rootUser.username, + password: staticFixtures.defaultPassword, + }); + + deactivateProductScenario.execute({ + abstractSku: dynamicFixtures.productInActive.abstract_sku, + shouldTriggerPublishAndSync: true, + }); + } + + function removeProductStock(): void { + userLoginScenario.execute({ + username: dynamicFixtures.rootUser.username, + password: staticFixtures.defaultPassword, + }); + + removeProductStockScenario.execute({ + abstractSku: dynamicFixtures.productOutOfStock.abstract_sku, + shouldTriggerPublishAndSync: true, + }); + } + + function triggerOmsOrderToPaidState(): void { + userLoginScenario.execute({ + username: dynamicFixtures.rootUser.username, + password: staticFixtures.defaultPassword, + }); + + salesIndexPage.visit(); + salesIndexPage.view(); + + salesDetailPage.triggerOms({ state: 'Pay', shouldTriggerOmsInCli: true }); + } + } +); diff --git a/cypress/e2e/yves/product-comparison/product-comparison.cy.ts b/cypress/e2e/yves/product-comparison/product-comparison.cy.ts index 2093d09a..7f62a5ca 100644 --- a/cypress/e2e/yves/product-comparison/product-comparison.cy.ts +++ b/cypress/e2e/yves/product-comparison/product-comparison.cy.ts @@ -25,7 +25,7 @@ import { CatalogPage, ProductPage, ProductComparisonPage } from '@pages/yves'; addProductToComparisonList(dynamicFixtures.product1.abstract_sku); cy.contains(productPage.getAddToComparisonListSuccessMessage()); - cy.get(productComparisonPage.getComparisonPageNavigationLinkSelector()).click(); + cy.get(productComparisonPage.getComparisonPageNavigationLinkSelector()).click({ force: true }); cy.get(productComparisonPage.getProductItemsSelector()).should('have.length', 1); }); diff --git a/cypress/e2e/yves/reorder/reorder-concrete-products.cy.ts b/cypress/e2e/yves/reorder/reorder-concrete-products.cy.ts new file mode 100644 index 00000000..aa71929a --- /dev/null +++ b/cypress/e2e/yves/reorder/reorder-concrete-products.cy.ts @@ -0,0 +1,84 @@ +import { container } from '@utils'; +import { ReorderConcreteProductsDynamicFixtures, ReorderStaticFixtures } from '@interfaces/yves'; +import { CartPage, CustomerOverviewPage, OrderDetailsPage } from '@pages/yves'; +import { CheckoutScenario, CustomerLoginScenario } from '@scenarios/yves'; + +(['b2c', 'b2c-mp', 'b2b', 'b2b-mp'].includes(Cypress.env('repositoryId')) ? describe.skip : describe)( + 'reorder concrete products', + { tags: ['@reorder'] }, + (): void => { + const customerOverviewPage = container.get(CustomerOverviewPage); + const orderDetailsPage = container.get(OrderDetailsPage); + const cartPage = container.get(CartPage); + const customerLoginScenario = container.get(CustomerLoginScenario); + const checkoutScenario = container.get(CheckoutScenario); + + let staticFixtures: ReorderStaticFixtures; + let dynamicFixtures: ReorderConcreteProductsDynamicFixtures; + + before((): void => { + ({ staticFixtures, dynamicFixtures } = Cypress.env()); + }); + + it('customer should be able to reorder all items from previous order', (): void => { + placeCustomerOrder(dynamicFixtures.customer1.email, dynamicFixtures.address1.id_customer_address); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.getOrderReferenceBlock().then((orderReference: string) => { + orderDetailsPage.reorderAll(); + + cartPage.assertPageLocation(); + cartPage.assertCartName(`Reorder from Order ${orderReference}`); + + cy.get('body').contains(dynamicFixtures.product1.name).should('exist'); + cy.get('body').contains(dynamicFixtures.product2.name).should('exist'); + }); + }); + + it('customer should be able to reorder selected items from previous order', (): void => { + placeCustomerOrder(dynamicFixtures.customer2.email, dynamicFixtures.address2.id_customer_address); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.getOrderReferenceBlock().then((orderReference: string) => { + orderDetailsPage.reorderFirstSalesOrderItem(); + + cartPage.assertPageLocation(); + cartPage.assertCartName(`Reorder from Order ${orderReference}`); + + cy.get('body').contains(dynamicFixtures.product1.name).should('exist'); + cy.get('body').contains(dynamicFixtures.product2.name).should('not.exist'); + }); + }); + + it('customer should be able to reorder all items with quantity splitting', (): void => { + placeCustomerOrder(dynamicFixtures.customer3.email, dynamicFixtures.address3.id_customer_address); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.reorderAll(); + + cartPage.getCartItemChangeQuantityField(dynamicFixtures.product1.sku).should('have.value', '3'); + cartPage.getCartItemChangeQuantityField(dynamicFixtures.product2.sku).should('have.value', '2'); + }); + + it('customer should be able to reorder item with product option', (): void => { + placeCustomerOrder(dynamicFixtures.customer4.email, dynamicFixtures.address4.id_customer_address); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.reorderAll(); + + cy.get('body').contains(dynamicFixtures.productOptionValue.value).should('exist'); + }); + + function placeCustomerOrder(email: string, idCustomerAddress: number): void { + customerLoginScenario.execute({ + email: email, + password: staticFixtures.defaultPassword, + }); + + checkoutScenario.execute({ + idCustomerAddress: idCustomerAddress, + shouldTriggerOmsInCli: true, + }); + } + } +); diff --git a/cypress/e2e/yves/reorder/reorder-product-bundles.cy.ts b/cypress/e2e/yves/reorder/reorder-product-bundles.cy.ts new file mode 100644 index 00000000..95c0611a --- /dev/null +++ b/cypress/e2e/yves/reorder/reorder-product-bundles.cy.ts @@ -0,0 +1,50 @@ +import { container } from '@utils'; +import { ReorderProductBundlesDynamicFixtures, ReorderStaticFixtures } from '@interfaces/yves'; +import { CatalogPage, CustomerOverviewPage, OrderDetailsPage, ProductPage } from '@pages/yves'; +import { CheckoutScenario, CustomerLoginScenario } from '@scenarios/yves'; + +(['b2c', 'b2c-mp', 'b2b', 'b2b-mp'].includes(Cypress.env('repositoryId')) ? describe.skip : describe)( + 'reorder product bundles', + { tags: ['@order-amendment'] }, + (): void => { + const customerOverviewPage = container.get(CustomerOverviewPage); + const orderDetailsPage = container.get(OrderDetailsPage); + const catalogPage = container.get(CatalogPage); + const productPage = container.get(ProductPage); + + const customerLoginScenario = container.get(CustomerLoginScenario); + const checkoutScenario = container.get(CheckoutScenario); + + let staticFixtures: ReorderStaticFixtures; + let dynamicFixtures: ReorderProductBundlesDynamicFixtures; + + before((): void => { + ({ staticFixtures, dynamicFixtures } = Cypress.env()); + }); + + it('customer should be able to reorder product bundle', (): void => { + placeOrderWithProductBundle(); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.reorderAll(); + + cy.get('body').contains(dynamicFixtures.productBundle.name).should('exist'); + }); + + function placeOrderWithProductBundle(): void { + customerLoginScenario.execute({ + email: dynamicFixtures.customer.email, + password: staticFixtures.defaultPassword, + }); + + catalogPage.visit(); + catalogPage.searchProductFromSuggestions({ query: dynamicFixtures.productBundle.sku }); + productPage.addToCart(); + + checkoutScenario.execute({ + idCustomerAddress: dynamicFixtures.address.id_customer_address, + shouldTriggerOmsInCli: true, + }); + } + } +); diff --git a/cypress/e2e/yves/reorder/reorder-product-offers.cy.ts b/cypress/e2e/yves/reorder/reorder-product-offers.cy.ts new file mode 100644 index 00000000..8f511d1e --- /dev/null +++ b/cypress/e2e/yves/reorder/reorder-product-offers.cy.ts @@ -0,0 +1,64 @@ +import { container } from '@utils'; +import { ReorderProductOffersDynamicFixtures, ReorderStaticFixtures } from '@interfaces/yves'; +import { CartPage, CatalogPage, CustomerOverviewPage, OrderDetailsPage, ProductPage } from '@pages/yves'; +import { CheckoutScenario, CustomerLoginScenario } from '@scenarios/yves'; + +(['b2c', 'b2c-mp', 'b2b', 'b2b-mp'].includes(Cypress.env('repositoryId')) ? describe.skip : describe)( + 'reorder product offers', + { tags: ['@order-amendment'] }, + (): void => { + const customerOverviewPage = container.get(CustomerOverviewPage); + const orderDetailsPage = container.get(OrderDetailsPage); + const cartPage = container.get(CartPage); + const catalogPage = container.get(CatalogPage); + const productPage = container.get(ProductPage); + + const customerLoginScenario = container.get(CustomerLoginScenario); + const checkoutScenario = container.get(CheckoutScenario); + + let staticFixtures: ReorderStaticFixtures; + let dynamicFixtures: ReorderProductOffersDynamicFixtures; + + before((): void => { + ({ staticFixtures, dynamicFixtures } = Cypress.env()); + }); + + it('customer should be able to reorder product offers', (): void => { + placeOrderWithProductOffers(); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.getOrderReferenceBlock().then((orderReference: string) => { + orderDetailsPage.reorderAll(); + + cartPage.assertPageLocation(); + cartPage.assertCartName(`Reorder from Order ${orderReference}`); + + cy.get('body').contains(`Sold by ${dynamicFixtures.merchant1.name}`).should('exist'); + cy.get('body').contains(dynamicFixtures.product1.name).should('exist'); + + cy.get('body').contains(`Sold by ${dynamicFixtures.merchant2.name}`).should('exist'); + cy.get('body').contains(dynamicFixtures.product2.name).should('exist'); + }); + }); + + function placeOrderWithProductOffers(): void { + customerLoginScenario.execute({ + email: dynamicFixtures.customer.email, + password: staticFixtures.defaultPassword, + }); + + catalogPage.visit(); + catalogPage.searchProductFromSuggestions({ query: dynamicFixtures.product1.sku }); + productPage.addToCart(); + + catalogPage.visit(); + catalogPage.searchProductFromSuggestions({ query: dynamicFixtures.product2.sku }); + productPage.addToCart(); + + checkoutScenario.execute({ + idCustomerAddress: dynamicFixtures.address.id_customer_address, + shouldTriggerOmsInCli: true, + }); + } + } +); diff --git a/cypress/e2e/yves/reorder/reorder-random-weight-products.cy.ts b/cypress/e2e/yves/reorder/reorder-random-weight-products.cy.ts new file mode 100644 index 00000000..92c1918f --- /dev/null +++ b/cypress/e2e/yves/reorder/reorder-random-weight-products.cy.ts @@ -0,0 +1,64 @@ +import { container } from '@utils'; +import { ReorderRandomWeightProductsDynamicFixtures, ReorderStaticFixtures } from '@interfaces/yves'; +import { CatalogPage, CustomerOverviewPage, OrderDetailsPage, ProductPage } from '@pages/yves'; +import { CheckoutScenario, CustomerLoginScenario } from '@scenarios/yves'; + +(['b2c', 'b2c-mp', 'b2b', 'b2b-mp'].includes(Cypress.env('repositoryId')) ? describe.skip : describe)( + 'reorder random weight products', + { tags: ['@order-amendment'] }, + (): void => { + const customerOverviewPage = container.get(CustomerOverviewPage); + const orderDetailsPage = container.get(OrderDetailsPage); + const catalogPage = container.get(CatalogPage); + const productPage = container.get(ProductPage); + + const customerLoginScenario = container.get(CustomerLoginScenario); + const checkoutScenario = container.get(CheckoutScenario); + + let staticFixtures: ReorderStaticFixtures; + let dynamicFixtures: ReorderRandomWeightProductsDynamicFixtures; + + before((): void => { + ({ staticFixtures, dynamicFixtures } = Cypress.env()); + triggerPublishEvents(); + }); + + it('customer should be able to reorder random weight products', (): void => { + placeOrderWithRandomWeightProducts(); + + customerOverviewPage.viewLastPlacedOrder(); + orderDetailsPage.reorderAll(); + + cy.get('body').contains(dynamicFixtures.productMUnit.name).should('exist'); + cy.get('body').contains(dynamicFixtures.productPUnit.name).should('exist'); + }); + + function placeOrderWithRandomWeightProducts(): void { + customerLoginScenario.execute({ + email: dynamicFixtures.customer.email, + password: staticFixtures.defaultPassword, + }); + + catalogPage.visit(); + catalogPage.searchProductFromSuggestions({ query: dynamicFixtures.productMUnit.sku }); + productPage.addToCart(); + + catalogPage.visit(); + catalogPage.searchProductFromSuggestions({ query: dynamicFixtures.productPUnit.sku }); + productPage.addToCart(); + + checkoutScenario.execute({ + idCustomerAddress: dynamicFixtures.address.id_customer_address, + shouldTriggerOmsInCli: true, + }); + } + + function triggerPublishEvents(): void { + cy.runCliCommands([ + `console publish:trigger-events -r product_concrete_measurement_unit -i ${dynamicFixtures.productMUnit.id_product_concrete},${dynamicFixtures.productPUnit.id_product_concrete}`, + `console publish:trigger-events -r product_packaging_unit -i ${dynamicFixtures.productPUnit.id_product_concrete}`, + 'console queue:worker:start --stop-when-empty', + ]); + } + } +); diff --git a/cypress/fixtures/suite/yves/order-amendment/dynamic-order-amendment-cancel.json b/cypress/fixtures/suite/yves/order-amendment/dynamic-order-amendment-cancel.json new file mode 100644 index 00000000..66d18c05 --- /dev/null +++ b/cypress/fixtures/suite/yves/order-amendment/dynamic-order-amendment-cancel.json @@ -0,0 +1,103 @@ +{ + "data": { + "type": "dynamic-fixtures", + "attributes": { + "synchronize": true, + "operations": [ + { + "type": "transfer", + "name": "LocaleTransfer", + "key": "locale", + "arguments": { "id_locale": 66, "locale_name": "en_US" } + }, + { + "type": "helper", + "name": "haveCountry", + "key": "country" + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "confirmCustomer", + "arguments": ["#customer"] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address", + "arguments": [{ "fkCustomer": "#customer.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "transfer", + "name": "StoreTransfer", + "key": "store", + "arguments": { "id_store": 1, "name": "DE" } + }, + { + "type": "transfer", + "name": "ProductImageTransfer", + "key": "productImage", + "arguments": { + "externalUrlSmall": "https://images.icecat.biz/img/gallery_mediums/30691822_1486.jpg", + "externalUrlLarge": "https://images.icecat.biz/img/gallery/30691822_1486.jpg" + } + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "product", + "arguments": [{}, { "idTaxSet": 1 }] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#product.abstract_sku", + "skuProduct": "#product.sku", + "moneyValue": { "netAmount": 30000, "grossAmount": 30000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStockForStore", + "arguments": ["#store", { "sku": "#product.sku", "isNeverOutOfStock": "1" }] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#product.id_product_concrete", + "idProductAbstract": "#product.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "helper", + "name": "havePersistentQuote", + "arguments": [ + { + "customer": "#customer", + "items": [ + { + "sku": "#product.sku", + "abstractSku": "#product.abstract_sku", + "quantity": 1 + } + ] + } + ] + } + ] + } + } +} diff --git a/cypress/fixtures/suite/yves/order-amendment/dynamic-order-amendment-finish.json b/cypress/fixtures/suite/yves/order-amendment/dynamic-order-amendment-finish.json new file mode 100644 index 00000000..9136ad1a --- /dev/null +++ b/cypress/fixtures/suite/yves/order-amendment/dynamic-order-amendment-finish.json @@ -0,0 +1,170 @@ +{ + "data": { + "type": "dynamic-fixtures", + "attributes": { + "synchronize": true, + "operations": [ + { + "type": "transfer", + "name": "LocaleTransfer", + "key": "locale", + "arguments": { "id_locale": 66, "locale_name": "en_US" } + }, + { + "type": "helper", + "name": "haveCountry", + "key": "country" + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer1", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer2", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "confirmCustomer", + "arguments": ["#customer1"] + }, + { + "type": "helper", + "name": "confirmCustomer", + "arguments": ["#customer2"] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address1", + "arguments": [{ "fkCustomer": "#customer1.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address2", + "arguments": [{ "fkCustomer": "#customer2.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "transfer", + "name": "StoreTransfer", + "key": "store", + "arguments": { "id_store": 1, "name": "DE" } + }, + { + "type": "transfer", + "name": "ProductImageTransfer", + "key": "productImage", + "arguments": { + "externalUrlSmall": "https://images.icecat.biz/img/gallery_mediums/30691822_1486.jpg", + "externalUrlLarge": "https://images.icecat.biz/img/gallery/30691822_1486.jpg" + } + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "product1", + "arguments": [{}, { "idTaxSet": 1 }] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#product1.abstract_sku", + "skuProduct": "#product1.sku", + "moneyValue": { "netAmount": 30000, "grossAmount": 30000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStockForStore", + "arguments": ["#store", { "sku": "#product1.sku", "isNeverOutOfStock": "1" }] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#product1.id_product_concrete", + "idProductAbstract": "#product1.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "product2", + "arguments": [{}, { "idTaxSet": 1 }] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#product2.abstract_sku", + "skuProduct": "#product2.sku", + "moneyValue": { "netAmount": 30000, "grossAmount": 30000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStockForStore", + "arguments": ["#store", { "sku": "#product2.sku", "isNeverOutOfStock": "1" }] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#product2.id_product_concrete", + "idProductAbstract": "#product2.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "helper", + "name": "havePersistentQuote", + "arguments": [ + { + "customer": "#customer1", + "items": [ + { + "sku": "#product1.sku", + "abstractSku": "#product1.abstract_sku", + "quantity": 1 + } + ] + } + ] + }, + { + "type": "helper", + "name": "havePersistentQuote", + "arguments": [ + { + "customer": "#customer2", + "items": [ + { + "sku": "#product1.sku", + "abstractSku": "#product1.abstract_sku", + "quantity": 1 + } + ] + } + ] + } + ] + } + } +} diff --git a/cypress/fixtures/suite/yves/order-amendment/dynamic-order-amendment-start.json b/cypress/fixtures/suite/yves/order-amendment/dynamic-order-amendment-start.json new file mode 100644 index 00000000..554e7985 --- /dev/null +++ b/cypress/fixtures/suite/yves/order-amendment/dynamic-order-amendment-start.json @@ -0,0 +1,357 @@ +{ + "data": { + "type": "dynamic-fixtures", + "attributes": { + "synchronize": true, + "operations": [ + { + "type": "helper", + "name": "haveUser", + "key": "rootUser", + "arguments": [{ "password": "change123" }] + }, + { + "type": "helper", + "name": "addUserToGroup", + "arguments": ["#rootUser.id_user", 1] + }, + { + "type": "transfer", + "name": "LocaleTransfer", + "key": "locale", + "arguments": { "id_locale": 66, "locale_name": "en_US" } + }, + { + "type": "helper", + "name": "haveCountry", + "key": "country" + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer1", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer2", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer3", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer4", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer5", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer6", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "confirmCustomer", + "arguments": ["#customer1"] + }, + { + "type": "helper", + "name": "confirmCustomer", + "arguments": ["#customer2"] + }, + { + "type": "helper", + "name": "confirmCustomer", + "arguments": ["#customer3"] + }, + { + "type": "helper", + "name": "confirmCustomer", + "arguments": ["#customer4"] + }, + { + "type": "helper", + "name": "confirmCustomer", + "arguments": ["#customer5"] + }, + { + "type": "helper", + "name": "confirmCustomer", + "arguments": ["#customer6"] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address1", + "arguments": [{ "fkCustomer": "#customer1.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address2", + "arguments": [{ "fkCustomer": "#customer2.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address3", + "arguments": [{ "fkCustomer": "#customer3.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address4", + "arguments": [{ "fkCustomer": "#customer4.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address5", + "arguments": [{ "fkCustomer": "#customer5.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address6", + "arguments": [{ "fkCustomer": "#customer6.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "transfer", + "name": "StoreTransfer", + "key": "store", + "arguments": { "id_store": 1, "name": "DE" } + }, + { + "type": "transfer", + "name": "ProductImageTransfer", + "key": "productImage", + "arguments": { + "externalUrlSmall": "https://images.icecat.biz/img/gallery_mediums/30691822_1486.jpg", + "externalUrlLarge": "https://images.icecat.biz/img/gallery/30691822_1486.jpg" + } + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "product", + "arguments": [{}, { "idTaxSet": 1 }] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#product.abstract_sku", + "skuProduct": "#product.sku", + "moneyValue": { "netAmount": 30000, "grossAmount": 30000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStockForStore", + "arguments": ["#store", { "sku": "#product.sku", "isNeverOutOfStock": "1" }] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#product.id_product_concrete", + "idProductAbstract": "#product.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "productInActive", + "arguments": [{}, { "idTaxSet": 1 }] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#productInActive.abstract_sku", + "skuProduct": "#productInActive.sku", + "moneyValue": { "netAmount": 30000, "grossAmount": 30000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStockForStore", + "arguments": ["#store", { "sku": "#productInActive.sku", "isNeverOutOfStock": "1" }] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#productInActive.id_product_concrete", + "idProductAbstract": "#productInActive.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "productOutOfStock", + "arguments": [{}, { "idTaxSet": 1 }] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#productOutOfStock.abstract_sku", + "skuProduct": "#productOutOfStock.sku", + "moneyValue": { "netAmount": 30000, "grossAmount": 30000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStockForStore", + "arguments": ["#store", { "sku": "#productOutOfStock.sku", "isNeverOutOfStock": "1" }] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#productOutOfStock.id_product_concrete", + "idProductAbstract": "#productOutOfStock.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "helper", + "name": "havePersistentQuote", + "arguments": [ + { + "customer": "#customer1", + "items": [ + { + "sku": "#product.sku", + "abstractSku": "#product.abstract_sku", + "quantity": 1 + } + ] + } + ] + }, + { + "type": "helper", + "name": "havePersistentQuote", + "arguments": [ + { + "customer": "#customer2", + "items": [ + { + "sku": "#product.sku", + "abstractSku": "#product.abstract_sku", + "quantity": 1 + } + ] + } + ] + }, + { + "type": "helper", + "name": "havePersistentQuote", + "arguments": [ + { + "customer": "#customer3", + "items": [ + { + "sku": "#product.sku", + "abstractSku": "#product.abstract_sku", + "quantity": 1 + } + ] + } + ] + }, + { + "type": "helper", + "name": "havePersistentQuote", + "arguments": [ + { + "customer": "#customer4", + "items": [ + { + "sku": "#product.sku", + "abstractSku": "#product.abstract_sku", + "quantity": 1 + } + ] + } + ] + }, + { + "type": "helper", + "name": "havePersistentQuote", + "arguments": [ + { + "customer": "#customer5", + "items": [ + { + "sku": "#product.sku", + "abstractSku": "#product.abstract_sku", + "quantity": 1 + }, + { + "sku": "#productInActive.sku", + "abstractSku": "#productInActive.abstract_sku", + "quantity": 1 + } + ] + } + ] + }, + { + "type": "helper", + "name": "havePersistentQuote", + "arguments": [ + { + "customer": "#customer6", + "items": [ + { + "sku": "#product.sku", + "abstractSku": "#product.abstract_sku", + "quantity": 1 + }, + { + "sku": "#productOutOfStock.sku", + "abstractSku": "#productOutOfStock.abstract_sku", + "quantity": 1 + } + ] + } + ] + } + ] + } + } +} diff --git a/cypress/fixtures/suite/yves/order-amendment/static-order-amendment-cancel.json b/cypress/fixtures/suite/yves/order-amendment/static-order-amendment-cancel.json new file mode 100644 index 00000000..ba4339e8 --- /dev/null +++ b/cypress/fixtures/suite/yves/order-amendment/static-order-amendment-cancel.json @@ -0,0 +1,3 @@ +{ + "defaultPassword": "change123" +} diff --git a/cypress/fixtures/suite/yves/order-amendment/static-order-amendment-finish.json b/cypress/fixtures/suite/yves/order-amendment/static-order-amendment-finish.json new file mode 100644 index 00000000..ba4339e8 --- /dev/null +++ b/cypress/fixtures/suite/yves/order-amendment/static-order-amendment-finish.json @@ -0,0 +1,3 @@ +{ + "defaultPassword": "change123" +} diff --git a/cypress/fixtures/suite/yves/order-amendment/static-order-amendment-start.json b/cypress/fixtures/suite/yves/order-amendment/static-order-amendment-start.json new file mode 100644 index 00000000..ba4339e8 --- /dev/null +++ b/cypress/fixtures/suite/yves/order-amendment/static-order-amendment-start.json @@ -0,0 +1,3 @@ +{ + "defaultPassword": "change123" +} diff --git a/cypress/fixtures/suite/yves/reorder/dynamic-reorder-concrete-products.json b/cypress/fixtures/suite/yves/reorder/dynamic-reorder-concrete-products.json new file mode 100644 index 00000000..c259f3b5 --- /dev/null +++ b/cypress/fixtures/suite/yves/reorder/dynamic-reorder-concrete-products.json @@ -0,0 +1,258 @@ +{ + "data": { + "type": "dynamic-fixtures", + "attributes": { + "synchronize": true, + "operations": [ + { + "type": "transfer", + "name": "LocaleTransfer", + "key": "locale", + "arguments": { "id_locale": 66, "locale_name": "en_US" } + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer1", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer2", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer3", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer4", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "confirmCustomer", + "arguments": ["#customer1"] + }, + { + "type": "helper", + "name": "confirmCustomer", + "arguments": ["#customer2"] + }, + { + "type": "helper", + "name": "confirmCustomer", + "arguments": ["#customer3"] + }, + { + "type": "helper", + "name": "confirmCustomer", + "arguments": ["#customer4"] + }, + { + "type": "transfer", + "name": "StoreTransfer", + "key": "store", + "arguments": { "id_store": 1, "name": "DE", "defaultCurrencyIsoCode": "EUR" } + }, + { + "type": "helper", + "name": "haveCountry", + "key": "country" + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address1", + "arguments": [{ "fkCustomer": "#customer1.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address2", + "arguments": [{ "fkCustomer": "#customer2.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address3", + "arguments": [{ "fkCustomer": "#customer3.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address4", + "arguments": [{ "fkCustomer": "#customer4.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "transfer", + "name": "ProductImageTransfer", + "key": "productImage", + "arguments": { + "externalUrlSmall": "https://images.icecat.biz/img/gallery_mediums/30691822_1486.jpg", + "externalUrlLarge": "https://images.icecat.biz/img/gallery/30691822_1486.jpg" + } + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "product1", + "arguments": [{}, { "idTaxSet": 1 }] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#product1.abstract_sku", + "skuProduct": "#product1.sku", + "moneyValue": { "netAmount": 30000, "grossAmount": 30000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStockForStore", + "arguments": ["#store", { "sku": "#product1.sku", "isNeverOutOfStock": "1" }] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#product1.id_product_concrete", + "idProductAbstract": "#product1.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "product2", + "arguments": [{}, { "idTaxSet": 1 }] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#product2.abstract_sku", + "skuProduct": "#product2.sku", + "moneyValue": { "netAmount": 30000, "grossAmount": 30000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStockForStore", + "arguments": ["#store", { "sku": "#product2.sku", "isNeverOutOfStock": "1" }] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#product2.id_product_concrete", + "idProductAbstract": "#product2.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "helper", + "name": "haveProductOptionValueForAbstractProduct", + "key": "productOptionValue", + "arguments": ["#product2.abstract_sku", "#store"] + }, + { + "type": "helper", + "name": "havePersistentQuote", + "arguments": [ + { + "customer": "#customer1", + "items": [ + { + "sku": "#product1.sku", + "abstractSku": "#product1.abstract_sku", + "quantity": 1 + }, + { + "sku": "#product2.sku", + "abstractSku": "#product2.abstract_sku", + "quantity": 1 + } + ] + } + ] + }, + { + "type": "helper", + "name": "havePersistentQuote", + "arguments": [ + { + "customer": "#customer2", + "items": [ + { + "sku": "#product1.sku", + "abstractSku": "#product1.abstract_sku", + "quantity": 1 + }, + { + "sku": "#product2.sku", + "abstractSku": "#product2.abstract_sku", + "quantity": 1 + } + ] + } + ] + }, + { + "type": "helper", + "name": "havePersistentQuote", + "arguments": [ + { + "customer": "#customer3", + "items": [ + { + "sku": "#product1.sku", + "abstractSku": "#product1.abstract_sku", + "quantity": 3 + }, + { + "sku": "#product2.sku", + "abstractSku": "#product2.abstract_sku", + "quantity": 2 + } + ] + } + ] + }, + { + "type": "helper", + "name": "havePersistentQuote", + "arguments": [ + { + "customer": "#customer4", + "items": [ + { + "sku": "#product2.sku", + "abstractSku": "#product2.abstract_sku", + "quantity": 1, + "productOptions": [{ "idProductOptionValue": "#productOptionValue.id_product_option_value" }] + } + ] + } + ] + } + ] + } + } +} diff --git a/cypress/fixtures/suite/yves/reorder/dynamic-reorder-product-bundles.json b/cypress/fixtures/suite/yves/reorder/dynamic-reorder-product-bundles.json new file mode 100644 index 00000000..1c7b608d --- /dev/null +++ b/cypress/fixtures/suite/yves/reorder/dynamic-reorder-product-bundles.json @@ -0,0 +1,188 @@ +{ + "data": { + "type": "dynamic-fixtures", + "attributes": { + "synchronize": true, + "operations": [ + { + "type": "transfer", + "name": "LocaleTransfer", + "key": "locale", + "arguments": { "id_locale": 66, "locale_name": "en_US" } + }, + { + "type": "helper", + "name": "haveCountry", + "key": "country" + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "confirmCustomer", + "arguments": ["#customer"] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address", + "arguments": [{ "fkCustomer": "#customer.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "transfer", + "name": "StoreTransfer", + "key": "store", + "arguments": { "id_store": 1, "name": "DE" } + }, + { + "type": "transfer", + "name": "ProductImageTransfer", + "key": "productImage", + "arguments": { + "externalUrlSmall": "https://images.icecat.biz/img/gallery_mediums/30691822_1486.jpg", + "externalUrlLarge": "https://images.icecat.biz/img/gallery/30691822_1486.jpg" + } + }, + { + "type": "transfer", + "name": "ProductImageTransfer", + "key": "bundleProductImage", + "arguments": { + "externalUrlSmall": "https://images.icecat.biz/img/norm/medium/23120327-Sony.jpg", + "externalUrlLarge": "https://images.icecat.biz/img/norm/high/23120327-Sony.jpg" + } + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "product", + "arguments": [{}, { "idTaxSet": 1 }] + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "bundledProduct1", + "arguments": [{}, { "idTaxSet": 1 }] + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "bundledProduct2", + "arguments": [{}, { "idTaxSet": 1 }] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#bundledProduct1.abstract_sku", + "skuProduct": "#bundledProduct1.sku", + "moneyValue": { "netAmount": 30000, "grossAmount": 30000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStockForStore", + "arguments": ["#store", { "sku": "#bundledProduct1.sku", "isNeverOutOfStock": "1" }] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#bundledProduct1.id_product_concrete", + "idProductAbstract": "#bundledProduct1.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#bundledProduct2.abstract_sku", + "skuProduct": "#bundledProduct2.sku", + "moneyValue": { "netAmount": 30000, "grossAmount": 30000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStockForStore", + "arguments": ["#store", { "sku": "#bundledProduct2.sku", "isNeverOutOfStock": "1" }] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#bundledProduct2.id_product_concrete", + "idProductAbstract": "#bundledProduct2.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "helper", + "name": "haveProductBundle", + "key": "productBundle", + "arguments": [ + "#product", + { + "bundledProducts": [ + { + "idProductConcrete": "#bundledProduct1.id_product_concrete", + "idProductBundle": "#product.id_product_concrete", + "quantity": 2, + "sku": "#bundledProduct1.sku" + }, + { + "idProductConcrete": "#bundledProduct2.id_product_concrete", + "idProductBundle": "#product.id_product_concrete", + "quantity": 3, + "sku": "#bundledProduct2.sku" + } + ] + } + ] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#productBundle.abstract_sku", + "skuProduct": "#productBundle.sku", + "moneyValue": { "netAmount": 30000, "grossAmount": 30000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStockForStore", + "arguments": ["#store", { "sku": "#productBundle.sku", "isNeverOutOfStock": "1" }] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#productBundle.id_product_concrete", + "idProductAbstract": "#productBundle.fk_product_abstract", + "productImages": ["#bundleProductImage"] + } + ] + } + ] + } + } +} diff --git a/cypress/fixtures/suite/yves/reorder/dynamic-reorder-product-offers.json b/cypress/fixtures/suite/yves/reorder/dynamic-reorder-product-offers.json new file mode 100644 index 00000000..2af78d46 --- /dev/null +++ b/cypress/fixtures/suite/yves/reorder/dynamic-reorder-product-offers.json @@ -0,0 +1,212 @@ +{ + "data": { + "type": "dynamic-fixtures", + "attributes": { + "synchronize": true, + "operations": [ + { + "type": "transfer", + "name": "LocaleTransfer", + "key": "locale", + "arguments": { "id_locale": 66, "locale_name": "en_US" } + }, + { + "type": "helper", + "name": "haveCountry", + "key": "country" + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "confirmCustomer", + "arguments": ["#customer"] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address", + "arguments": [{ "fkCustomer": "#customer.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "transfer", + "name": "StoreTransfer", + "key": "store", + "arguments": { "id_store": 1, "name": "DE" } + }, + { + "type": "array-object", + "key": "stores", + "arguments": ["#store"] + }, + { + "type": "transfer", + "name": "ProductImageTransfer", + "key": "productImage", + "arguments": { + "externalUrlSmall": "https://images.icecat.biz/img/gallery_mediums/30691822_1486.jpg", + "externalUrlLarge": "https://images.icecat.biz/img/gallery/30691822_1486.jpg" + } + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "product1", + "arguments": [{}, { "idTaxSet": 1 }] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#product1.abstract_sku", + "skuProduct": "#product1.sku", + "moneyValue": { "netAmount": 30000, "grossAmount": 30000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#product1.id_product_concrete", + "idProductAbstract": "#product1.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "builder", + "name": "MerchantProfileBuilder", + "key": "merchantProfile1" + }, + { + "type": "helper", + "name": "haveMerchant", + "key": "merchant1", + "arguments": [ + { + "merchantProfile": "#merchantProfile1", + "isActive": true, + "isOpenForRelationRequest": true, + "status": "approved", + "storeRelation": { + "idStores": ["#store.id_store"] + } + } + ] + }, + { + "type": "helper", + "name": "haveProductOffer", + "key": "productOffer1", + "arguments": [ + { + "isActive": true, + "status": "approved", + "idProductConcrete": "#product1.id_product_concrete", + "concreteSku": "#product1.sku", + "merchantReference": "#merchant1.merchant_reference", + "stores": "#stores" + } + ] + }, + { + "type": "helper", + "name": "haveProductOfferStock", + "arguments": [ + { + "idProductOffer": "#productOffer1.id_product_offer", + "productOfferReference": "#productOffer1.product_offer_reference", + "isNeverOutOfStock": true + }, + "#merchant1.stocks" + ] + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "product2", + "arguments": [{}, { "idTaxSet": 1 }] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#product2.abstract_sku", + "skuProduct": "#product2.sku", + "moneyValue": { "netAmount": 30000, "grossAmount": 30000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#product2.id_product_concrete", + "idProductAbstract": "#product2.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "builder", + "name": "MerchantProfileBuilder", + "key": "merchantProfile2" + }, + { + "type": "helper", + "name": "haveMerchant", + "key": "merchant2", + "arguments": [ + { + "merchantProfile": "#merchantProfile2", + "isActive": true, + "isOpenForRelationRequest": true, + "status": "approved", + "storeRelation": { + "idStores": ["#store.id_store"] + } + } + ] + }, + { + "type": "helper", + "name": "haveProductOffer", + "key": "productOffer2", + "arguments": [ + { + "isActive": true, + "status": "approved", + "idProductConcrete": "#product2.id_product_concrete", + "concreteSku": "#product2.sku", + "merchantReference": "#merchant2.merchant_reference", + "stores": "#stores" + } + ] + }, + { + "type": "helper", + "name": "haveProductOfferStock", + "arguments": [ + { + "idProductOffer": "#productOffer2.id_product_offer", + "productOfferReference": "#productOffer2.product_offer_reference", + "isNeverOutOfStock": true + }, + "#merchant2.stocks" + ] + } + ] + } + } +} diff --git a/cypress/fixtures/suite/yves/reorder/dynamic-reorder-random-weight-products.json b/cypress/fixtures/suite/yves/reorder/dynamic-reorder-random-weight-products.json new file mode 100644 index 00000000..b0e5beb8 --- /dev/null +++ b/cypress/fixtures/suite/yves/reorder/dynamic-reorder-random-weight-products.json @@ -0,0 +1,179 @@ +{ + "data": { + "type": "dynamic-fixtures", + "attributes": { + "synchronize": true, + "operations": [ + { + "type": "transfer", + "name": "LocaleTransfer", + "key": "locale", + "arguments": { "id_locale": 66, "locale_name": "en_US" } + }, + { + "type": "helper", + "name": "haveCountry", + "key": "country" + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "confirmCustomer", + "arguments": ["#customer"] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address", + "arguments": [{ "fkCustomer": "#customer.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "transfer", + "name": "StoreTransfer", + "key": "store", + "arguments": { "id_store": 1, "name": "DE" } + }, + { + "type": "transfer", + "name": "ProductImageTransfer", + "key": "productImageForMeasurementUnit", + "arguments": { + "externalUrlSmall": "/assets/static/images/potatoes_public_domain.jpg", + "externalUrlLarge": "/assets/static/images/potatoes_public_domain.jpg" + } + }, + { + "type": "transfer", + "name": "ProductImageTransfer", + "key": "productImageForPackagingUnit", + "arguments": { + "externalUrlSmall": "https://images.icecat.biz/img/gallery_mediums/img_13626032_medium_1481799707_2242_1176.jpg", + "externalUrlLarge": "https://images.icecat.biz/img/gallery_mediums/img_13626032_medium_1481799707_2242_1176.jpg" + } + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "productMUnit", + "arguments": [{}, { "idTaxSet": 1 }] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#productMUnit.abstract_sku", + "skuProduct": "#productMUnit.sku", + "moneyValue": { "netAmount": 30000, "grossAmount": 30000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStockForStore", + "arguments": ["#store", { "sku": "#productMUnit.sku", "isNeverOutOfStock": "1" }] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#productMUnit.id_product_concrete", + "idProductAbstract": "#productMUnit.fk_product_abstract", + "productImages": ["#productImageForMeasurementUnit"] + } + ] + }, + { + "type": "helper", + "name": "haveProductMeasurementBaseUnit", + "key": "productMeasurementBaseUnit", + "arguments": ["#productMUnit.fk_product_abstract", 2] + }, + { + "type": "helper", + "name": "haveProductMeasurementSalesUnit", + "arguments": [ + "#productMUnit.id_product_concrete", + 2, + "#productMeasurementBaseUnit.id_product_measurement_base_unit", + { "isDefault": true } + ] + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "productPUnit", + "arguments": [{ "attributes": [{ "packaging_unit": "box" }] }, { "idTaxSet": 1 }] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#productPUnit.abstract_sku", + "skuProduct": "#productPUnit.sku", + "moneyValue": { "netAmount": 30000, "grossAmount": 30000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStockForStore", + "arguments": ["#store", { "sku": "#productPUnit.sku", "isNeverOutOfStock": "1" }] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#productPUnit.id_product_concrete", + "idProductAbstract": "#productPUnit.fk_product_abstract", + "productImages": ["#productImageForPackagingUnit"] + } + ] + }, + { + "type": "helper", + "name": "haveProductPackagingUnitType", + "key": "boxProductPackagingUnitType", + "arguments": [{ "name": "box" }] + }, + { + "type": "helper", + "name": "haveProductPackagingUnit", + "arguments": [ + { + "fkProduct": "#productPUnit.id_product_concrete", + "fkProductPackagingUnitType": "#boxProductPackagingUnitType.id_product_packaging_unit_type", + "fkLeadProduct": "#productPUnit.id_product_concrete" + }, + { "defaultAmount": 10 } + ] + }, + { + "type": "helper", + "name": "haveProductMeasurementBaseUnit", + "key": "productMeasurementBaseUnitForPackagingUnit", + "arguments": ["#productPUnit.fk_product_abstract", 1] + }, + { + "type": "helper", + "name": "haveProductMeasurementSalesUnit", + "arguments": [ + "#productPUnit.id_product_concrete", + 1, + "#productMeasurementBaseUnitForPackagingUnit.id_product_measurement_base_unit" + ] + } + ] + } + } +} diff --git a/cypress/fixtures/suite/yves/reorder/static-reorder-concrete-products.json b/cypress/fixtures/suite/yves/reorder/static-reorder-concrete-products.json new file mode 100644 index 00000000..ba4339e8 --- /dev/null +++ b/cypress/fixtures/suite/yves/reorder/static-reorder-concrete-products.json @@ -0,0 +1,3 @@ +{ + "defaultPassword": "change123" +} diff --git a/cypress/fixtures/suite/yves/reorder/static-reorder-product-bundles.json b/cypress/fixtures/suite/yves/reorder/static-reorder-product-bundles.json new file mode 100644 index 00000000..ba4339e8 --- /dev/null +++ b/cypress/fixtures/suite/yves/reorder/static-reorder-product-bundles.json @@ -0,0 +1,3 @@ +{ + "defaultPassword": "change123" +} diff --git a/cypress/fixtures/suite/yves/reorder/static-reorder-product-offers.json b/cypress/fixtures/suite/yves/reorder/static-reorder-product-offers.json new file mode 100644 index 00000000..ba4339e8 --- /dev/null +++ b/cypress/fixtures/suite/yves/reorder/static-reorder-product-offers.json @@ -0,0 +1,3 @@ +{ + "defaultPassword": "change123" +} diff --git a/cypress/fixtures/suite/yves/reorder/static-reorder-random-weight-products.json b/cypress/fixtures/suite/yves/reorder/static-reorder-random-weight-products.json new file mode 100644 index 00000000..ba4339e8 --- /dev/null +++ b/cypress/fixtures/suite/yves/reorder/static-reorder-random-weight-products.json @@ -0,0 +1,3 @@ +{ + "defaultPassword": "change123" +} diff --git a/cypress/support/pages/backoffice/availability/edit/availability-edit-page.ts b/cypress/support/pages/backoffice/availability/edit/availability-edit-page.ts new file mode 100644 index 00000000..3a01a967 --- /dev/null +++ b/cypress/support/pages/backoffice/availability/edit/availability-edit-page.ts @@ -0,0 +1,19 @@ +import { autoWired } from '@utils'; +import { inject, injectable } from 'inversify'; +import { BackofficePage } from '@pages/backoffice'; +import { AvailabilityEditRepository } from './availability-edit-repository'; + +@injectable() +@autoWired +export class AvailabilityEditPage extends BackofficePage { + @inject(AvailabilityEditRepository) private repository: AvailabilityEditRepository; + + protected PAGE_URL = '/availability-gui/edit/view'; + + uncheckFirstStock = (): void => { + this.repository.getFirstStockQuantityInput().type('0'); + this.repository.getFirstIsNeverOutOfStockCheckbox().uncheck(); + + this.repository.getSaveButton().click(); + }; +} diff --git a/cypress/support/pages/backoffice/availability/edit/availability-edit-repository.ts b/cypress/support/pages/backoffice/availability/edit/availability-edit-repository.ts new file mode 100644 index 00000000..114faa4a --- /dev/null +++ b/cypress/support/pages/backoffice/availability/edit/availability-edit-repository.ts @@ -0,0 +1,11 @@ +import { autoWired } from '@utils'; +import { injectable } from 'inversify'; + +@injectable() +@autoWired +export class AvailabilityEditRepository { + getFirstStockQuantityInput = (): Cypress.Chainable => cy.get('#AvailabilityGui_stock_stocks_0_quantity'); + getFirstIsNeverOutOfStockCheckbox = (): Cypress.Chainable => + cy.get('#AvailabilityGui_stock_stocks_0_is_never_out_of_stock'); + getSaveButton = (): Cypress.Chainable => cy.get('[type="submit"]'); +} diff --git a/cypress/support/pages/backoffice/availability/index/availability-index-page.ts b/cypress/support/pages/backoffice/availability/index/availability-index-page.ts new file mode 100644 index 00000000..3ba0b6b7 --- /dev/null +++ b/cypress/support/pages/backoffice/availability/index/availability-index-page.ts @@ -0,0 +1,46 @@ +import { autoWired } from '@utils'; +import { inject, injectable } from 'inversify'; +import { ActionEnum, BackofficePage } from '@pages/backoffice'; +import { AvailabilityIndexRepository } from './availability-index-repository'; + +@injectable() +@autoWired +export class AvailabilityIndexPage extends BackofficePage { + @inject(AvailabilityIndexRepository) private repository: AvailabilityIndexRepository; + + protected PAGE_URL = '/availability-gui'; + + update = (params: UpdateParams): void => { + const findParams = { query: params.query, expectedCount: 1 }; + + this.find(findParams).then(($merchantRow) => { + if (params.action === ActionEnum.view) { + cy.wrap($merchantRow).find(this.repository.getViewButtonSelector()).should('exist').click({ force: true }); + } + }); + }; + + find = (params: FindParams): Cypress.Chainable => { + const searchSelector = this.repository.getSearchSelector(); + cy.get(searchSelector).clear(); + cy.get(searchSelector).invoke('val', params.query); + cy.get(searchSelector).type('{enter}'); + + this.interceptTable({ + url: '/availability-gui/index/availability-abstract-table**', + expectedCount: params.expectedCount, + }); + + return this.repository.getFirstTableRow(); + }; +} + +interface UpdateParams { + action: ActionEnum; + query: string; +} + +interface FindParams { + query: string; + expectedCount?: number; +} diff --git a/cypress/support/pages/backoffice/availability/index/availability-index-repository.ts b/cypress/support/pages/backoffice/availability/index/availability-index-repository.ts new file mode 100644 index 00000000..a8c26708 --- /dev/null +++ b/cypress/support/pages/backoffice/availability/index/availability-index-repository.ts @@ -0,0 +1,10 @@ +import { autoWired } from '@utils'; +import { injectable } from 'inversify'; + +@injectable() +@autoWired +export class AvailabilityIndexRepository { + getFirstTableRow = (): Cypress.Chainable => cy.get('tbody > :nth-child(1):visible'); + getSearchSelector = (): string => '[type="search"]'; + getViewButtonSelector = (): string => 'a:contains("View")'; +} diff --git a/cypress/support/pages/backoffice/availability/view/availability-view-page.ts b/cypress/support/pages/backoffice/availability/view/availability-view-page.ts new file mode 100644 index 00000000..63dfe69e --- /dev/null +++ b/cypress/support/pages/backoffice/availability/view/availability-view-page.ts @@ -0,0 +1,21 @@ +import { autoWired } from '@utils'; +import { inject, injectable } from 'inversify'; +import { BackofficePage } from '@pages/backoffice'; +import { AvailabilityViewRepository } from './availability-view-repository'; + +@injectable() +@autoWired +export class AvailabilityViewPage extends BackofficePage { + @inject(AvailabilityViewRepository) private repository: AvailabilityViewRepository; + + protected PAGE_URL = '/availability-gui/index/view'; + + editFirstVariant = (): void => { + this.repository.getVariantFirstTableRow().then(($productVariantRow) => { + cy.wrap($productVariantRow) + .find(this.repository.getVariantEditStockButtonSelector()) + .as('editStockVariantButton'); + cy.get('@editStockVariantButton').should('be.visible').click({ force: true }); + }); + }; +} diff --git a/cypress/support/pages/backoffice/availability/view/availability-view-repository.ts b/cypress/support/pages/backoffice/availability/view/availability-view-repository.ts new file mode 100644 index 00000000..32be60d2 --- /dev/null +++ b/cypress/support/pages/backoffice/availability/view/availability-view-repository.ts @@ -0,0 +1,9 @@ +import { autoWired } from '@utils'; +import { injectable } from 'inversify'; + +@injectable() +@autoWired +export class AvailabilityViewRepository { + getVariantFirstTableRow = (): Cypress.Chainable => cy.get('tbody > :nth-child(1):visible'); + getVariantEditStockButtonSelector = (): string => 'a:contains("Edit Stock")'; +} diff --git a/cypress/support/pages/backoffice/backoffice-page.ts b/cypress/support/pages/backoffice/backoffice-page.ts index d5f18a95..d62d054c 100644 --- a/cypress/support/pages/backoffice/backoffice-page.ts +++ b/cypress/support/pages/backoffice/backoffice-page.ts @@ -16,7 +16,7 @@ export class BackofficePage extends AbstractPage { cy.intercept('GET', params.url).as(interceptAlias); cy.wait(`@${interceptAlias}`) .its('response.body.recordsFiltered') - .should((total) => { + .should((total: number) => { const valueToBeAtMost = expectedCount + Cypress.currentRetry; assert.isTrue(total === expectedCount || total >= valueToBeAtMost); }); @@ -31,6 +31,7 @@ export enum ActionEnum { approveAccess, denyAccess, delete, + deny, } interface InterceptGuiTableParams { diff --git a/cypress/support/pages/backoffice/index.ts b/cypress/support/pages/backoffice/index.ts index 2c2f8ec2..830dc902 100644 --- a/cypress/support/pages/backoffice/index.ts +++ b/cypress/support/pages/backoffice/index.ts @@ -21,3 +21,6 @@ export * from './product-management/add/product-management-add-page'; export * from './product-management/edit/product-management-edit-page'; export * from './product-management/list/product-management-list-page'; export * from './product-management/edit/variant/product-management-edit-variant-page'; +export * from './availability/view/availability-view-page'; +export * from './availability/edit/availability-edit-page'; +export * from './availability/index/availability-index-page'; diff --git a/cypress/support/pages/backoffice/merchant/list/merchant-list-page.ts b/cypress/support/pages/backoffice/merchant/list/merchant-list-page.ts index 5486946a..2c9de007 100644 --- a/cypress/support/pages/backoffice/merchant/list/merchant-list-page.ts +++ b/cypress/support/pages/backoffice/merchant/list/merchant-list-page.ts @@ -15,23 +15,32 @@ export class MerchantListPage extends BackofficePage { this.find(findParams).then(($merchantRow) => { if (params.action === ActionEnum.edit) { - cy.wrap($merchantRow).find(this.repository.getEditButtonSelector()).should('exist').click(); + cy.wrap($merchantRow).find(this.repository.getEditButtonSelector()).should('exist').click({ force: true }); } if (params.action === ActionEnum.activate) { - cy.wrap($merchantRow).find(this.repository.getActivateButtonSelector()).should('exist').click(); + cy.wrap($merchantRow).find(this.repository.getActivateButtonSelector()).should('exist').click({ force: true }); } if (params.action === ActionEnum.deactivate) { - cy.wrap($merchantRow).find(this.repository.getDeactivateButtonSelector()).should('exist').click(); + cy.wrap($merchantRow) + .find(this.repository.getDeactivateButtonSelector()) + .should('exist') + .click({ force: true }); } if (params.action === ActionEnum.approveAccess) { - cy.wrap($merchantRow).find(this.repository.getDeactivateButtonSelector()).should('exist').click(); + cy.wrap($merchantRow) + .find(this.repository.getDeactivateButtonSelector()) + .should('exist') + .click({ force: true }); } if (params.action === ActionEnum.denyAccess) { - cy.wrap($merchantRow).find(this.repository.getDeactivateButtonSelector()).should('exist').click(); + cy.wrap($merchantRow) + .find(this.repository.getDeactivateButtonSelector()) + .should('exist') + .click({ force: true }); } }); }; @@ -39,7 +48,8 @@ export class MerchantListPage extends BackofficePage { find = (params: FindParams): Cypress.Chainable => { const searchSelector = this.repository.getSearchSelector(); cy.get(searchSelector).clear(); - cy.get(searchSelector).type(params.query); + cy.get(searchSelector).invoke('val', params.query); + cy.get(searchSelector).type('{enter}'); this.interceptTable({ url: '/merchant-gui/list-merchant/table**', expectedCount: params.expectedCount }); diff --git a/cypress/support/pages/backoffice/merchant/update/merchant-update-page.ts b/cypress/support/pages/backoffice/merchant/update/merchant-update-page.ts index e316433d..c24f4134 100644 --- a/cypress/support/pages/backoffice/merchant/update/merchant-update-page.ts +++ b/cypress/support/pages/backoffice/merchant/update/merchant-update-page.ts @@ -13,7 +13,8 @@ export class MerchantUpdatePage extends BackofficePage { find = (params: FindParams): Cypress.Chainable => { const searchSelector = this.repository.getSearchSelector(); cy.get(searchSelector).clear(); - cy.get(searchSelector).type(params.query); + cy.get(searchSelector).invoke('val', params.query); + cy.get(searchSelector).type('{enter}'); this.interceptTable({ url: '/merchant-user-gui/index/table**', expectedCount: params.expectedCount }); diff --git a/cypress/support/pages/backoffice/product-management/edit/product-management-edit-page.ts b/cypress/support/pages/backoffice/product-management/edit/product-management-edit-page.ts index 26a3b418..34a9a6d9 100644 --- a/cypress/support/pages/backoffice/product-management/edit/product-management-edit-page.ts +++ b/cypress/support/pages/backoffice/product-management/edit/product-management-edit-page.ts @@ -21,7 +21,7 @@ export class ProductManagementEditPage extends BackofficePage { this.repository.getVariantsTab().click(); this.repository.getVariantFirstTableRow().then(($productVariantRow) => { cy.wrap($productVariantRow).find(this.repository.getVariantEditButtonSelector()).as('editVariantButton'); - cy.get('@editVariantButton').click(); + cy.get('@editVariantButton').should('be.visible').click({ force: true }); }); }; } diff --git a/cypress/support/pages/backoffice/product-management/edit/variant/product-management-edit-variant-page.ts b/cypress/support/pages/backoffice/product-management/edit/variant/product-management-edit-variant-page.ts index 47fd8bba..0209eee5 100644 --- a/cypress/support/pages/backoffice/product-management/edit/variant/product-management-edit-variant-page.ts +++ b/cypress/support/pages/backoffice/product-management/edit/variant/product-management-edit-variant-page.ts @@ -11,7 +11,7 @@ export class ProductManagementEditVariantPage extends BackofficePage { protected PAGE_URL = '/product-management/edit/variant'; - activateFirstConcreteProduct = (): void => { + activate = (): void => { this.repository.getActivateButton().click(); this.repository.getSearchableDECheckbox().check(); @@ -23,4 +23,8 @@ export class ProductManagementEditVariantPage extends BackofficePage { this.repository.getSaveButton().click(); }; + + deactivate = (): void => { + this.repository.getDeactivateButton().click(); + }; } diff --git a/cypress/support/pages/backoffice/product-management/edit/variant/product-management-edit-variant-repository.ts b/cypress/support/pages/backoffice/product-management/edit/variant/product-management-edit-variant-repository.ts index a0afa69a..bde89231 100644 --- a/cypress/support/pages/backoffice/product-management/edit/variant/product-management-edit-variant-repository.ts +++ b/cypress/support/pages/backoffice/product-management/edit/variant/product-management-edit-variant-repository.ts @@ -5,6 +5,7 @@ import { injectable } from 'inversify'; @autoWired export class ProductManagementEditVariantRepository { getActivateButton = (): Cypress.Chainable => cy.get('a:contains("Activate")'); + getDeactivateButton = (): Cypress.Chainable => cy.get('a:contains("Deactivate")'); getSearchableDECheckbox = (): Cypress.Chainable => cy.get('#product_concrete_form_edit_general_de_DE_is_searchable'); getEnUsCollapsedBlock = (): Cypress.Chainable => cy.get('#tab-content-general > .panel-body > .collapsed > .ibox-title > .collapse-link > .ibox-tools > .fas'); diff --git a/cypress/support/pages/backoffice/product-management/list/product-management-list-page.ts b/cypress/support/pages/backoffice/product-management/list/product-management-list-page.ts index 21f8407b..307a1b39 100644 --- a/cypress/support/pages/backoffice/product-management/list/product-management-list-page.ts +++ b/cypress/support/pages/backoffice/product-management/list/product-management-list-page.ts @@ -19,13 +19,18 @@ export class ProductManagementListPage extends BackofficePage { cy.wrap($productRow).find(this.repository.getEditButtonSelector()).as('editButton'); cy.get('@editButton').click(); } + if (params.action === ActionEnum.deny) { + cy.wrap($productRow).find(this.repository.getDenyButtonSelector()).as('denyButton'); + cy.get('@denyButton').click(); + } }); }; find = (params: FindParams): Cypress.Chainable => { const searchSelector = this.repository.getSearchSelector(); cy.get(searchSelector).clear(); - cy.get(searchSelector).type(params.query); + cy.get(searchSelector).invoke('val', params.query); + cy.get(searchSelector).type('{enter}'); this.interceptTable({ url: '/product-management/index/table**', expectedCount: params.expectedCount }); diff --git a/cypress/support/pages/backoffice/product-management/list/product-management-list-repository.ts b/cypress/support/pages/backoffice/product-management/list/product-management-list-repository.ts index 7418fd01..b9196bc4 100644 --- a/cypress/support/pages/backoffice/product-management/list/product-management-list-repository.ts +++ b/cypress/support/pages/backoffice/product-management/list/product-management-list-repository.ts @@ -7,4 +7,5 @@ export class ProductManagementListRepository { getFirstTableRow = (): Cypress.Chainable => cy.get('tbody > :nth-child(1):visible'); getSearchSelector = (): string => '[type="search"]'; getEditButtonSelector = (): string => 'a:contains("Edit")'; + getDenyButtonSelector = (): string => 'a:contains("Deny")'; } diff --git a/cypress/support/pages/backoffice/user/index/user-index-page.ts b/cypress/support/pages/backoffice/user/index/user-index-page.ts index 34390bc2..b26cdf29 100644 --- a/cypress/support/pages/backoffice/user/index/user-index-page.ts +++ b/cypress/support/pages/backoffice/user/index/user-index-page.ts @@ -19,19 +19,19 @@ export class UserIndexPage extends BackofficePage { this.find(findParams).then(($userRow) => { if (params.action === ActionEnum.edit) { - cy.wrap($userRow).find(this.repository.getEditButtonSelector()).should('exist').click(); + cy.wrap($userRow).find(this.repository.getEditButtonSelector()).should('exist').click({ force: true }); } if (params.action === ActionEnum.deactivate) { - cy.wrap($userRow).find(this.repository.getDeactivateButtonSelector()).should('exist').click(); + cy.wrap($userRow).find(this.repository.getDeactivateButtonSelector()).should('exist').click({ force: true }); } if (params.action === ActionEnum.activate) { - cy.wrap($userRow).find(this.repository.getActivateButtonSelector()).should('exist').click(); + cy.wrap($userRow).find(this.repository.getActivateButtonSelector()).should('exist').click({ force: true }); } if (params.action === ActionEnum.delete) { - cy.wrap($userRow).find(this.repository.getDeleteButtonSelector()).should('exist').click(); + cy.wrap($userRow).find(this.repository.getDeleteButtonSelector()).should('exist').click({ force: true }); } }); }; @@ -39,7 +39,8 @@ export class UserIndexPage extends BackofficePage { find = (params: FindParams): Cypress.Chainable => { const searchSelector = this.repository.getSearchSelector(); cy.get(searchSelector).clear(); - cy.get(searchSelector).type(params.query); + cy.get(searchSelector).invoke('val', params.query); + cy.get(searchSelector).type('{enter}'); this.interceptTable({ url: '/user/index/table**', expectedCount: params.expectedCount }); diff --git a/cypress/support/pages/mp/agent-dashboard/agent-dashboard-page.ts b/cypress/support/pages/mp/agent-dashboard/agent-dashboard-page.ts index 294d8867..07af5e46 100644 --- a/cypress/support/pages/mp/agent-dashboard/agent-dashboard-page.ts +++ b/cypress/support/pages/mp/agent-dashboard/agent-dashboard-page.ts @@ -26,7 +26,8 @@ export class AgentDashboardPage extends MpPage { find = (params: FindParams): Cypress.Chainable => { const searchSelector = this.repository.getSearchSelector(); cy.get(searchSelector).clear(); - cy.get(searchSelector).type(params.query); + cy.get(searchSelector).type(params.query, { delay: 0 }); + cy.get(searchSelector).type('{enter}'); this.interceptTable({ url: '/agent-dashboard-merchant-portal-gui/merchant-users/table-data**', diff --git a/cypress/support/pages/mp/merchant-relation-requests/merchant-relation-requests-page.ts b/cypress/support/pages/mp/merchant-relation-requests/merchant-relation-requests-page.ts index 71577b40..864d8abc 100644 --- a/cypress/support/pages/mp/merchant-relation-requests/merchant-relation-requests-page.ts +++ b/cypress/support/pages/mp/merchant-relation-requests/merchant-relation-requests-page.ts @@ -14,7 +14,8 @@ export class MerchantRelationRequestsPage extends MpPage { find = (params: FindParams): Cypress.Chainable => { const searchSelector = this.repository.getSearchSelector(); cy.get(searchSelector).clear(); - cy.get(searchSelector).type(params.query); + cy.get(searchSelector).type(params.query, { delay: 0 }); + cy.get(searchSelector).type('{enter}'); this.interceptTable({ url: '/merchant-relation-request-merchant-portal-gui/merchant-relation-requests/table-data**', diff --git a/cypress/support/pages/mp/merchant-relations/merchant-relations-page.ts b/cypress/support/pages/mp/merchant-relations/merchant-relations-page.ts index 032bd362..1808794a 100644 --- a/cypress/support/pages/mp/merchant-relations/merchant-relations-page.ts +++ b/cypress/support/pages/mp/merchant-relations/merchant-relations-page.ts @@ -14,7 +14,8 @@ export class MerchantRelationsPage extends MpPage { find = (params: FindParams): Cypress.Chainable => { const searchSelector = this.repository.getSearchSelector(); cy.get(searchSelector).clear(); - cy.get(searchSelector).type(params.query); + cy.get(searchSelector).type(params.query, { delay: 0 }); + cy.get(searchSelector).type('{enter}'); this.interceptTable({ url: '/merchant-relationship-merchant-portal-gui/merchant-relationship/table-data**', diff --git a/cypress/support/pages/mp/mp-page.ts b/cypress/support/pages/mp/mp-page.ts index 2a0976b5..8938085a 100644 --- a/cypress/support/pages/mp/mp-page.ts +++ b/cypress/support/pages/mp/mp-page.ts @@ -9,14 +9,19 @@ export class MpPage extends AbstractPage { cy.visitMerchantPortal(this.PAGE_URL, options); }; - protected interceptTable = (params: InterceptMpGuiTableParams): void => { + protected interceptTable = (params: InterceptMpGuiTableParams, customFunction?: () => void): void => { const expectedCount = params.expectedCount ?? 1; const interceptAlias = this.faker.string.uuid(); cy.intercept('GET', params.url).as(interceptAlias); + + if (customFunction) { + customFunction(); + } + cy.wait(`@${interceptAlias}`) .its('response.body.total') - .should((total) => { + .should((total: number) => { const valueToBeAtMost = expectedCount + Cypress.currentRetry; assert.isTrue(total === expectedCount || total >= valueToBeAtMost); }); diff --git a/cypress/support/pages/mp/offers/offers-page.ts b/cypress/support/pages/mp/offers/offers-page.ts index 3028822d..fb9e8e45 100644 --- a/cypress/support/pages/mp/offers/offers-page.ts +++ b/cypress/support/pages/mp/offers/offers-page.ts @@ -14,7 +14,8 @@ export class OffersPage extends MpPage { find = (params: FindParams): Cypress.Chainable => { const searchSelector = this.repository.getSearchSelector(); cy.get(searchSelector).clear(); - cy.get(searchSelector).type(params.query); + cy.get(searchSelector).type(params.query, { delay: 0 }); + cy.get(searchSelector).type('{enter}'); this.interceptTable({ url: '/product-offer-merchant-portal-gui/product-offers/table-data**', diff --git a/cypress/support/pages/mp/products/products-page.ts b/cypress/support/pages/mp/products/products-page.ts index f450839e..8134badb 100644 --- a/cypress/support/pages/mp/products/products-page.ts +++ b/cypress/support/pages/mp/products/products-page.ts @@ -14,7 +14,8 @@ export class ProductsPage extends MpPage { find = (params: FindParams): Cypress.Chainable => { const searchSelector = this.repository.getSearchSelector(); cy.get(searchSelector).clear(); - cy.get(searchSelector).type(params.query); + cy.get(searchSelector).type(params.query, { delay: 0 }); + cy.get(searchSelector).type('{enter}'); this.interceptTable({ url: '/product-merchant-portal-gui/products/table-data**', diff --git a/cypress/support/pages/mp/sales/sales-orders-page.ts b/cypress/support/pages/mp/sales/sales-orders-page.ts index c18c6a92..2ce2e4c9 100644 --- a/cypress/support/pages/mp/sales/sales-orders-page.ts +++ b/cypress/support/pages/mp/sales/sales-orders-page.ts @@ -14,12 +14,17 @@ export class SalesOrdersPage extends MpPage { find = (params: FindParams): Cypress.Chainable => { const searchSelector = this.repository.getSearchSelector(); cy.get(searchSelector).clear(); - cy.get(searchSelector).type(params.query); - - this.interceptTable({ - url: '/sales-merchant-portal-gui/orders/table-data**', - expectedCount: params.expectedCount, - }); + cy.get(searchSelector).type(params.query, { delay: 0 }); + + this.interceptTable( + { + url: '/sales-merchant-portal-gui/orders/table-data**', + expectedCount: params.expectedCount, + }, + () => { + cy.get(searchSelector).type('{enter}'); + } + ); return this.repository.getFirstTableRow(); }; diff --git a/cypress/support/pages/mp/variants/variants-page.ts b/cypress/support/pages/mp/variants/variants-page.ts index 42fea47c..5da50528 100644 --- a/cypress/support/pages/mp/variants/variants-page.ts +++ b/cypress/support/pages/mp/variants/variants-page.ts @@ -14,7 +14,8 @@ export class VariantsPage extends MpPage { find = (params: FindParams): Cypress.Chainable => { const searchSelector = this.repository.getSearchSelector(); cy.get(searchSelector).clear(); - cy.get(searchSelector).type(params.query); + cy.get(searchSelector).type(params.query, { delay: 0 }); + cy.get(searchSelector).type('{enter}'); this.interceptTable({ url: '/product-merchant-portal-gui/products-concrete/table-data**', diff --git a/cypress/support/pages/yves/cart/cart-page.ts b/cypress/support/pages/yves/cart/cart-page.ts index 16559d13..f89cb631 100644 --- a/cypress/support/pages/yves/cart/cart-page.ts +++ b/cypress/support/pages/yves/cart/cart-page.ts @@ -89,6 +89,10 @@ export class CartPage extends YvesPage { this.repository.getCustomOrderReferenceInput().type(reference); this.repository.getCustomOrderReferenceSubmitButton().click(); }; + + assertCartName = (name: string): void => { + cy.get('body').contains(name).should('exist'); + }; } interface QuickAddToCartParams { diff --git a/cypress/support/pages/yves/customer/order/order-details-page.ts b/cypress/support/pages/yves/customer/order/order-details-page.ts new file mode 100644 index 00000000..a7cb1048 --- /dev/null +++ b/cypress/support/pages/yves/customer/order/order-details-page.ts @@ -0,0 +1,34 @@ +import { autoWired, REPOSITORIES } from '@utils'; +import { inject, injectable } from 'inversify'; +import { YvesPage } from '@pages/yves'; +import { OrderDetailsRepository } from './order-details-repository'; + +@injectable() +@autoWired +export class OrderDetailsPage extends YvesPage { + @inject(REPOSITORIES.OrderDetailsRepository) private repository: OrderDetailsRepository; + + protected PAGE_URL = '/customer/order/details'; + + reorderAll = (): void => { + this.repository.getReorderAllButton().click(); + }; + + reorderFirstSalesOrderItem = (): void => { + this.repository.getCartReorderItemCheckboxes().first().check({ force: true }); + + this.repository.getReorderSelectedItemsButton().click(); + }; + + getOrderReferenceBlock = (): Cypress.Chainable => { + return this.repository.getOrderReferenceBlock(); + }; + + editOrder = (): void => { + this.repository.getEditOrderButton().click(); + }; + + containsOrderState = (orderState: string): void => { + cy.get('body').contains(orderState).should('exist'); + }; +} diff --git a/cypress/support/pages/yves/customer/order/order-details-repository.ts b/cypress/support/pages/yves/customer/order/order-details-repository.ts new file mode 100644 index 00000000..de775a9a --- /dev/null +++ b/cypress/support/pages/yves/customer/order/order-details-repository.ts @@ -0,0 +1,7 @@ +export interface OrderDetailsRepository { + getReorderAllButton(): Cypress.Chainable; + getOrderReferenceBlock(): Cypress.Chainable; + getReorderSelectedItemsButton(): Cypress.Chainable; + getCartReorderItemCheckboxes(): Cypress.Chainable; + getEditOrderButton(): Cypress.Chainable; +} diff --git a/cypress/support/pages/yves/customer/order/repositories/b2b-mp-order-details-repository.ts b/cypress/support/pages/yves/customer/order/repositories/b2b-mp-order-details-repository.ts new file mode 100644 index 00000000..27d09040 --- /dev/null +++ b/cypress/support/pages/yves/customer/order/repositories/b2b-mp-order-details-repository.ts @@ -0,0 +1,21 @@ +import { injectable } from 'inversify'; +import { OrderDetailsRepository } from '../order-details-repository'; + +@injectable() +export class B2bMpOrderDetailsRepository implements OrderDetailsRepository { + getReorderAllButton(): Cypress.Chainable { + return cy.get('form[name="cartReorderForm"]').eq(1).find('button'); + } + getOrderReferenceBlock(): Cypress.Chainable { + return cy.get('li:contains("Order Id:")').find('strong').invoke('text'); + } + getReorderSelectedItemsButton(): Cypress.Chainable { + return cy.get('.js-cart-reorder-form__trigger'); + } + getCartReorderItemCheckboxes(): Cypress.Chainable { + return cy.get('input[type="checkbox"][name="sales-order-item-ids[]"]'); + } + getEditOrderButton(): Cypress.Chainable { + return cy.get('[data-qa="component remote-form-submit"]').find('button'); + } +} diff --git a/cypress/support/pages/yves/customer/order/repositories/b2b-order-details-repository.ts b/cypress/support/pages/yves/customer/order/repositories/b2b-order-details-repository.ts new file mode 100644 index 00000000..dbc05491 --- /dev/null +++ b/cypress/support/pages/yves/customer/order/repositories/b2b-order-details-repository.ts @@ -0,0 +1,21 @@ +import { injectable } from 'inversify'; +import { OrderDetailsRepository } from '../order-details-repository'; + +@injectable() +export class B2bOrderDetailsRepository implements OrderDetailsRepository { + getReorderAllButton(): Cypress.Chainable { + return cy.get('form[name="cartReorderForm"]').eq(1).find('button'); + } + getOrderReferenceBlock(): Cypress.Chainable { + return cy.get('li:contains("Order Id:")').find('strong').invoke('text'); + } + getReorderSelectedItemsButton(): Cypress.Chainable { + return cy.get('.js-cart-reorder-form__trigger'); + } + getCartReorderItemCheckboxes(): Cypress.Chainable { + return cy.get('input[type="checkbox"][name="sales-order-item-ids[]"]'); + } + getEditOrderButton(): Cypress.Chainable { + return cy.get('[data-qa="component remote-form-submit"]').find('button'); + } +} diff --git a/cypress/support/pages/yves/customer/order/repositories/b2c-mp-order-details-repository.ts b/cypress/support/pages/yves/customer/order/repositories/b2c-mp-order-details-repository.ts new file mode 100644 index 00000000..9ab99f75 --- /dev/null +++ b/cypress/support/pages/yves/customer/order/repositories/b2c-mp-order-details-repository.ts @@ -0,0 +1,21 @@ +import { injectable } from 'inversify'; +import { OrderDetailsRepository } from '../order-details-repository'; + +@injectable() +export class B2cMpOrderDetailsRepository implements OrderDetailsRepository { + getReorderAllButton(): Cypress.Chainable { + return cy.get('form[name="cartReorderForm"]').eq(1).find('button'); + } + getOrderReferenceBlock(): Cypress.Chainable { + return cy.get('li:contains("Order Id:")').find('strong').invoke('text'); + } + getReorderSelectedItemsButton(): Cypress.Chainable { + return cy.get('.js-cart-reorder-form__trigger'); + } + getCartReorderItemCheckboxes(): Cypress.Chainable { + return cy.get('input[type="checkbox"][name="sales-order-item-ids[]"]'); + } + getEditOrderButton(): Cypress.Chainable { + return cy.get('[data-qa="component remote-form-submit"]').find('button'); + } +} diff --git a/cypress/support/pages/yves/customer/order/repositories/b2c-order-details-repository.ts b/cypress/support/pages/yves/customer/order/repositories/b2c-order-details-repository.ts new file mode 100644 index 00000000..056572bc --- /dev/null +++ b/cypress/support/pages/yves/customer/order/repositories/b2c-order-details-repository.ts @@ -0,0 +1,21 @@ +import { injectable } from 'inversify'; +import { OrderDetailsRepository } from '../order-details-repository'; + +@injectable() +export class B2cOrderDetailsRepository implements OrderDetailsRepository { + getReorderAllButton(): Cypress.Chainable { + return cy.get('form[name="cartReorderForm"]').eq(1).find('button'); + } + getOrderReferenceBlock(): Cypress.Chainable { + return cy.get('li:contains("Order Id:")').find('strong').invoke('text'); + } + getReorderSelectedItemsButton(): Cypress.Chainable { + return cy.get('.js-cart-reorder-form__trigger'); + } + getCartReorderItemCheckboxes(): Cypress.Chainable { + return cy.get('input[type="checkbox"][name="sales-order-item-ids[]"]'); + } + getEditOrderButton(): Cypress.Chainable { + return cy.get('[data-qa="component remote-form-submit"]').find('button'); + } +} diff --git a/cypress/support/pages/yves/customer/order/repositories/suite-order-details-repository.ts b/cypress/support/pages/yves/customer/order/repositories/suite-order-details-repository.ts new file mode 100644 index 00000000..a938e6f4 --- /dev/null +++ b/cypress/support/pages/yves/customer/order/repositories/suite-order-details-repository.ts @@ -0,0 +1,21 @@ +import { injectable } from 'inversify'; +import { OrderDetailsRepository } from '../order-details-repository'; + +@injectable() +export class SuiteOrderDetailsRepository implements OrderDetailsRepository { + getReorderAllButton(): Cypress.Chainable { + return cy.get('form[name="cartReorderForm"]').eq(1).find('button'); + } + getOrderReferenceBlock(): Cypress.Chainable { + return cy.get('li:contains("Order Id:")').find('strong').invoke('text'); + } + getReorderSelectedItemsButton(): Cypress.Chainable { + return cy.get('.js-cart-reorder-form__trigger'); + } + getCartReorderItemCheckboxes(): Cypress.Chainable { + return cy.get('input[type="checkbox"][name="sales-order-item-ids[]"]'); + } + getEditOrderButton(): Cypress.Chainable { + return cy.get('[data-qa="component remote-form-submit"]').find('button'); + } +} diff --git a/cypress/support/pages/yves/customer/overview/customer-overview-page.ts b/cypress/support/pages/yves/customer/overview/customer-overview-page.ts index 0398d414..7915f757 100644 --- a/cypress/support/pages/yves/customer/overview/customer-overview-page.ts +++ b/cypress/support/pages/yves/customer/overview/customer-overview-page.ts @@ -11,4 +11,20 @@ export class CustomerOverviewPage extends YvesPage { protected PAGE_URL = '/customer/overview'; getPlacedOrderSuccessMessage = (): string => this.repository.getPlacedOrderSuccessMessage(); + + viewLastPlacedOrder = (): void => { + this.visit(); + this.repository.getLastViewOrderButton().click(); + }; + + viewOrder = (tableRowIndex: number): void => { + this.repository.getViewOrderButton(tableRowIndex).click(); + }; + + assertProductQuantity = (productName: string, quantity: number): void => { + cy.get('body').then(($body) => { + const occurrences = $body.find(this.repository.getOrderedProductSpan(productName)); + expect(occurrences).to.have.length(quantity); + }); + }; } diff --git a/cypress/support/pages/yves/customer/overview/customer-overview-repository.ts b/cypress/support/pages/yves/customer/overview/customer-overview-repository.ts index 88c2785e..d1b260b3 100644 --- a/cypress/support/pages/yves/customer/overview/customer-overview-repository.ts +++ b/cypress/support/pages/yves/customer/overview/customer-overview-repository.ts @@ -1,3 +1,6 @@ export interface CustomerOverviewRepository { getPlacedOrderSuccessMessage(): string; + getLastViewOrderButton(): Cypress.Chainable; + getOrderedProductSpan(productName: string): string; + getViewOrderButton(tableRowIndex: number): Cypress.Chainable; } diff --git a/cypress/support/pages/yves/customer/overview/repositories/b2b-customer-overview-repository.ts b/cypress/support/pages/yves/customer/overview/repositories/b2b-customer-overview-repository.ts index 327c650e..b90aff75 100644 --- a/cypress/support/pages/yves/customer/overview/repositories/b2b-customer-overview-repository.ts +++ b/cypress/support/pages/yves/customer/overview/repositories/b2b-customer-overview-repository.ts @@ -5,4 +5,13 @@ import { CustomerOverviewRepository } from '../customer-overview-repository'; export class B2bCustomerOverviewRepository implements CustomerOverviewRepository { getPlacedOrderSuccessMessage = (): string => 'Your order has been placed successfully. You will get the order confirmation email in a few minutes.'; + getLastViewOrderButton(): Cypress.Chainable { + return cy.get('[data-qa="component order-table"]').find('tr').eq(1).contains('a', 'View Order'); + } + getOrderedProductSpan(productName: string): string { + return `span:contains("${productName}")`; + } + getViewOrderButton(tableRowIndex: number): Cypress.Chainable { + return cy.get('[data-qa="component order-table"]').find('tr').eq(tableRowIndex).contains('a', 'View Order'); + } } diff --git a/cypress/support/pages/yves/customer/overview/repositories/b2b-mp-customer-overview-repository.ts b/cypress/support/pages/yves/customer/overview/repositories/b2b-mp-customer-overview-repository.ts index aa6b4bab..21e15367 100644 --- a/cypress/support/pages/yves/customer/overview/repositories/b2b-mp-customer-overview-repository.ts +++ b/cypress/support/pages/yves/customer/overview/repositories/b2b-mp-customer-overview-repository.ts @@ -5,4 +5,13 @@ import { CustomerOverviewRepository } from '../customer-overview-repository'; export class B2bMpCustomerOverviewRepository implements CustomerOverviewRepository { getPlacedOrderSuccessMessage = (): string => 'Your order has been placed successfully. You will get the order confirmation email in a few minutes.'; + getLastViewOrderButton(): Cypress.Chainable { + return cy.get('[data-qa="component order-table"]').find('tr').eq(1).contains('a', 'View Order'); + } + getOrderedProductSpan(productName: string): string { + return `span:contains("${productName}")`; + } + getViewOrderButton(tableRowIndex: number): Cypress.Chainable { + return cy.get('[data-qa="component order-table"]').find('tr').eq(tableRowIndex).contains('a', 'View Order'); + } } diff --git a/cypress/support/pages/yves/customer/overview/repositories/b2c-customer-overview-repository.ts b/cypress/support/pages/yves/customer/overview/repositories/b2c-customer-overview-repository.ts index 4fca30c3..56b1de6d 100644 --- a/cypress/support/pages/yves/customer/overview/repositories/b2c-customer-overview-repository.ts +++ b/cypress/support/pages/yves/customer/overview/repositories/b2c-customer-overview-repository.ts @@ -5,4 +5,13 @@ import { CustomerOverviewRepository } from '../customer-overview-repository'; export class B2cCustomerOverviewRepository implements CustomerOverviewRepository { getPlacedOrderSuccessMessage = (): string => 'Your order has been placed successfully. You will get the order confirmation email in a few minutes. You can check and track your order in Your Account.'; + getLastViewOrderButton(): Cypress.Chainable { + return cy.get('[data-qa="component order-table"]').find('tr').eq(1).contains('a', 'View Order'); + } + getOrderedProductSpan(productName: string): string { + return `span:contains("${productName}")`; + } + getViewOrderButton(tableRowIndex: number): Cypress.Chainable { + return cy.get('[data-qa="component order-table"]').find('tr').eq(tableRowIndex).contains('a', 'View Order'); + } } diff --git a/cypress/support/pages/yves/customer/overview/repositories/b2c-mp-customer-overview-repository.ts b/cypress/support/pages/yves/customer/overview/repositories/b2c-mp-customer-overview-repository.ts index c8cced90..a22f1455 100644 --- a/cypress/support/pages/yves/customer/overview/repositories/b2c-mp-customer-overview-repository.ts +++ b/cypress/support/pages/yves/customer/overview/repositories/b2c-mp-customer-overview-repository.ts @@ -5,4 +5,13 @@ import { CustomerOverviewRepository } from '../customer-overview-repository'; export class B2cMpCustomerOverviewRepository implements CustomerOverviewRepository { getPlacedOrderSuccessMessage = (): string => 'Your order has been placed successfully. You will get the order confirmation email in a few minutes. You can check and track your order in Your Account.'; + getLastViewOrderButton(): Cypress.Chainable { + return cy.get('[data-qa="component order-table"]').find('tr').eq(1).contains('a', 'View Order'); + } + getOrderedProductSpan(productName: string): string { + return `span:contains("${productName}")`; + } + getViewOrderButton(tableRowIndex: number): Cypress.Chainable { + return cy.get('[data-qa="component order-table"]').find('tr').eq(tableRowIndex).contains('a', 'View Order'); + } } diff --git a/cypress/support/pages/yves/customer/overview/repositories/suite-customer-overview-repository.ts b/cypress/support/pages/yves/customer/overview/repositories/suite-customer-overview-repository.ts index b0313460..8b7c540c 100644 --- a/cypress/support/pages/yves/customer/overview/repositories/suite-customer-overview-repository.ts +++ b/cypress/support/pages/yves/customer/overview/repositories/suite-customer-overview-repository.ts @@ -4,4 +4,13 @@ import { CustomerOverviewRepository } from '../customer-overview-repository'; @injectable() export class SuiteCustomerOverviewRepository implements CustomerOverviewRepository { getPlacedOrderSuccessMessage = (): string => 'Your order has been placed successfully!'; + getLastViewOrderButton(): Cypress.Chainable { + return cy.get('[data-qa="component order-table"]').find('tr').eq(1).contains('a', 'View Order'); + } + getOrderedProductSpan(productName: string): string { + return `span:contains("${productName}")`; + } + getViewOrderButton(tableRowIndex: number): Cypress.Chainable { + return cy.get('[data-qa="component order-table"]').find('tr').eq(tableRowIndex).contains('a', 'View Order'); + } } diff --git a/cypress/support/pages/yves/index.ts b/cypress/support/pages/yves/index.ts index 152c0622..43b97c7a 100644 --- a/cypress/support/pages/yves/index.ts +++ b/cypress/support/pages/yves/index.ts @@ -17,4 +17,5 @@ export * from './company/merchant-relation-request/index/merchant-relation-reque export * from './merchant/merchant-page'; export * from './product/product-page'; export * from './customer/overview/customer-overview-page'; +export * from './customer/order/order-details-page'; export * from './product-comparison/product-comparison-page'; diff --git a/cypress/support/scenarios/backoffice/create-product-scenario.ts b/cypress/support/scenarios/backoffice/create-product-scenario.ts index 2faab3c5..57618fc7 100644 --- a/cypress/support/scenarios/backoffice/create-product-scenario.ts +++ b/cypress/support/scenarios/backoffice/create-product-scenario.ts @@ -25,7 +25,7 @@ export class CreateProductScenario { this.productManagementListPage.update({ query: productAbstract.sku, action: ActionEnum.edit }); this.productManagementEditPage.openFirstVariant(); - this.productManagementEditVariantPage.activateFirstConcreteProduct(); + this.productManagementEditVariantPage.activate(); if (params?.shouldTriggerPublishAndSync) { cy.runCliCommands(['console queue:worker:start --stop-when-empty']); diff --git a/cypress/support/scenarios/backoffice/deactivate-product-scenario.ts b/cypress/support/scenarios/backoffice/deactivate-product-scenario.ts new file mode 100644 index 00000000..781a7df6 --- /dev/null +++ b/cypress/support/scenarios/backoffice/deactivate-product-scenario.ts @@ -0,0 +1,33 @@ +import { + ActionEnum, + ProductManagementEditPage, + ProductManagementEditVariantPage, + ProductManagementListPage, +} from '@pages/backoffice'; +import { autoWired } from '@utils'; +import { inject, injectable } from 'inversify'; + +@injectable() +@autoWired +export class DeactivateProductScenario { + @inject(ProductManagementListPage) private productManagementListPage: ProductManagementListPage; + @inject(ProductManagementEditPage) private productManagementEditPage: ProductManagementEditPage; + @inject(ProductManagementEditVariantPage) private productManagementEditVariantPage: ProductManagementEditVariantPage; + + execute = (params: ExecuteParams): void => { + this.productManagementListPage.visit(); + this.productManagementListPage.update({ query: params.abstractSku, action: ActionEnum.edit }); + this.productManagementEditPage.openFirstVariant(); + + this.productManagementEditVariantPage.deactivate(); + + if (params?.shouldTriggerPublishAndSync) { + cy.runCliCommands(['console queue:worker:start --stop-when-empty']); + } + }; +} + +interface ExecuteParams { + abstractSku: string; + shouldTriggerPublishAndSync?: boolean; +} diff --git a/cypress/support/scenarios/backoffice/deny-product-scenario.ts b/cypress/support/scenarios/backoffice/deny-product-scenario.ts new file mode 100644 index 00000000..77347a6a --- /dev/null +++ b/cypress/support/scenarios/backoffice/deny-product-scenario.ts @@ -0,0 +1,23 @@ +import { ActionEnum, ProductManagementListPage } from '@pages/backoffice'; +import { autoWired } from '@utils'; +import { inject, injectable } from 'inversify'; + +@injectable() +@autoWired +export class DenyProductScenario { + @inject(ProductManagementListPage) private productManagementListPage: ProductManagementListPage; + + execute = (params: ExecuteParams): void => { + this.productManagementListPage.visit(); + this.productManagementListPage.update({ query: params.abstractSku, action: ActionEnum.deny }); + + if (params?.shouldTriggerPublishAndSync) { + cy.runCliCommands(['console queue:worker:start --stop-when-empty']); + } + }; +} + +interface ExecuteParams { + abstractSku: string; + shouldTriggerPublishAndSync?: boolean; +} diff --git a/cypress/support/scenarios/backoffice/index.ts b/cypress/support/scenarios/backoffice/index.ts index be461437..e49595c9 100644 --- a/cypress/support/scenarios/backoffice/index.ts +++ b/cypress/support/scenarios/backoffice/index.ts @@ -1,2 +1,4 @@ export * from './user-login-scenario'; export * from './create-product-scenario'; +export * from './deny-product-scenario'; +export * from './remove-product-stock-scenario'; diff --git a/cypress/support/scenarios/backoffice/remove-product-stock-scenario.ts b/cypress/support/scenarios/backoffice/remove-product-stock-scenario.ts new file mode 100644 index 00000000..214cdc62 --- /dev/null +++ b/cypress/support/scenarios/backoffice/remove-product-stock-scenario.ts @@ -0,0 +1,28 @@ +import { ActionEnum, AvailabilityEditPage, AvailabilityIndexPage, AvailabilityViewPage } from '@pages/backoffice'; +import { autoWired } from '@utils'; +import { inject, injectable } from 'inversify'; + +@injectable() +@autoWired +export class RemoveProductStockScenario { + @inject(AvailabilityIndexPage) private availabilityIndexPage: AvailabilityIndexPage; + @inject(AvailabilityViewPage) private availabilityViewPage: AvailabilityViewPage; + @inject(AvailabilityEditPage) private availabilityEditPage: AvailabilityEditPage; + + execute = (params: ExecuteParams): void => { + this.availabilityIndexPage.visit(); + this.availabilityIndexPage.update({ query: params.abstractSku, action: ActionEnum.view }); + + this.availabilityViewPage.editFirstVariant(); + this.availabilityEditPage.uncheckFirstStock(); + + if (params?.shouldTriggerPublishAndSync) { + cy.runCliCommands(['console queue:worker:start --stop-when-empty']); + } + }; +} + +interface ExecuteParams { + abstractSku: string; + shouldTriggerPublishAndSync?: boolean; +} diff --git a/cypress/support/scenarios/yves/checkout-scenario.ts b/cypress/support/scenarios/yves/checkout-scenario.ts index cf35bfef..6d918e5c 100644 --- a/cypress/support/scenarios/yves/checkout-scenario.ts +++ b/cypress/support/scenarios/yves/checkout-scenario.ts @@ -34,7 +34,7 @@ export class CheckoutScenario { this.checkoutSummaryPage.placeOrder(); if (params?.shouldTriggerOmsInCli) { - cy.runCliCommands(['console oms:check-condition', 'console oms:check-timeout']); + cy.runCliCommands(['sleep 1', 'console oms:check-timeout', 'sleep 1', 'console oms:check-condition']); } }; diff --git a/cypress/support/types/yves/index.ts b/cypress/support/types/yves/index.ts index 7c8e7656..9cec409d 100644 --- a/cypress/support/types/yves/index.ts +++ b/cypress/support/types/yves/index.ts @@ -5,3 +5,5 @@ export * from './merchant-b2b-contract-requests'; export * from './customer-account-management'; export * from './product-comparison'; export * from './product'; +export * from './reorder'; +export * from './order-amendment'; diff --git a/cypress/support/types/yves/order-amendment.ts b/cypress/support/types/yves/order-amendment.ts new file mode 100644 index 00000000..08357057 --- /dev/null +++ b/cypress/support/types/yves/order-amendment.ts @@ -0,0 +1,48 @@ +import { Address, Customer, ProductConcrete, User } from './shared'; + +export interface OrderAmendmentCancelDynamicFixtures { + customer: Customer; + address: Address; + product: ProductConcrete; +} + +export interface OrderAmendmentFinishDynamicFixtures { + customer1: Customer; + address1: Address; + + customer2: Customer; + address2: Address; + + product1: ProductConcrete; + product2: ProductConcrete; +} + +export interface OrderAmendmentStartDynamicFixtures { + rootUser: User; + + customer1: Customer; + address1: Address; + + customer2: Customer; + address2: Address; + + customer3: Customer; + address3: Address; + + customer4: Customer; + address4: Address; + + customer5: Customer; + address5: Address; + + customer6: Customer; + address6: Address; + + product: ProductConcrete; + productInActive: ProductConcrete; + productOutOfStock: ProductConcrete; +} + +export interface OrderAmendmentStaticFixtures { + defaultPassword: string; +} diff --git a/cypress/support/types/yves/reorder.ts b/cypress/support/types/yves/reorder.ts new file mode 100644 index 00000000..d8e243b8 --- /dev/null +++ b/cypress/support/types/yves/reorder.ts @@ -0,0 +1,46 @@ +import { Address, Customer, Merchant, ProductConcrete, ProductOptionValue } from './shared'; + +export interface ReorderConcreteProductsDynamicFixtures { + customer1: Customer; + address1: Address; + + customer2: Customer; + address2: Address; + + customer3: Customer; + address3: Address; + + customer4: Customer; + address4: Address; + + product1: ProductConcrete; + product2: ProductConcrete; + + productOptionValue: ProductOptionValue; +} + +export interface ReorderProductBundlesDynamicFixtures { + customer: Customer; + address: Address; + productBundle: ProductConcrete; +} + +export interface ReorderProductOffersDynamicFixtures { + customer: Customer; + address: Address; + merchant1: Merchant; + merchant2: Merchant; + product1: ProductConcrete; + product2: ProductConcrete; +} + +export interface ReorderRandomWeightProductsDynamicFixtures { + customer: Customer; + address: Address; + productMUnit: ProductConcrete; + productPUnit: ProductConcrete; +} + +export interface ReorderStaticFixtures { + defaultPassword: string; +} diff --git a/cypress/support/types/yves/shared/index.ts b/cypress/support/types/yves/shared/index.ts index e8e040c4..9f14e1fb 100644 --- a/cypress/support/types/yves/shared/index.ts +++ b/cypress/support/types/yves/shared/index.ts @@ -11,3 +11,4 @@ export * from './merchant'; export * from './user'; export * from './merchant-relation-request'; export * from './discount'; +export * from './product-option-value'; diff --git a/cypress/support/types/yves/shared/product-option-value.ts b/cypress/support/types/yves/shared/product-option-value.ts new file mode 100644 index 00000000..7edab4d0 --- /dev/null +++ b/cypress/support/types/yves/shared/product-option-value.ts @@ -0,0 +1,4 @@ +export interface ProductOptionValue { + id_product_option_value: number; + value: string; +} diff --git a/cypress/support/utils/inversify/inversify.config.ts b/cypress/support/utils/inversify/inversify.config.ts index 16a0e41e..af9179a6 100644 --- a/cypress/support/utils/inversify/inversify.config.ts +++ b/cypress/support/utils/inversify/inversify.config.ts @@ -98,6 +98,11 @@ import { B2cProductComparisonRepository } from '../../pages/yves/product-compari import { B2bProductComparisonRepository } from '../../pages/yves/product-comparison/repositories/b2b-product-comparison-repository'; import { B2cMpProductComparisonRepository } from '../../pages/yves/product-comparison/repositories/b2c-mp-product-comparison-repository'; import { B2bMpProductComparisonRepository } from '../../pages/yves/product-comparison/repositories/b2b-mp-product-comparison-repository'; +import { SuiteOrderDetailsRepository } from '../../pages/yves/customer/order/repositories/suite-order-details-repository'; +import { B2cOrderDetailsRepository } from '../../pages/yves/customer/order/repositories/b2c-order-details-repository'; +import { B2bOrderDetailsRepository } from '../../pages/yves/customer/order/repositories/b2b-order-details-repository'; +import { B2cMpOrderDetailsRepository } from '../../pages/yves/customer/order/repositories/b2c-mp-order-details-repository'; +import { B2bMpOrderDetailsRepository } from '../../pages/yves/customer/order/repositories/b2b-mp-order-details-repository'; type BindingsMap = { [K in REPOSITORIES]?: interfaces.Newable }; @@ -120,6 +125,7 @@ const suiteMappings: BindingsMap = { [REPOSITORIES.MerchantRelationRequestIndexRepository]: SuiteMerchantRelationRequestIndexRepository, [REPOSITORIES.MerchantRepository]: SuiteMerchantRepository, [REPOSITORIES.CustomerOverviewRepository]: SuiteCustomerOverviewRepository, + [REPOSITORIES.OrderDetailsRepository]: SuiteOrderDetailsRepository, [REPOSITORIES.ProductComparisonRepository]: SuiteProductComparisonRepository, }; @@ -142,6 +148,7 @@ const b2cMappings: BindingsMap = { [REPOSITORIES.MerchantRelationRequestIndexRepository]: B2cMerchantRelationRequestIndexRepository, [REPOSITORIES.MerchantRepository]: B2cMerchantRepository, [REPOSITORIES.CustomerOverviewRepository]: B2cCustomerOverviewRepository, + [REPOSITORIES.OrderDetailsRepository]: B2cOrderDetailsRepository, [REPOSITORIES.ProductComparisonRepository]: B2cProductComparisonRepository, }; @@ -164,6 +171,7 @@ const b2bMappings: BindingsMap = { [REPOSITORIES.MerchantRelationRequestIndexRepository]: B2bMerchantRelationRequestIndexRepository, [REPOSITORIES.MerchantRepository]: B2bMerchantRepository, [REPOSITORIES.CustomerOverviewRepository]: B2bCustomerOverviewRepository, + [REPOSITORIES.OrderDetailsRepository]: B2bOrderDetailsRepository, [REPOSITORIES.ProductComparisonRepository]: B2bProductComparisonRepository, }; @@ -186,6 +194,7 @@ const b2cMpMappings: BindingsMap = { [REPOSITORIES.MerchantRelationRequestIndexRepository]: B2cMpMerchantRelationRequestIndexRepository, [REPOSITORIES.MerchantRepository]: B2cMpMerchantRepository, [REPOSITORIES.CustomerOverviewRepository]: B2cMpCustomerOverviewRepository, + [REPOSITORIES.OrderDetailsRepository]: B2cMpOrderDetailsRepository, [REPOSITORIES.ProductComparisonRepository]: B2cMpProductComparisonRepository, }; @@ -208,6 +217,7 @@ const b2bMpMappings: BindingsMap = { [REPOSITORIES.MerchantRelationRequestIndexRepository]: B2bMpMerchantRelationRequestIndexRepository, [REPOSITORIES.MerchantRepository]: B2bMpMerchantRepository, [REPOSITORIES.CustomerOverviewRepository]: B2bMpCustomerOverviewRepository, + [REPOSITORIES.OrderDetailsRepository]: B2bMpOrderDetailsRepository, [REPOSITORIES.ProductComparisonRepository]: B2bMpProductComparisonRepository, }; diff --git a/cypress/support/utils/inversify/types.ts b/cypress/support/utils/inversify/types.ts index 330faf0d..9d8474c6 100644 --- a/cypress/support/utils/inversify/types.ts +++ b/cypress/support/utils/inversify/types.ts @@ -18,4 +18,5 @@ export const enum REPOSITORIES { MerchantRepository = 'MerchantRepository', CustomerOverviewRepository = 'CustomerOverviewRepository', ProductComparisonRepository = 'ProductComparisonRepository', + OrderDetailsRepository = 'OrderDetailsRepository', } diff --git a/package-lock.json b/package-lock.json index c16dfca8..7c8b571d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@faker-js/faker": "^8.4.1", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", - "cypress": "^13.13.1", + "cypress": "^13.15.2", "dotenv": "^16.4.5", "eslint": "^8.57.0", "eslint-plugin-cypress": "^2.15.2", @@ -511,10 +511,11 @@ } }, "node_modules/@cypress/request": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.1.tgz", - "integrity": "sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.6.tgz", + "integrity": "sha512-fi0eVdCOtKu5Ed6+E8mYxUF6ZTFJDZvHogCBelM0xVXmrDEkyM22gRArQzq1YcHPm1V47Vf/iAD+WgVdUlJCGg==", "dev": true, + "license": "Apache-2.0", "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -522,16 +523,16 @@ "combined-stream": "~1.0.6", "extend": "~3.0.2", "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "http-signature": "~1.3.6", + "form-data": "~4.0.0", + "http-signature": "~1.4.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", "json-stringify-safe": "~5.0.1", "mime-types": "~2.1.19", "performance-now": "^2.1.0", - "qs": "6.10.4", + "qs": "6.13.0", "safe-buffer": "^5.1.2", - "tough-cookie": "^4.1.3", + "tough-cookie": "^5.0.0", "tunnel-agent": "^0.6.0", "uuid": "^8.3.2" }, @@ -1300,6 +1301,7 @@ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dev": true, + "license": "MIT", "dependencies": { "safer-buffer": "~2.1.0" } @@ -1309,6 +1311,7 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8" } @@ -1332,7 +1335,8 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/at-least-node": { "version": "1.0.0", @@ -1348,15 +1352,17 @@ "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/aws4": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.0.tgz", - "integrity": "sha512-3AungXC4I8kKsS9PuS4JH2nc+0bVY/mjgrephHTIi8fpEeGsTHBUJeosp0Wc1myYMElmD0B3Oc4XL/HVJ4PV2g==", - "dev": true + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", + "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", + "dev": true, + "license": "MIT" }, "node_modules/balanced-match": { "version": "1.0.2", @@ -1389,6 +1395,7 @@ "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "tweetnacl": "^0.14.3" } @@ -1506,6 +1513,7 @@ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -1554,7 +1562,8 @@ "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/chalk": { "version": "4.1.2", @@ -1594,9 +1603,9 @@ } }, "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz", + "integrity": "sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==", "dev": true, "funding": [ { @@ -1604,6 +1613,7 @@ "url": "https://github.com/sponsors/sibiraj-s" } ], + "license": "MIT", "engines": { "node": ">=8" } @@ -1689,6 +1699,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -1731,7 +1742,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cross-spawn": { "version": "7.0.3", @@ -1748,13 +1760,14 @@ } }, "node_modules/cypress": { - "version": "13.13.1", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.13.1.tgz", - "integrity": "sha512-8F9UjL5MDUdgC/S5hr8CGLHbS5gGht5UOV184qc2pFny43fnkoaKxlzH/U6//zmGu/xRTaKimNfjknLT8+UDFg==", + "version": "13.15.2", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.15.2.tgz", + "integrity": "sha512-ARbnUorjcCM3XiPwgHKuqsyr5W9Qn+pIIBPaoilnoBkLdSC2oLQjV1BUpnmc7KR+b7Avah3Ly2RMFnfxr96E/A==", "dev": true, "hasInstallScript": true, + "license": "MIT", "dependencies": { - "@cypress/request": "^3.0.0", + "@cypress/request": "^3.0.6", "@cypress/xvfb": "^1.2.4", "@types/sinonjs__fake-timers": "8.1.1", "@types/sizzle": "^2.3.2", @@ -1765,6 +1778,7 @@ "cachedir": "^2.3.0", "chalk": "^4.1.0", "check-more-types": "^2.24.0", + "ci-info": "^4.0.0", "cli-cursor": "^3.1.0", "cli-table3": "~0.6.1", "commander": "^6.2.1", @@ -1779,7 +1793,6 @@ "figures": "^3.2.0", "fs-extra": "^9.1.0", "getos": "^3.2.1", - "is-ci": "^3.0.1", "is-installed-globally": "~0.4.0", "lazy-ass": "^1.6.0", "listr2": "^3.8.3", @@ -1794,6 +1807,7 @@ "semver": "^7.5.3", "supports-color": "^8.1.1", "tmp": "~0.2.3", + "tree-kill": "1.2.2", "untildify": "^4.0.0", "yauzl": "^2.10.0" }, @@ -1809,6 +1823,7 @@ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" }, @@ -1850,6 +1865,7 @@ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -1867,6 +1883,7 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -1912,6 +1929,7 @@ "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dev": true, + "license": "MIT", "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -1957,6 +1975,7 @@ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", "dev": true, + "license": "MIT", "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -1969,6 +1988,7 @@ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -2216,7 +2236,8 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/extract-zip": { "version": "2.0.1", @@ -2245,7 +2266,8 @@ "dev": true, "engines": [ "node >=0.6.0" - ] + ], + "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", @@ -2419,22 +2441,24 @@ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/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==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", "dev": true, + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", + "combined-stream": "^1.0.8", "mime-types": "^2.1.12" }, "engines": { - "node": ">= 0.12" + "node": ">= 6" } }, "node_modules/fs-extra": { @@ -2463,6 +2487,7 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -2482,6 +2507,7 @@ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -2525,6 +2551,7 @@ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" } @@ -2639,6 +2666,7 @@ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, + "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -2672,6 +2700,7 @@ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" }, @@ -2684,6 +2713,7 @@ "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -2696,6 +2726,7 @@ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -2708,6 +2739,7 @@ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -2716,14 +2748,15 @@ } }, "node_modules/http-signature": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", - "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", + "integrity": "sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==", "dev": true, + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "jsprim": "^2.0.2", - "sshpk": "^1.14.1" + "sshpk": "^1.18.0" }, "engines": { "node": ">=0.10" @@ -2833,18 +2866,6 @@ "integrity": "sha512-i9m8j/7YIv4mDuYXUAcrpKPSaju/CIly9AHK5jvCBeoiM/2KEsuCQTTP+rzSWWpLYWRukdXFSl6ZTk2/uumbiA==", "dev": true }, - "node_modules/is-ci": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", - "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", - "dev": true, - "dependencies": { - "ci-info": "^3.2.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2925,7 +2946,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-unicode-supported": { "version": "0.1.0", @@ -2949,7 +2971,8 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/js-tokens": { "version": "4.0.0", @@ -2974,7 +2997,8 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jsesc": { "version": "2.5.2", @@ -2999,7 +3023,8 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true + "dev": true, + "license": "(AFL-2.1 OR BSD-3-Clause)" }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -3017,7 +3042,8 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/json5": { "version": "2.2.3", @@ -3052,6 +3078,7 @@ "engines": [ "node >=0.6.0" ], + "license": "MIT", "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -3258,6 +3285,7 @@ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -3267,6 +3295,7 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -3328,6 +3357,7 @@ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -3485,7 +3515,8 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/picocolors": { "version": "1.0.1", @@ -3566,12 +3597,6 @@ "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", "dev": true }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -3592,12 +3617,13 @@ } }, "node_modules/qs": { - "version": "6.10.4", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.4.tgz", - "integrity": "sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -3606,12 +3632,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -3647,12 +3667,6 @@ "throttleit": "^1.0.0" } }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true - }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -3757,13 +3771,15 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/semver": { "version": "7.6.2", @@ -3782,6 +3798,7 @@ "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dev": true, + "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -3820,6 +3837,7 @@ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, + "license": "MIT", "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -3876,6 +3894,7 @@ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", "dev": true, + "license": "MIT", "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -3979,6 +3998,26 @@ "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, + "node_modules/tldts": { + "version": "6.1.58", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.58.tgz", + "integrity": "sha512-MQJrJhjHOYGYb8DobR6Y4AdDbd4TYkyQ+KBDVc5ODzs1cbrvPpfN1IemYi9jfipJ/vR1YWvrDli0hg1y19VRoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tldts-core": "^6.1.58" + }, + "bin": { + "tldts": "bin/cli.js" + } + }, + "node_modules/tldts-core": { + "version": "6.1.58", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.58.tgz", + "integrity": "sha512-dR936xmhBm7AeqHIhCWwK765gZ7dFyL+IqLSFAjJbFlUXGMLCb8i2PzlzaOuWBuplBTaBYseSb565nk/ZEM0Bg==", + "dev": true, + "license": "MIT" + }, "node_modules/tmp": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", @@ -4011,27 +4050,26 @@ } }, "node_modules/tough-cookie": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", - "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.0.0.tgz", + "integrity": "sha512-FRKsF7cz96xIIeMZ82ehjC3xW2E+O2+v11udrDYewUbszngYhsGa8z6YUMMzO9QJZzzyd0nGGXnML/TReX6W8Q==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" + "tldts": "^6.1.32" }, "engines": { - "node": ">=6" + "node": ">=16" } }, - "node_modules/tough-cookie/node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true, - "engines": { - "node": ">= 4.0.0" + "license": "MIT", + "bin": { + "tree-kill": "cli.js" } }, "node_modules/ts-api-utils": { @@ -4057,6 +4095,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, + "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" }, @@ -4068,7 +4107,8 @@ "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true + "dev": true, + "license": "Unlicense" }, "node_modules/type-check": { "version": "0.4.0", @@ -4172,21 +4212,12 @@ "punycode": "^2.1.0" } }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dev": true, - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } @@ -4199,6 +4230,7 @@ "engines": [ "node >=0.6.0" ], + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", diff --git a/package.json b/package.json index 33b02523..8a4641fd 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "@faker-js/faker": "^8.4.1", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", - "cypress": "^13.13.1", + "cypress": "^13.15.2", "dotenv": "^16.4.5", "eslint": "^8.57.0", "eslint-plugin-cypress": "^2.15.2",