diff --git a/cypress/e2e/mp/marketplace-order-management/order-creation-dms.cy.ts b/cypress/e2e/mp/marketplace-order-management/order-creation-dms.cy.ts index feb24fd2..4a8dbdb7 100644 --- a/cypress/e2e/mp/marketplace-order-management/order-creation-dms.cy.ts +++ b/cypress/e2e/mp/marketplace-order-management/order-creation-dms.cy.ts @@ -51,7 +51,7 @@ describeDmsSuiteAndMp('order creation dms', { tags: ['@mp', '@marketplace-order- selectStoreScenario.execute(staticFixtures.store.name); }); - it('merchant user should be able close an order from guest', (): void => { + skipB2BIt('merchant user should be able close an order from guest', (): void => { addOneProductToCart(); checkoutMpScenario.execute({ isGuest: true, shouldTriggerOmsInCli: true }); @@ -104,20 +104,16 @@ describeDmsSuiteAndMp('order creation dms', { tags: ['@mp', '@marketplace-order- password: staticFixtures.defaultPassword, }); + if (['b2b-mp'].includes(Cypress.env('repositoryId'))) { + cy.runCliCommands(['console oms:check-condition', 'console oms:check-timeout']); + } + closeOrderFromMerchantPortal(orderReference); closeOrderFromBackoffice(); }); } function closeOrderFromMerchantPortal(orderReference: string): void { - if (!['b2b-mp', 'suite'].includes(Cypress.env('repositoryId'))) { - salesOrdersPage.visit(); - salesOrdersPage.update({ query: orderReference, action: ActionEnum.sendToDistribution }); - - salesOrdersPage.visit(); - salesOrdersPage.update({ query: orderReference, action: ActionEnum.confirmAtCenter }); - } - salesOrdersPage.visit(); salesOrdersPage.update({ query: orderReference, action: ActionEnum.ship }); @@ -163,6 +159,10 @@ describeDmsSuiteAndMp('order creation dms', { tags: ['@mp', '@marketplace-order- }, }); } + + function skipB2BIt(description: string, testFn: () => void): void { + (['b2b-mp'].includes(Cypress.env('repositoryId')) ? it.skip : it)(description, testFn); + } }); function describeDmsSuiteAndMp(title: string, options: { tags: string[] }, fn: () => void): void { diff --git a/cypress/e2e/mp/marketplace-order-management/order-creation.cy.ts b/cypress/e2e/mp/marketplace-order-management/order-creation.cy.ts index f62c12b2..32a40347 100644 --- a/cypress/e2e/mp/marketplace-order-management/order-creation.cy.ts +++ b/cypress/e2e/mp/marketplace-order-management/order-creation.cy.ts @@ -25,7 +25,7 @@ describeSuiteAndMp('order creation', { tags: ['@mp', '@marketplace-order-managem ({ staticFixtures, dynamicFixtures } = Cypress.env()); }); - it('merchant user should be able close an order from guest', (): void => { + skipB2BIt('merchant user should be able close an order from guest', (): void => { addOneProductToCart(); checkoutMpScenario.execute({ isGuest: true, shouldTriggerOmsInCli: true }); @@ -76,20 +76,16 @@ describeSuiteAndMp('order creation', { tags: ['@mp', '@marketplace-order-managem password: staticFixtures.defaultPassword, }); + if (['b2b-mp'].includes(Cypress.env('repositoryId'))) { + cy.runCliCommands(['console oms:check-condition', 'console oms:check-timeout']); + } + closeOrderFromMerchantPortal(orderReference); closeOrderFromBackoffice(); }); } function closeOrderFromMerchantPortal(orderReference: string): void { - if (!['b2b-mp', 'suite'].includes(Cypress.env('repositoryId'))) { - salesOrdersPage.visit(); - salesOrdersPage.update({ query: orderReference, action: ActionEnum.sendToDistribution }); - - salesOrdersPage.visit(); - salesOrdersPage.update({ query: orderReference, action: ActionEnum.confirmAtCenter }); - } - salesOrdersPage.visit(); salesOrdersPage.update({ query: orderReference, action: ActionEnum.ship }); @@ -108,6 +104,10 @@ describeSuiteAndMp('order creation', { tags: ['@mp', '@marketplace-order-managem salesDetailPage.triggerOms({ state: 'Close' }); } + + function skipB2BIt(description: string, testFn: () => void): void { + (['b2b-mp'].includes(Cypress.env('repositoryId')) ? it.skip : it)(description, testFn); + } }); function describeSuiteAndMp(title: string, options: { tags: string[] }, fn: () => void): void { diff --git a/cypress/fixtures/b2b-mp/mp/marketplace-order-management/dynamic-order-creation-dms.json b/cypress/fixtures/b2b-mp/mp/marketplace-order-management/dynamic-order-creation-dms.json new file mode 100644 index 00000000..2dcb85bd --- /dev/null +++ b/cypress/fixtures/b2b-mp/mp/marketplace-order-management/dynamic-order-creation-dms.json @@ -0,0 +1,262 @@ +{ + "data": { + "type": "dynamic-fixtures", + "attributes": { + "synchronize": true, + "operations": [ + { + "type": "transfer", + "name": "LocaleTransfer", + "key": "localeEN", + "arguments": { "id_locale": 66, "locale_name": "en_US" } + }, + { + "type": "transfer", + "name": "LocaleTransfer", + "key": "localeDE", + "arguments": { "id_locale": 46, "locale_name": "de_DE" } + }, + { + "type": "helper", + "name": "haveCountry", + "key": "country" + }, + { + "type": "helper", + "name": "haveUser", + "key": "rootUser", + "arguments": [{ "password": "change123" }] + }, + { + "type": "helper", + "name": "addUserToGroup", + "arguments": ["#rootUser.id_user", 1] + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer", + "arguments": [{ "locale": "#localeEN", "password": "change123" }] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address", + "arguments": [{ "fkCustomer": "#customer.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "helper", + "name": "confirmCustomer", + "key": "confirmedCustomer", + "arguments": ["#customer"] + }, + { + "type": "helper", + "name": "haveCompany", + "key": "company", + "arguments": [{ "isActive": true, "status": "approved" }] + }, + { + "type": "helper", + "name": "haveCompanyBusinessUnit", + "key": "businessUnit", + "arguments": [{ "fkCompany": "#company.id_company" }] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission1", + "arguments": ["AddCartItemPermissionPlugin"] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission2", + "arguments": ["ChangeCartItemPermissionPlugin"] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission3", + "arguments": ["RemoveCartItemPermissionPlugin"] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission4", + "arguments": ["PlaceOrderWithAmountUpToPermissionPlugin"] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission5", + "arguments": ["PlaceOrderPermissionPlugin"] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission6", + "arguments": ["SeeBusinessUnitOrdersPermissionPlugin"] + }, + { + "type": "helper", + "name": "haveCompanyRoleWithPermissions", + "arguments": [ + { "isDefault": true, "fkCompany": "#company.id_company" }, + ["#permission1", "#permission2", "#permission3", "#permission4", "#permission5", "#permission6"] + ] + }, + { + "type": "helper", + "name": "haveCompanyUser", + "key": "companyUser", + "arguments": [ + { + "customer": "#customer", + "fkCustomer": "#customer.id_customer", + "fkCompany": "#company.id_company", + "fkCompanyBusinessUnit": "#businessUnit.id_company_business_unit" + } + ] + }, + { + "type": "builder", + "name": "LocalizedAttributesBuilder", + "key": "localizedAttribute" + }, + { + "type": "transfer", + "name": "StoreTransfer", + "key": "store", + "arguments": { "id_store": 1, "name": "DE" } + }, + { + "type": "array-object", + "key": "stores", + "arguments": ["#store"] + }, + { + "type": "helper", + "name": "haveUser", + "key": "merchantUser", + "arguments": [{ "password": "change123" }] + }, + { + "type": "builder", + "name": "MerchantProfileBuilder", + "key": "merchantProfile" + }, + { + "type": "helper", + "name": "haveMerchant", + "key": "merchant", + "arguments": [ + { + "merchantProfile": "#merchantProfile", + "isActive": true, + "isOpenForRelationRequest": true, + "status": "approved", + "storeRelation": { + "idStores": ["#store.id_store"] + } + } + ] + }, + { + "type": "helper", + "name": "haveUrl", + "key": "merchantUrl1", + "arguments": [ + { + "fkLocale": "#localeEN.id_locale", + "fkResourceMerchant": "#merchant.id_merchant", + "urlPrefix": "/en/merchant/dummy-en-prefix-", + "url": "#merchant.name" + } + ] + }, + { + "type": "helper", + "name": "haveUrl", + "arguments": [ + { + "fkLocale": "#localeDE.id_locale", + "fkResourceMerchant": "#merchant.id_merchant", + "urlPrefix": "/de/merchant/dummy-de-prefix-", + "url": "#merchant.name" + } + ] + }, + { + "type": "helper", + "name": "haveMerchantUserWithAclEntities", + "arguments": ["#merchant", "#merchantUser"] + }, + { + "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": "merchantProduct", + "arguments": [ + {}, + { + "idTaxSet": 1, + "localizedAttributes": [ + { "locale": "#localeEN", "name": "#localizedAttribute.name" }, + { "locale": "#localeDE", "name": "#localizedAttribute.name" } + ] + } + ] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#merchantProduct.id_product_concrete", + "idProductAbstract": "#merchantProduct.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#merchantProduct.abstract_sku", + "skuProduct": "#merchantProduct.sku", + "moneyValue": { "netAmount": 50000, "grossAmount": 50000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStock", + "arguments": [ + { "sku": "#merchantProduct.sku", "isNeverOutOfStock": "1", "fkStock": 1, "stockType": "Warehouse1" } + ] + }, + { + "type": "helper", + "name": "haveMerchantProduct", + "arguments": [ + { + "idProductAbstract": "#merchantProduct.fk_product_abstract", + "idMerchant": "#merchant.id_merchant" + } + ] + } + ] + } + } +} diff --git a/cypress/fixtures/b2b-mp/mp/marketplace-order-management/dynamic-order-creation.json b/cypress/fixtures/b2b-mp/mp/marketplace-order-management/dynamic-order-creation.json new file mode 100644 index 00000000..2dcb85bd --- /dev/null +++ b/cypress/fixtures/b2b-mp/mp/marketplace-order-management/dynamic-order-creation.json @@ -0,0 +1,262 @@ +{ + "data": { + "type": "dynamic-fixtures", + "attributes": { + "synchronize": true, + "operations": [ + { + "type": "transfer", + "name": "LocaleTransfer", + "key": "localeEN", + "arguments": { "id_locale": 66, "locale_name": "en_US" } + }, + { + "type": "transfer", + "name": "LocaleTransfer", + "key": "localeDE", + "arguments": { "id_locale": 46, "locale_name": "de_DE" } + }, + { + "type": "helper", + "name": "haveCountry", + "key": "country" + }, + { + "type": "helper", + "name": "haveUser", + "key": "rootUser", + "arguments": [{ "password": "change123" }] + }, + { + "type": "helper", + "name": "addUserToGroup", + "arguments": ["#rootUser.id_user", 1] + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer", + "arguments": [{ "locale": "#localeEN", "password": "change123" }] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address", + "arguments": [{ "fkCustomer": "#customer.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "helper", + "name": "confirmCustomer", + "key": "confirmedCustomer", + "arguments": ["#customer"] + }, + { + "type": "helper", + "name": "haveCompany", + "key": "company", + "arguments": [{ "isActive": true, "status": "approved" }] + }, + { + "type": "helper", + "name": "haveCompanyBusinessUnit", + "key": "businessUnit", + "arguments": [{ "fkCompany": "#company.id_company" }] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission1", + "arguments": ["AddCartItemPermissionPlugin"] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission2", + "arguments": ["ChangeCartItemPermissionPlugin"] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission3", + "arguments": ["RemoveCartItemPermissionPlugin"] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission4", + "arguments": ["PlaceOrderWithAmountUpToPermissionPlugin"] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission5", + "arguments": ["PlaceOrderPermissionPlugin"] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission6", + "arguments": ["SeeBusinessUnitOrdersPermissionPlugin"] + }, + { + "type": "helper", + "name": "haveCompanyRoleWithPermissions", + "arguments": [ + { "isDefault": true, "fkCompany": "#company.id_company" }, + ["#permission1", "#permission2", "#permission3", "#permission4", "#permission5", "#permission6"] + ] + }, + { + "type": "helper", + "name": "haveCompanyUser", + "key": "companyUser", + "arguments": [ + { + "customer": "#customer", + "fkCustomer": "#customer.id_customer", + "fkCompany": "#company.id_company", + "fkCompanyBusinessUnit": "#businessUnit.id_company_business_unit" + } + ] + }, + { + "type": "builder", + "name": "LocalizedAttributesBuilder", + "key": "localizedAttribute" + }, + { + "type": "transfer", + "name": "StoreTransfer", + "key": "store", + "arguments": { "id_store": 1, "name": "DE" } + }, + { + "type": "array-object", + "key": "stores", + "arguments": ["#store"] + }, + { + "type": "helper", + "name": "haveUser", + "key": "merchantUser", + "arguments": [{ "password": "change123" }] + }, + { + "type": "builder", + "name": "MerchantProfileBuilder", + "key": "merchantProfile" + }, + { + "type": "helper", + "name": "haveMerchant", + "key": "merchant", + "arguments": [ + { + "merchantProfile": "#merchantProfile", + "isActive": true, + "isOpenForRelationRequest": true, + "status": "approved", + "storeRelation": { + "idStores": ["#store.id_store"] + } + } + ] + }, + { + "type": "helper", + "name": "haveUrl", + "key": "merchantUrl1", + "arguments": [ + { + "fkLocale": "#localeEN.id_locale", + "fkResourceMerchant": "#merchant.id_merchant", + "urlPrefix": "/en/merchant/dummy-en-prefix-", + "url": "#merchant.name" + } + ] + }, + { + "type": "helper", + "name": "haveUrl", + "arguments": [ + { + "fkLocale": "#localeDE.id_locale", + "fkResourceMerchant": "#merchant.id_merchant", + "urlPrefix": "/de/merchant/dummy-de-prefix-", + "url": "#merchant.name" + } + ] + }, + { + "type": "helper", + "name": "haveMerchantUserWithAclEntities", + "arguments": ["#merchant", "#merchantUser"] + }, + { + "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": "merchantProduct", + "arguments": [ + {}, + { + "idTaxSet": 1, + "localizedAttributes": [ + { "locale": "#localeEN", "name": "#localizedAttribute.name" }, + { "locale": "#localeDE", "name": "#localizedAttribute.name" } + ] + } + ] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#merchantProduct.id_product_concrete", + "idProductAbstract": "#merchantProduct.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#merchantProduct.abstract_sku", + "skuProduct": "#merchantProduct.sku", + "moneyValue": { "netAmount": 50000, "grossAmount": 50000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStock", + "arguments": [ + { "sku": "#merchantProduct.sku", "isNeverOutOfStock": "1", "fkStock": 1, "stockType": "Warehouse1" } + ] + }, + { + "type": "helper", + "name": "haveMerchantProduct", + "arguments": [ + { + "idProductAbstract": "#merchantProduct.fk_product_abstract", + "idMerchant": "#merchant.id_merchant" + } + ] + } + ] + } + } +} diff --git a/cypress/fixtures/b2b-mp/mp/marketplace-order-management/static-order-creation-dms.json b/cypress/fixtures/b2b-mp/mp/marketplace-order-management/static-order-creation-dms.json new file mode 100644 index 00000000..10ee0ed9 --- /dev/null +++ b/cypress/fixtures/b2b-mp/mp/marketplace-order-management/static-order-creation-dms.json @@ -0,0 +1,16 @@ +{ + "defaultPassword": "change123", + "store": { + "name": "TEST_STORE", + "currency": "EUR", + "locale": "en_US", + "country": "DE", + "timezone": "Europe/Berlin" + }, + "paymentMethods": [ + { + "key": "dummyMarketplacePaymentInvoice", + "name": "Dummy Marketplace Payment" + } + ] +} diff --git a/cypress/fixtures/b2b-mp/mp/marketplace-order-management/static-order-creation.json b/cypress/fixtures/b2b-mp/mp/marketplace-order-management/static-order-creation.json new file mode 100644 index 00000000..ba4339e8 --- /dev/null +++ b/cypress/fixtures/b2b-mp/mp/marketplace-order-management/static-order-creation.json @@ -0,0 +1,3 @@ +{ + "defaultPassword": "change123" +} diff --git a/cypress/fixtures/b2b/backoffice/order-management/dynamic-order-creation-dms.json b/cypress/fixtures/b2b/backoffice/order-management/dynamic-order-creation-dms.json new file mode 100644 index 00000000..9db84a21 --- /dev/null +++ b/cypress/fixtures/b2b/backoffice/order-management/dynamic-order-creation-dms.json @@ -0,0 +1,172 @@ +{ + "data": { + "type": "dynamic-fixtures", + "attributes": { + "synchronize": true, + "operations": [ + { + "type": "transfer", + "name": "StoreTransfer", + "key": "store", + "arguments": { "id_store": 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": "customer", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address", + "arguments": [{ "fkCustomer": "#customer.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "helper", + "name": "confirmCustomer", + "key": "confirmedCustomer", + "arguments": ["#customer"] + }, + { + "type": "helper", + "name": "haveCompany", + "key": "company", + "arguments": [{ "isActive": true, "status": "approved" }] + }, + { + "type": "helper", + "name": "haveCompanyBusinessUnit", + "key": "businessUnit", + "arguments": [{ "fkCompany": "#company.id_company" }] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission1", + "arguments": ["AddCartItemPermissionPlugin"] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission2", + "arguments": ["ChangeCartItemPermissionPlugin"] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission3", + "arguments": ["RemoveCartItemPermissionPlugin"] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission4", + "arguments": ["PlaceOrderWithAmountUpToPermissionPlugin"] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission5", + "arguments": ["PlaceOrderPermissionPlugin"] + }, + { + "type": "helper", + "name": "havePermissionByKey", + "key": "permission6", + "arguments": ["SeeBusinessUnitOrdersPermissionPlugin"] + }, + { + "type": "helper", + "name": "haveCompanyRoleWithPermissions", + "arguments": [ + { "isDefault": true, "fkCompany": "#company.id_company" }, + ["#permission1", "#permission2", "#permission3", "#permission4", "#permission5", "#permission6"] + ] + }, + { + "type": "helper", + "name": "haveCompanyUser", + "key": "companyUser", + "arguments": [ + { + "customer": "#customer", + "fkCustomer": "#customer.id_customer", + "fkCompany": "#company.id_company", + "fkCompanyBusinessUnit": "#businessUnit.id_company_business_unit" + } + ] + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "product", + "arguments": [{}, { "idTaxSet": 1 }] + }, + { + "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": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#product.id_product_concrete", + "idProductAbstract": "#product.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "helper", + "name": "havePriceProduct", + "key": "productWithPrice", + "arguments": [ + { + "skuProductAbstract": "#product.abstract_sku", + "skuProduct": "#product.sku", + "moneyValue": { + "netAmount": 50000, + "grossAmount": 50000 + } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStock", + "arguments": [{ "sku": "#product.sku", "isNeverOutOfStock": "1", "fkStock": 1, "stockType": "Warehouse1" }] + }, + { + "type": "helper", + "name": "haveUser", + "key": "rootUser", + "arguments": [{ "password": "change123" }] + }, + { + "type": "helper", + "name": "addUserToGroup", + "arguments": ["#rootUser.id_user", 1] + } + ] + } + } +} diff --git a/cypress/fixtures/b2b/backoffice/order-management/static-order-creation-dms.json b/cypress/fixtures/b2b/backoffice/order-management/static-order-creation-dms.json new file mode 100644 index 00000000..c195d51c --- /dev/null +++ b/cypress/fixtures/b2b/backoffice/order-management/static-order-creation-dms.json @@ -0,0 +1,16 @@ +{ + "defaultPassword": "change123", + "store": { + "name": "TEST_STORE", + "currency": "EUR", + "locale": "en_US", + "country": "DE", + "timezone": "Europe/Berlin" + }, + "paymentMethods": [ + { + "key": "dummyPaymentInvoice", + "name": "Invoice" + } + ] +} diff --git a/cypress/fixtures/b2c-mp/mp/marketplace-order-management/dynamic-order-creation-dms.json b/cypress/fixtures/b2c-mp/mp/marketplace-order-management/dynamic-order-creation-dms.json new file mode 100644 index 00000000..592bceac --- /dev/null +++ b/cypress/fixtures/b2c-mp/mp/marketplace-order-management/dynamic-order-creation-dms.json @@ -0,0 +1,193 @@ +{ + "data": { + "type": "dynamic-fixtures", + "attributes": { + "synchronize": true, + "operations": [ + { + "type": "transfer", + "name": "LocaleTransfer", + "key": "localeEN", + "arguments": { "id_locale": 66, "locale_name": "en_US" } + }, + { + "type": "transfer", + "name": "LocaleTransfer", + "key": "localeDE", + "arguments": { "id_locale": 46, "locale_name": "de_DE" } + }, + { + "type": "helper", + "name": "haveCountry", + "key": "country" + }, + { + "type": "helper", + "name": "haveUser", + "key": "rootUser", + "arguments": [{ "password": "change123" }] + }, + { + "type": "helper", + "name": "addUserToGroup", + "arguments": ["#rootUser.id_user", 1] + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer", + "arguments": [{ "locale": "#localeEN", "password": "change123" }] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address", + "arguments": [{ "fkCustomer": "#customer.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "helper", + "name": "confirmCustomer", + "key": "confirmedCustomer", + "arguments": ["#customer"] + }, + { + "type": "builder", + "name": "LocalizedAttributesBuilder", + "key": "localizedAttribute" + }, + { + "type": "transfer", + "name": "StoreTransfer", + "key": "store", + "arguments": { "id_store": 1, "name": "DE" } + }, + { + "type": "array-object", + "key": "stores", + "arguments": ["#store"] + }, + { + "type": "helper", + "name": "haveUser", + "key": "merchantUser", + "arguments": [{ "password": "change123" }] + }, + { + "type": "builder", + "name": "MerchantProfileBuilder", + "key": "merchantProfile" + }, + { + "type": "helper", + "name": "haveMerchant", + "key": "merchant", + "arguments": [ + { + "merchantProfile": "#merchantProfile", + "isActive": true, + "isOpenForRelationRequest": true, + "status": "approved", + "storeRelation": { + "idStores": ["#store.id_store"] + } + } + ] + }, + { + "type": "helper", + "name": "haveUrl", + "key": "merchantUrl1", + "arguments": [ + { + "fkLocale": "#localeEN.id_locale", + "fkResourceMerchant": "#merchant.id_merchant", + "urlPrefix": "/en/merchant/dummy-en-prefix-", + "url": "#merchant.name" + } + ] + }, + { + "type": "helper", + "name": "haveUrl", + "arguments": [ + { + "fkLocale": "#localeDE.id_locale", + "fkResourceMerchant": "#merchant.id_merchant", + "urlPrefix": "/de/merchant/dummy-de-prefix-", + "url": "#merchant.name" + } + ] + }, + { + "type": "helper", + "name": "haveMerchantUserWithAclEntities", + "arguments": ["#merchant", "#merchantUser"] + }, + { + "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": "merchantProduct", + "arguments": [ + {}, + { + "idTaxSet": 1, + "localizedAttributes": [ + { "locale": "#localeEN", "name": "#localizedAttribute.name" }, + { "locale": "#localeDE", "name": "#localizedAttribute.name" } + ] + } + ] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#merchantProduct.id_product_concrete", + "idProductAbstract": "#merchantProduct.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#merchantProduct.abstract_sku", + "skuProduct": "#merchantProduct.sku", + "moneyValue": { "netAmount": 50000, "grossAmount": 50000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStock", + "arguments": [ + { "sku": "#merchantProduct.sku", "isNeverOutOfStock": "1", "fkStock": 1, "stockType": "Warehouse1" } + ] + }, + { + "type": "helper", + "name": "haveMerchantProduct", + "arguments": [ + { + "idProductAbstract": "#merchantProduct.fk_product_abstract", + "idMerchant": "#merchant.id_merchant" + } + ] + } + ] + } + } +} diff --git a/cypress/fixtures/b2c-mp/mp/marketplace-order-management/dynamic-order-creation.json b/cypress/fixtures/b2c-mp/mp/marketplace-order-management/dynamic-order-creation.json new file mode 100644 index 00000000..592bceac --- /dev/null +++ b/cypress/fixtures/b2c-mp/mp/marketplace-order-management/dynamic-order-creation.json @@ -0,0 +1,193 @@ +{ + "data": { + "type": "dynamic-fixtures", + "attributes": { + "synchronize": true, + "operations": [ + { + "type": "transfer", + "name": "LocaleTransfer", + "key": "localeEN", + "arguments": { "id_locale": 66, "locale_name": "en_US" } + }, + { + "type": "transfer", + "name": "LocaleTransfer", + "key": "localeDE", + "arguments": { "id_locale": 46, "locale_name": "de_DE" } + }, + { + "type": "helper", + "name": "haveCountry", + "key": "country" + }, + { + "type": "helper", + "name": "haveUser", + "key": "rootUser", + "arguments": [{ "password": "change123" }] + }, + { + "type": "helper", + "name": "addUserToGroup", + "arguments": ["#rootUser.id_user", 1] + }, + { + "type": "helper", + "name": "haveCustomer", + "key": "customer", + "arguments": [{ "locale": "#localeEN", "password": "change123" }] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address", + "arguments": [{ "fkCustomer": "#customer.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "helper", + "name": "confirmCustomer", + "key": "confirmedCustomer", + "arguments": ["#customer"] + }, + { + "type": "builder", + "name": "LocalizedAttributesBuilder", + "key": "localizedAttribute" + }, + { + "type": "transfer", + "name": "StoreTransfer", + "key": "store", + "arguments": { "id_store": 1, "name": "DE" } + }, + { + "type": "array-object", + "key": "stores", + "arguments": ["#store"] + }, + { + "type": "helper", + "name": "haveUser", + "key": "merchantUser", + "arguments": [{ "password": "change123" }] + }, + { + "type": "builder", + "name": "MerchantProfileBuilder", + "key": "merchantProfile" + }, + { + "type": "helper", + "name": "haveMerchant", + "key": "merchant", + "arguments": [ + { + "merchantProfile": "#merchantProfile", + "isActive": true, + "isOpenForRelationRequest": true, + "status": "approved", + "storeRelation": { + "idStores": ["#store.id_store"] + } + } + ] + }, + { + "type": "helper", + "name": "haveUrl", + "key": "merchantUrl1", + "arguments": [ + { + "fkLocale": "#localeEN.id_locale", + "fkResourceMerchant": "#merchant.id_merchant", + "urlPrefix": "/en/merchant/dummy-en-prefix-", + "url": "#merchant.name" + } + ] + }, + { + "type": "helper", + "name": "haveUrl", + "arguments": [ + { + "fkLocale": "#localeDE.id_locale", + "fkResourceMerchant": "#merchant.id_merchant", + "urlPrefix": "/de/merchant/dummy-de-prefix-", + "url": "#merchant.name" + } + ] + }, + { + "type": "helper", + "name": "haveMerchantUserWithAclEntities", + "arguments": ["#merchant", "#merchantUser"] + }, + { + "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": "merchantProduct", + "arguments": [ + {}, + { + "idTaxSet": 1, + "localizedAttributes": [ + { "locale": "#localeEN", "name": "#localizedAttribute.name" }, + { "locale": "#localeDE", "name": "#localizedAttribute.name" } + ] + } + ] + }, + { + "type": "helper", + "name": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#merchantProduct.id_product_concrete", + "idProductAbstract": "#merchantProduct.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "helper", + "name": "havePriceProduct", + "arguments": [ + { + "skuProductAbstract": "#merchantProduct.abstract_sku", + "skuProduct": "#merchantProduct.sku", + "moneyValue": { "netAmount": 50000, "grossAmount": 50000 } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStock", + "arguments": [ + { "sku": "#merchantProduct.sku", "isNeverOutOfStock": "1", "fkStock": 1, "stockType": "Warehouse1" } + ] + }, + { + "type": "helper", + "name": "haveMerchantProduct", + "arguments": [ + { + "idProductAbstract": "#merchantProduct.fk_product_abstract", + "idMerchant": "#merchant.id_merchant" + } + ] + } + ] + } + } +} diff --git a/cypress/fixtures/b2c-mp/mp/marketplace-order-management/static-order-creation-dms.json b/cypress/fixtures/b2c-mp/mp/marketplace-order-management/static-order-creation-dms.json new file mode 100644 index 00000000..10ee0ed9 --- /dev/null +++ b/cypress/fixtures/b2c-mp/mp/marketplace-order-management/static-order-creation-dms.json @@ -0,0 +1,16 @@ +{ + "defaultPassword": "change123", + "store": { + "name": "TEST_STORE", + "currency": "EUR", + "locale": "en_US", + "country": "DE", + "timezone": "Europe/Berlin" + }, + "paymentMethods": [ + { + "key": "dummyMarketplacePaymentInvoice", + "name": "Dummy Marketplace Payment" + } + ] +} diff --git a/cypress/fixtures/b2c-mp/mp/marketplace-order-management/static-order-creation.json b/cypress/fixtures/b2c-mp/mp/marketplace-order-management/static-order-creation.json new file mode 100644 index 00000000..ba4339e8 --- /dev/null +++ b/cypress/fixtures/b2c-mp/mp/marketplace-order-management/static-order-creation.json @@ -0,0 +1,3 @@ +{ + "defaultPassword": "change123" +} diff --git a/cypress/fixtures/b2c/backoffice/order-management/dynamic-order-creation-dms.json b/cypress/fixtures/b2c/backoffice/order-management/dynamic-order-creation-dms.json new file mode 100644 index 00000000..ecda2ee0 --- /dev/null +++ b/cypress/fixtures/b2c/backoffice/order-management/dynamic-order-creation-dms.json @@ -0,0 +1,103 @@ +{ + "data": { + "type": "dynamic-fixtures", + "attributes": { + "synchronize": true, + "operations": [ + { + "type": "transfer", + "name": "StoreTransfer", + "key": "store", + "arguments": { "id_store": 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": "customer", + "arguments": [{ "locale": "#locale", "password": "change123" }] + }, + { + "type": "helper", + "name": "haveCustomerAddress", + "key": "address", + "arguments": [{ "fkCustomer": "#customer.id_customer", "fkCountry": "#country.id_country" }] + }, + { + "type": "helper", + "name": "confirmCustomer", + "key": "confirmedCustomer", + "arguments": ["#customer"] + }, + { + "type": "helper", + "name": "haveFullProduct", + "key": "product", + "arguments": [{}, { "idTaxSet": 1 }] + }, + { + "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": "haveProductImageSet", + "arguments": [ + { + "name": "default", + "idProduct": "#product.id_product_concrete", + "idProductAbstract": "#product.fk_product_abstract", + "productImages": ["#productImage"] + } + ] + }, + { + "type": "helper", + "name": "havePriceProduct", + "key": "productWithPrice", + "arguments": [ + { + "skuProductAbstract": "#product.abstract_sku", + "skuProduct": "#product.sku", + "moneyValue": { + "netAmount": 50000, + "grossAmount": 50000 + } + } + ] + }, + { + "type": "helper", + "name": "haveProductInStock", + "arguments": [{ "sku": "#product.sku", "isNeverOutOfStock": "1", "fkStock": 1, "stockType": "Warehouse1" }] + }, + { + "type": "helper", + "name": "haveUser", + "key": "rootUser", + "arguments": [{ "password": "change123" }] + }, + { + "type": "helper", + "name": "addUserToGroup", + "arguments": ["#rootUser.id_user", 1] + } + ] + } + } +} diff --git a/cypress/fixtures/b2c/backoffice/order-management/static-order-creation-dms.json b/cypress/fixtures/b2c/backoffice/order-management/static-order-creation-dms.json new file mode 100644 index 00000000..c195d51c --- /dev/null +++ b/cypress/fixtures/b2c/backoffice/order-management/static-order-creation-dms.json @@ -0,0 +1,16 @@ +{ + "defaultPassword": "change123", + "store": { + "name": "TEST_STORE", + "currency": "EUR", + "locale": "en_US", + "country": "DE", + "timezone": "Europe/Berlin" + }, + "paymentMethods": [ + { + "key": "dummyPaymentInvoice", + "name": "Invoice" + } + ] +} diff --git a/cypress/support/scenarios/backoffice/setup-default-store-relations-scenario.ts b/cypress/support/scenarios/backoffice/setup-default-store-relations-scenario.ts index 1b689fbe..a1015afe 100644 --- a/cypress/support/scenarios/backoffice/setup-default-store-relations-scenario.ts +++ b/cypress/support/scenarios/backoffice/setup-default-store-relations-scenario.ts @@ -34,7 +34,7 @@ export class SetupDefaultStoreRelationsScenario { paymentMethods: params.paymentMethods, }); - if (['suite'].includes(Cypress.env('repositoryId'))) { + if (['suite', 'b2c-mp'].includes(Cypress.env('repositoryId'))) { this.assignStoreToDefaultShipmentTypesScenario.execute({ store: params.storeName, username: params.rootUser.username,