From 04ee279b66b94c99f5fcdedad85d309427223d02 Mon Sep 17 00:00:00 2001 From: Dmytro Aponasenko Date: Tue, 30 Jun 2015 09:37:50 +0300 Subject: [PATCH 1/8] MTA-2343: Move all test data to repositories --- .../lib/Magento/Mtf/Fixture/DataSource.php | 62 -- dev/tests/functional/phpunit.xml.dist | 4 +- .../Backend/Test/Fixture/GlobalSearch.xml | 11 +- .../Test/Fixture/GlobalSearch/Query.php | 68 +- .../Backend/Test/Fixture/Source/Date.php | 47 +- .../Test/TestCase/GlobalSearchEntityTest.php | 4 +- .../Constraint/AssertBundleInCategory.php | 2 +- .../AssertBundleItemsOnProductPage.php | 11 +- .../Test/Constraint/AssertBundlePriceType.php | 2 +- .../Test/Constraint/AssertBundlePriceView.php | 2 +- .../Constraint/AssertBundleProductForm.php | 8 +- .../Constraint/AssertBundleProductPage.php | 2 +- .../AssertGroupedPriceOnBundleProductPage.php | 2 +- .../Bundle/Test/Fixture/BundleProduct.xml | 290 ++---- .../BundleProduct/BundleSelections.php | 693 +------------- .../Fixture/BundleProduct/CheckoutData.php | 342 ------- .../Test/Fixture/BundleProduct/Price.php | 214 ----- .../Magento/Bundle/Test/Fixture/Cart/Item.php | 36 +- .../Bundle/Test/Repository/BundleProduct.xml | 48 +- .../BundleProduct/BundleSelections.xml | 608 +++++++++++++ .../Repository/BundleProduct/CheckoutData.xml | 331 +++++++ .../Test/Repository/BundleProduct/Price.xml | 137 +++ .../CreateBundleProductEntityTest.xml | 104 +-- .../UpdateBundleProductEntityTest.xml | 165 ++-- .../Test/Constraint/AssertCategoryPage.php | 2 +- .../AssertProductAttributeIsFilterable.php | 4 +- .../AssertProductAttributeIsUnique.php | 2 +- .../AssertProductCompareBlockOnCmsPage.php | 2 +- .../Constraint/AssertProductComparePage.php | 4 +- ...ssertProductTemplateGroupOnProductForm.php | 2 +- .../AssertProductTemplateOnProductForm.php | 2 +- .../Catalog/Test/Fixture/Cart/Item.php | 48 +- .../Test/Fixture/CatalogAttributeSet.xml | 43 +- .../AssignedAttributes.php | 65 +- .../CatalogAttributeSet/SkeletonSet.php | 53 +- .../Test/Fixture/CatalogProductAttribute.xml | 167 +--- .../CatalogProductAttribute/Options.php | 108 --- .../Test/Fixture/CatalogProductSimple.xml | 291 ++---- .../CatalogProductSimple/CheckoutData.php | 216 ----- .../CrossSellProducts.php | 16 - .../CatalogProductSimple/CustomAttribute.php | 57 +- .../CatalogProductSimple/CustomOptions.php | 455 ---------- .../Test/Fixture/CatalogProductSimple/Fpt.php | 87 -- .../GroupPriceOptions.php | 113 --- .../Fixture/CatalogProductSimple/Price.php | 146 --- .../CatalogProductSimple/RelatedProducts.php | 16 - .../CatalogProductSimple/TierPriceOptions.php | 101 --- .../CatalogProductSimple/UpSellProducts.php | 16 - .../Test/Fixture/CatalogProductVirtual.xml | 277 ++---- .../CatalogProductVirtual/CheckoutData.php | 51 -- .../Magento/Catalog/Test/Fixture/Category.xml | 110 +-- .../Fixture/Category/CategoryProducts.php | 66 +- .../Test/Fixture/Category/LandingPage.php | 55 +- .../Test/Fixture/Category/ParentId.php | 57 +- .../AttributeSetId.php | 63 +- .../CategoryIds.php | 63 +- .../Test/Fixture/Product/CustomOptions.php | 98 ++ .../Catalog/Test/Fixture/Product/Price.php | 65 ++ .../RelatedProducts.php} | 75 +- .../TaxClass.php | 66 +- .../Catalog/Test/Fixture/ProductAttribute.php | 204 ----- .../Handler/Curl/CreateProductAttribute.php | 121 --- .../Test/Repository/CatalogAttributeSet.xml | 6 +- .../Repository/CatalogProductAttribute.xml | 6 + .../CatalogProductAttribute/Options.xml | 26 + .../Test/Repository/CatalogProductSimple.xml | 234 +++-- .../CatalogProductSimple/CheckoutData.xml | 140 +++ .../Repository/CatalogProductSimple/Price.xml | 46 + .../Test/Repository/CatalogProductVirtual.xml | 41 +- .../CatalogProductVirtual/CheckoutData.xml | 35 + .../Catalog/Test/Repository/Category.xml | 16 +- .../Test/Repository/Product/CustomOptions.xml | 317 +++++++ .../Catalog/Test/Repository/Product/Fpt.xml | 19 + .../Repository/Product/GroupPriceOptions.xml | 34 + .../Test/Repository/Product/TierPrice.xml | 34 + .../Test/Repository/ProductAttribute.php | 49 - .../Category/CreateCategoryEntityTest.xml | 22 +- .../Category/DeleteCategoryEntityTest.xml | 4 +- .../Category/UpdateCategoryEntityTest.xml | 6 +- .../Product/AbstractCompareProductsTest.php | 4 +- .../AbstractProductPromotedProductsTest.php | 4 +- .../Product/CreateSimpleProductEntityTest.xml | 84 +- .../CreateVirtualProductEntityTest.xml | 81 +- .../Product/DuplicateProductEntityTest.php | 4 +- .../Product/MassProductUpdateTest.xml | 2 +- .../ProductTypeSwitchingOnCreationTest.php | 8 +- .../ProductTypeSwitchingOnUpdateTest.php | 14 +- .../Product/UpdateSimpleProductEntityTest.xml | 30 +- .../UpdateVirtualProductEntityTest.php | 2 +- .../UpdateVirtualProductEntityTest.xml | 52 +- .../CreateAttributeSetEntityTest.xml | 2 +- ...ductAttributeEntityFromProductPageTest.php | 2 +- ...ductAttributeEntityFromProductPageTest.xml | 2 +- .../CreateProductAttributeEntityTest.xml | 22 +- ...AssignedToTemplateProductAttributeTest.xml | 8 +- .../DeleteAttributeSetTest.php | 2 +- .../DeleteAttributeSetTest.xml | 6 +- .../DeleteProductAttributeEntityTest.xml | 4 +- ...UsedInConfigurableProductAttributeTest.xml | 2 +- .../UpdateAttributeSetTest.xml | 4 +- .../UpdateProductAttributeEntityTest.php | 4 +- .../UpdateProductAttributeEntityTest.xml | 10 +- .../AddAttributeToProductTemplateStep.php | 2 +- .../Test/TestStep/CreateProductStep.php | 6 +- .../Test/TestStep/CreateProductsStep.php | 4 +- .../CatalogRule/Test/Fixture/CatalogRule.xml | 82 +- .../Test/Repository/CatalogRule.xml | 14 + ...ApplySeveralCatalogPriceRuleEntityTest.php | 4 +- .../Test/TestCase/CreateCatalogRuleTest.php | 2 +- .../Test/TestCase/CreateCatalogRuleTest.xml | 2 +- .../DeleteCatalogPriceRuleEntityTest.xml | 2 +- .../UpdateCatalogPriceRuleEntityTest.php | 6 +- .../UpdateCatalogPriceRuleEntityTest.xml | 4 +- .../Test/TestStep/CreateCatalogRuleStep.php | 2 +- .../Test/Fixture/CatalogSearchQuery.xml | 55 +- .../Fixture/CatalogSearchQuery/QueryText.php | 50 +- .../TestCase/AdvancedSearchEntityTest.php | 4 +- .../TestCase/AdvancedSearchEntityTest.xml | 52 -- .../TestCase/DeleteSearchTermEntityTest.xml | 2 +- .../MassDeleteSearchTermEntityTest.php | 4 +- .../Constraint/AssertCartItemsOptions.php | 2 +- .../Magento/Checkout/Test/Fixture/Cart.xml | 222 ++--- .../Checkout/Test/Fixture/Cart/Items.php | 61 +- .../DeleteProductFromMiniShoppingCartTest.php | 2 +- ...eProductFromMiniShoppingCartEntityTest.php | 4 +- ...eProductFromMiniShoppingCartEntityTest.xml | 8 +- .../Test/TestCase/UpdateShoppingCartTest.xml | 4 +- .../Constraint/AssertTermAbsentOnCheckout.php | 2 +- .../Test/Constraint/AssertTermOnCheckout.php | 2 +- ...mRequireMessageOnMultishippingCheckout.php | 2 +- .../Test/Fixture/CheckoutAgreement.xml | 46 +- .../Test/Fixture/CheckoutAgreement/Stores.php | 67 +- .../Test/Repository/CheckoutAgreement.xml | 17 +- .../Test/TestCase/CreateTermEntityTest.php | 2 +- .../Test/TestCase/CreateTermEntityTest.xml | 10 +- .../Test/TestCase/DeleteTermEntityTest.php | 2 +- .../Test/TestCase/DeleteTermEntityTest.xml | 2 +- .../Test/TestCase/UpdateTermEntityTest.php | 4 +- .../Test/TestCase/UpdateTermEntityTest.xml | 12 +- .../Block/Adminhtml/Page/Edit/Tab/Content.php | 4 +- .../AssertCmsBlockNotOnCategoryPage.php | 2 +- .../AssertCmsBlockOnCategoryPage.php | 2 +- .../Test/Constraint/AssertCmsPagePreview.php | 2 +- .../app/Magento/Cms/Test/Fixture/CmsBlock.xml | 55 +- .../Cms/Test/Fixture/CmsBlock/Stores.php | 61 +- .../app/Magento/Cms/Test/Fixture/CmsPage.xml | 94 +- .../Cms/Test/Fixture/CmsPage/Content.php | 171 +--- .../Magento/Cms/Test/Repository/CmsBlock.xml | 4 +- .../Cms/Test/Repository/CmsPage/Content.xml | 78 ++ .../TestCase/CreateCmsBlockEntityTest.xml | 4 +- .../Test/TestCase/CreateCmsPageEntityTest.xml | 2 +- .../Test/TestCase/DeleteCmsPageEntityTest.xml | 2 +- .../DeleteCmsPageUrlRewriteEntityTest.xml | 6 +- .../TestCase/UpdateCmsBlockEntityTest.xml | 4 +- .../UpdateCmsPageRewriteEntityTest.xml | 6 +- .../Config/Test/Fixture/ConfigData.xml | 20 +- .../Test/TestStep/SetupConfigurationStep.php | 2 +- .../Test/Fixture/Cart/Item.php | 44 +- .../Test/Fixture/ConfigurableProduct.xml | 304 ++----- .../ConfigurableProduct/CheckoutData.php | 218 ----- .../ConfigurableAttributesData.php | 858 +----------------- .../Test/Repository/ConfigurableProduct.xml | 94 +- .../ConfigurableProduct/CheckoutData.xml | 209 +++++ .../ConfigurableAttributesData.xml | 700 ++++++++++++++ .../CreateConfigurableProductEntityTest.php | 4 +- .../CreateConfigurableProductEntityTest.xml | 26 +- .../UpdateConfigurableProductEntityTest.php | 2 +- .../UpdateConfigurableProductEntityTest.xml | 22 +- .../Test/Fixture/CurrencySymbolEntity.xml | 41 +- .../Test/Repository/CurrencySymbolEntity.xml | 4 + .../AbstractCurrencySymbolEntityTest.php | 2 +- .../ResetCurrencySymbolEntityTest.xml | 2 +- .../AssertCustomerGroupOnCustomerForm.php | 2 +- .../AssertCustomerPasswordChanged.php | 2 +- .../Magento/Customer/Test/Fixture/Address.xml | 111 +-- .../Customer/Test/Fixture/Customer.xml | 126 +-- .../Test/Fixture/Customer/Address.php | 69 +- .../Test/Fixture/Customer/GroupId.php | 66 +- .../Customer/Test/Fixture/CustomerGroup.xml | 25 +- .../Fixture/CustomerGroup/TaxClassIds.php | 53 +- .../Customer/Test/Repository/Address.xml | 13 + .../Customer/Test/Repository/Customer.xml | 38 +- .../Test/Repository/CustomerGroup.xml | 25 +- .../Test/TestCase/AbstractApplyVatIdTest.php | 4 +- .../Customer/Test/TestCase/ApplyVatIdTest.xml | 8 +- .../TestCase/ChangeCustomerPasswordTest.xml | 6 +- .../CreateCustomerBackendEntityTest.xml | 12 +- .../CreateCustomerGroupEntityTest.xml | 6 +- .../TestCase/DeleteCustomerAddressTest.xml | 4 +- .../DeleteCustomerBackendEntityTest.xml | 2 +- .../TestCase/ForgotPasswordOnFrontendTest.xml | 2 +- .../TestCase/MassAssignCustomerGroupTest.xml | 2 +- .../MassDeleteCustomerBackendEntityTest.php | 2 +- .../MassDeleteCustomerBackendEntityTest.xml | 2 +- .../UpdateCustomerBackendEntityTest.xml | 12 +- .../UpdateCustomerGroupEntityTest.xml | 8 +- .../Dhl/Test/TestCase/OnePageCheckoutTest.xml | 6 +- .../Directory/Test/Fixture/CurrencyRate.xml | 16 +- .../Test/Repository/CurrencyRate.xml | 6 + .../Test/TestCase/CreateCurrencyRateTest.php | 2 +- .../Test/TestCase/CreateCurrencyRateTest.xml | 6 +- .../Downloadable/Test/Fixture/Cart/Item.php | 3 +- .../Test/Fixture/DownloadableProduct.xml | 319 ++----- .../DownloadableProduct/CheckoutData.php | 126 --- .../DownloadableProduct/GroupPriceOptions.php | 43 - .../Fixture/DownloadableProduct/Links.php | 250 ----- .../Fixture/DownloadableProduct/Samples.php | 137 --- .../Test/Repository/DownloadableProduct.xml | 56 +- .../DownloadableProduct/CheckoutData.xml | 109 +++ .../Repository/DownloadableProduct/Links.xml | 137 +++ .../DownloadableProduct/Samples.xml | 56 ++ .../CreateDownloadableProductEntityTest.xml | 84 +- .../UpdateDownloadableProductEntityTest.php | 2 +- .../UpdateDownloadableProductEntityTest.xml | 28 +- .../Test/TestCase/OnePageCheckoutTest.xml | 12 +- .../AssertGiftMessageInBackendOrder.php | 6 +- .../AssertGiftMessageInFrontendOrder.php | 4 +- .../AssertGiftMessageInFrontendOrderItems.php | 4 +- .../GiftMessage/Test/Fixture/GiftMessage.xml | 50 +- .../Test/Fixture/GiftMessage/Items.php | 65 +- .../TestCase/CheckoutWithGiftMessagesTest.php | 2 +- .../TestCase/CheckoutWithGiftMessagesTest.xml | 8 +- ...uctAttributeAbsenceForAttributeMapping.php | 2 +- .../Test/Fixture/GoogleShoppingAttribute.xml | 36 +- .../AttributeSetId.php | 65 +- .../Repository/GoogleShoppingAttribute.xml | 2 +- .../Constraint/AssertGroupedProductForm.php | 2 +- .../GroupedProduct/Test/Fixture/Cart/Item.php | 36 +- .../Test/Fixture/GroupedProduct.xml | 231 ++--- .../Fixture/GroupedProduct/Associated.php | 224 +---- .../Fixture/GroupedProduct/CheckoutData.php | 63 -- .../Test/Fixture/GroupedProduct/Price.php | 45 - .../Test/Repository/GroupedProduct.xml | 36 +- .../Repository/GroupedProduct/Associated.xml | 150 +++ .../GroupedProduct/CheckoutData.xml | 44 + .../Test/Repository/GroupedProduct/Price.xml | 22 + .../CreateGroupedProductEntityTest.xml | 266 +++--- .../UpdateGroupedProductEntityTest.xml | 18 +- .../Test/Fixture/ImportExport.xml | 27 +- .../Test/Repository/ImportExport.xml | 15 + .../Magento/Install/Test/Fixture/Install.xml | 8 +- .../Install/Test/TestCase/InstallTest.xml | 12 +- .../Integration/Test/Fixture/Integration.xml | 118 +-- .../Test/Repository/Integration.xml | 6 + .../ActivateIntegrationEntityTest.xml | 2 +- .../Test/TestCase/FilterProductListTest.xml | 4 +- .../Test/Repository/CatalogProductSimple.xml | 14 +- .../Test/Repository/ConfigurableProduct.xml | 10 +- .../Newsletter/Test/Fixture/Template.xml | 67 +- .../ActionNewsletterTemplateEntityTest.php | 2 +- .../ActionNewsletterTemplateEntityTest.xml | 4 +- .../Payment/Test/Fixture/CreditCard.xml | 7 +- .../AssertBestsellerReportResult.php | 2 +- .../AssertNewAccountsReportTotalResult.php | 6 +- .../AssertProductViewsReportTotalResult.php | 2 +- .../Constraint/AssertSearchTermReportForm.php | 6 +- .../AbandonedCartsReportEntityTest.xml | 4 +- .../CustomerReviewReportEntityTest.php | 2 +- .../CustomerReviewReportEntityTest.xml | 6 +- .../LowStockProductsReportEntityTest.xml | 2 +- .../TestCase/NewAccountsReportEntityTest.xml | 8 +- .../ProductReviewReportEntityTest.xml | 2 +- .../ProductsInCartReportEntityTest.xml | 4 +- .../TestCase/SearchTermsReportEntityTest.php | 2 +- .../ViewedProductsReportEntityTest.php | 2 +- .../Magento/Review/Test/Fixture/Rating.xml | 43 +- .../Magento/Review/Test/Fixture/Review.xml | 94 +- .../Review/Test/Fixture/Review/EntityId.php | 64 +- .../Review/Test/Fixture/Review/Ratings.php | 62 +- .../Magento/Review/Test/Repository/Review.php | 6 +- .../Magento/Review/Test/Repository/Review.xml | 26 +- .../CreateProductRatingEntityTest.php | 2 +- .../CreateProductReviewBackendEntityTest.xml | 12 +- .../CreateProductReviewFrontendEntityTest.php | 2 +- .../CreateProductReviewFrontendEntityTest.xml | 6 +- .../DeleteProductRatingEntityTest.php | 2 +- .../DeleteProductRatingEntityTest.xml | 2 +- .../ModerateProductReviewEntityTest.xml | 4 +- ...teProductReviewEntityOnProductPageTest.php | 4 +- .../UpdateProductReviewEntityTest.xml | 2 +- .../AssertOrderButtonsUnavailable.php | 6 +- .../Sales/Test/Fixture/OrderInjectable.xml | 806 ++++------------ .../OrderInjectable/BillingAddressId.php | 11 +- .../Fixture/OrderInjectable/CouponCode.php | 4 +- .../Fixture/OrderInjectable/CustomerId.php | 4 +- .../Test/Fixture/OrderInjectable/EntityId.php | 11 +- .../Test/Fixture/OrderInjectable/Price.php | 74 -- .../Test/Fixture/OrderInjectable/StoreId.php | 2 +- .../Sales/Test/Fixture/OrderStatus.xml | 32 +- .../Sales/Test/Repository/OrderInjectable.xml | 62 +- .../Test/Repository/OrderInjectable/Price.xml | 37 + .../TestCase/AssignCustomOrderStatusTest.php | 2 +- .../Test/TestCase/CancelCreatedOrderTest.xml | 2 +- .../TestCase/CreateCreditMemoEntityTest.php | 2 +- .../TestCase/CreateCreditMemoEntityTest.xml | 8 +- .../Test/TestCase/CreateInvoiceEntityTest.php | 2 +- .../Test/TestCase/CreateInvoiceEntityTest.xml | 8 +- .../Test/TestCase/CreateOrderBackendTest.php | 6 +- .../Test/TestCase/CreateOrderBackendTest.xml | 28 +- .../Test/TestCase/HoldCreatedOrderTest.xml | 2 +- .../Test/TestCase/MassOrdersUpdateTest.php | 4 +- ...MoveLastOrderedProductsOnOrderPageTest.xml | 4 +- ...eRecentlyViewedProductsOnOrderPageTest.php | 2 +- .../TestCase/PrintOrderFrontendGuestTest.php | 2 +- .../TestCase/PrintOrderFrontendGuestTest.xml | 4 +- .../Test/TestCase/ReorderOrderEntityTest.xml | 6 +- .../UnassignCustomOrderStatusTest.xml | 2 +- .../TestCase/UpdateCustomOrderStatusTest.xml | 4 +- .../SalesRule/Test/Fixture/SalesRule.xml | 96 +- .../SalesRule/Test/Repository/SalesRule.xml | 17 + .../TestCase/CreateSalesRuleEntityTest.php | 6 +- .../TestCase/DeleteSalesRuleEntityTest.xml | 6 +- .../TestCase/UpdateSalesRuleEntityTest.php | 2 +- .../TestCase/UpdateSalesRuleEntityTest.xml | 2 +- .../Test/TestStep/CreateSalesRuleStep.php | 2 +- .../TestCase/CreateShipmentEntityTest.php | 2 +- .../TestCase/CreateShipmentEntityTest.xml | 4 +- .../Magento/Sitemap/Test/Fixture/Sitemap.xml | 39 +- .../Test/TestCase/DeleteSitemapEntityTest.xml | 2 +- .../app/Magento/Store/Test/Fixture/Store.xml | 48 +- .../Store/Test/Fixture/Store/GroupId.php | 65 +- .../Magento/Store/Test/Fixture/StoreGroup.xml | 42 +- .../Test/Fixture/StoreGroup/CategoryId.php | 63 +- .../Test/Fixture/StoreGroup/WebsiteId.php | 63 +- .../Magento/Store/Test/Fixture/Website.xml | 39 +- .../Magento/Store/Test/Repository/Store.xml | 8 +- .../Store/Test/Repository/StoreGroup.xml | 8 +- .../Magento/Store/Test/Repository/Website.xml | 6 + .../Test/TestCase/CreateStoreEntityTest.xml | 8 +- .../TestCase/CreateStoreGroupEntityTest.xml | 8 +- .../Test/TestCase/DeleteStoreEntityTest.php | 2 +- .../Test/TestCase/DeleteStoreEntityTest.xml | 4 +- .../TestCase/DeleteStoreGroupEntityTest.xml | 4 +- .../Test/TestCase/DeleteWebsiteEntityTest.xml | 4 +- .../Test/TestCase/UpdateStoreEntityTest.xml | 4 +- .../TestCase/UpdateStoreGroupEntityTest.xml | 12 +- .../Test/TestCase/UpdateWebsiteEntityTest.xml | 2 +- ...tractAssertTaxRuleIsAppliedToAllPrices.php | 2 +- .../Test/Constraint/AssertTaxRuleApplying.php | 2 +- .../app/Magento/Tax/Test/Fixture/TaxClass.xml | 28 +- .../app/Magento/Tax/Test/Fixture/TaxRate.xml | 57 +- .../app/Magento/Tax/Test/Fixture/TaxRule.xml | 46 +- .../Tax/Test/Fixture/TaxRule/TaxClass.php | 10 +- .../Tax/Test/Fixture/TaxRule/TaxRate.php | 10 +- .../Magento/Tax/Test/Repository/TaxClass.xml | 4 + .../Magento/Tax/Test/Repository/TaxRate.xml | 8 + .../Magento/Tax/Test/Repository/TaxRule.xml | 43 +- .../TestCase/ApplyTaxBasedOnVatIdTest.xml | 12 +- .../Test/TestCase/CreateTaxRateEntityTest.php | 2 +- .../Test/TestCase/CreateTaxRuleEntityTest.php | 2 +- .../Test/TestCase/CreateTaxRuleEntityTest.xml | 58 +- .../Test/TestCase/DeleteTaxRateEntityTest.xml | 2 +- .../Test/TestCase/DeleteTaxRuleEntityTest.xml | 2 +- .../Tax/Test/TestCase/TaxCalculationTest.xml | 20 +- .../Test/TestCase/TaxWithCrossBorderTest.php | 4 +- .../Test/TestCase/TaxWithCrossBorderTest.xml | 14 +- .../Test/TestCase/UpdateTaxRateEntityTest.xml | 12 +- .../Test/TestCase/UpdateTaxRuleEntityTest.php | 4 +- .../Test/TestCase/UpdateTaxRuleEntityTest.xml | 40 +- .../Tax/Test/TestStep/CreateTaxRuleStep.php | 2 +- .../Ups/Test/TestCase/OnePageCheckoutTest.xml | 10 +- .../UrlRewrite/Test/Fixture/UrlRewrite.xml | 38 +- .../Test/Fixture/UrlRewrite/StoreId.php | 56 +- .../Test/Fixture/UrlRewrite/TargetPath.php | 64 +- .../CreateCategoryRewriteEntityTest.php | 2 +- .../CreateProductUrlRewriteEntityTest.php | 2 +- .../CreateProductUrlRewriteEntityTest.xml | 8 +- .../DeleteCustomUrlRewriteEntityTest.xml | 2 +- .../DeleteProductUrlRewriteEntityTest.xml | 2 +- .../UpdateCategoryUrlRewriteEntityTest.php | 6 +- .../UpdateCategoryUrlRewriteEntityTest.xml | 16 +- .../UpdateCustomUrlRewriteEntityTest.xml | 4 +- .../UpdateProductUrlRewriteEntityTest.php | 4 +- .../app/Magento/User/Test/Fixture/Role.xml | 53 +- .../User/Test/Fixture/Role/InRoleUsers.php | 61 +- .../app/Magento/User/Test/Fixture/User.xml | 93 +- .../Magento/User/Test/Fixture/User/RoleId.php | 52 +- .../app/Magento/User/Test/Repository/User.xml | 2 +- .../TestCase/CreateAdminUserEntityTest.xml | 8 +- .../TestCase/DeleteAdminUserEntityTest.php | 2 +- .../TestCase/DeleteUserRoleEntityTest.php | 2 +- ...lAccessTokensForAdminWithoutTokensTest.xml | 2 +- .../TestCase/UpdateAdminUserEntityTest.xml | 4 +- .../UpdateAdminUserRoleEntityTest.xml | 6 +- .../Test/TestCase/OnePageCheckoutTest.xml | 10 +- .../Constraint/AssertCustomVariableInPage.php | 2 +- .../Variable/Test/Fixture/SystemVariable.xml | 50 +- .../Test/Repository/SystemVariable.xml | 7 + .../UpdateCustomVariableEntityTest.php | 2 +- .../Test/TestCase/CreateTaxWithFptTest.php | 8 +- .../AddProductToWishlistEntityTest.php | 2 +- ...ProductInCustomerWishlistOnBackendTest.php | 2 +- 392 files changed, 6695 insertions(+), 11815 deletions(-) delete mode 100644 dev/tests/functional/lib/Magento/Mtf/Fixture/DataSource.php delete mode 100644 dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/CheckoutData.php delete mode 100644 dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/Price.php create mode 100644 dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/BundleSelections.xml create mode 100644 dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/CheckoutData.xml create mode 100644 dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/Price.xml delete mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute/Options.php delete mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php delete mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CrossSellProducts.php delete mode 100755 dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CustomOptions.php delete mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/Fpt.php delete mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/GroupPriceOptions.php delete mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/Price.php delete mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/RelatedProducts.php delete mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TierPriceOptions.php delete mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/UpSellProducts.php delete mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual/CheckoutData.php rename dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/{CatalogProductSimple => Product}/AttributeSetId.php (56%) rename dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/{CatalogProductSimple => Product}/CategoryIds.php (63%) mode change 100755 => 100644 create mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/CustomOptions.php create mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/Price.php rename dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/{CatalogProductSimple/AbstractRelatedProducts.php => Product/RelatedProducts.php} (52%) rename dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/{CatalogProductSimple => Product}/TaxClass.php (72%) delete mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/ProductAttribute.php delete mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProductAttribute.php create mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductAttribute/Options.xml create mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple/CheckoutData.xml create mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple/Price.xml create mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual/CheckoutData.xml create mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/CustomOptions.xml create mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/Fpt.xml create mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/GroupPriceOptions.xml create mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/TierPrice.xml delete mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/ProductAttribute.php create mode 100644 dev/tests/functional/tests/app/Magento/Cms/Test/Repository/CmsPage/Content.xml delete mode 100644 dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct/CheckoutData.php create mode 100644 dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/CheckoutData.xml create mode 100644 dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/ConfigurableAttributesData.xml delete mode 100644 dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/CheckoutData.php delete mode 100644 dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/GroupPriceOptions.php delete mode 100644 dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/Links.php delete mode 100644 dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/Samples.php create mode 100644 dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/CheckoutData.xml create mode 100644 dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/Links.xml create mode 100644 dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/Samples.xml delete mode 100644 dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct/CheckoutData.php delete mode 100644 dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct/Price.php create mode 100644 dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct/Associated.xml create mode 100644 dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct/CheckoutData.xml create mode 100644 dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct/Price.xml create mode 100644 dev/tests/functional/tests/app/Magento/ImportExport/Test/Repository/ImportExport.xml delete mode 100644 dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/Price.php create mode 100644 dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable/Price.xml diff --git a/dev/tests/functional/lib/Magento/Mtf/Fixture/DataSource.php b/dev/tests/functional/lib/Magento/Mtf/Fixture/DataSource.php deleted file mode 100644 index abd0c0b1627fc..0000000000000 --- a/dev/tests/functional/lib/Magento/Mtf/Fixture/DataSource.php +++ /dev/null @@ -1,62 +0,0 @@ -data; - } - - /** - * Return data set configuration settings. - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } -} diff --git a/dev/tests/functional/phpunit.xml.dist b/dev/tests/functional/phpunit.xml.dist index a88d4b922b643..ec1748e20b135 100755 --- a/dev/tests/functional/phpunit.xml.dist +++ b/dev/tests/functional/phpunit.xml.dist @@ -29,8 +29,8 @@ - - + + diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.xml b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.xml index 7b1c3f2aeac1d..f5831a6ba958a 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.xml +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.xml @@ -6,10 +6,9 @@ */ --> - - - catalogProductSimple::default::name - - - + + + diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch/Query.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch/Query.php index 3f14768fb4511..3a4fd33ceba98 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch/Query.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch/Query.php @@ -6,40 +6,23 @@ namespace Magento\Backend\Test\Fixture\GlobalSearch; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Fixture\InjectableFixture; /** - * Class Query - * Global Search query data provider + * Global Search query data provider. */ -class Query implements FixtureInterface +class Query extends DataSource { /** - * Prepared dataSet data - * - * @var array - */ - protected $data; - - /** - * Data set configuration settings - * - * @var array - */ - protected $params; - - /** - * Data source entity + * Data source entity. * * @var InjectableFixture */ protected $entity = null; /** - * Constructor - * * @constructor * @param FixtureFactory $fixtureFactory * @param string $data @@ -54,8 +37,8 @@ public function __construct(FixtureFactory $fixtureFactory, $data, array $params $this->data = $explodedData[0]; break; case 3: - list($fixture, $dataSet, $field) = $explodedData; - $entity = $fixtureFactory->createByCode($fixture, ['dataSet' => $dataSet]); + list($fixture, $dataset, $field) = $explodedData; + $entity = $fixtureFactory->createByCode($fixture, ['dataset' => $dataset]); if (!$entity->hasData('id')) { $entity->persist(); } @@ -63,8 +46,8 @@ public function __construct(FixtureFactory $fixtureFactory, $data, array $params $this->entity = $entity; break; case 4: - list($fixture, $dataSet, $source, $field) = $explodedData; - $entity = $fixtureFactory->createByCode($fixture, ['dataSet' => $dataSet]); + list($fixture, $dataset, $source, $field) = $explodedData; + $entity = $fixtureFactory->createByCode($fixture, ['dataset' => $dataset]); if (!$entity->hasData('id')) { $entity->persist(); } @@ -76,30 +59,7 @@ public function __construct(FixtureFactory $fixtureFactory, $data, array $params } /** - * Persist order products - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Get entity for global search + * Get entity for global search. * * @return InjectableFixture */ @@ -107,14 +67,4 @@ public function getEntity() { return $this->entity; } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - return $this->params; - } } diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Source/Date.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Source/Date.php index 2b5d6e994d403..5a9141b524060 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Source/Date.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/Source/Date.php @@ -6,24 +6,18 @@ namespace Magento\Backend\Test\Fixture\Source; -use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Fixture\DataSource; /** - * Class Date + * Class Date. * * Data keys: * - pattern (Format a local time/date with delta, e.g. 'm-d-Y -3 days' = current day - 3 days) */ -class Date implements FixtureInterface +class Date extends DataSource { /** - * Date for fill on form - * - * @var string - */ - protected $data; - - /** + * @constructor * @param array $params * @param array $data * @throws \Exception @@ -48,37 +42,4 @@ public function __construct(array $params, array $data = []) $this->data = $date; } } - - /** - * Persists prepared data into application - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - return $this->params; - } } diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/GlobalSearchEntityTest.php b/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/GlobalSearchEntityTest.php index 9624a9398b6ac..836103161525e 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/GlobalSearchEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/GlobalSearchEntityTest.php @@ -19,7 +19,7 @@ * Steps: * 1. Login to backend * 2. Click on Search button on the top of page - * 3. Fill in data according dataSet + * 3. Fill in data according dataset * 4. Perform assertions * * @group Search_Core_(MX) @@ -58,7 +58,7 @@ public function __inject(Dashboard $dashboard) */ public function test(GlobalSearch $search) { - //Steps: + // Steps: $this->dashboard->open(); $this->dashboard->getAdminPanelHeader()->search($search->getQuery()); } diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleInCategory.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleInCategory.php index 30a4b7747c40e..a70183ca9d5dd 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleInCategory.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleInCategory.php @@ -27,7 +27,7 @@ class AssertBundleInCategory extends AssertProductInCategory protected function assertPrice(FixtureInterface $bundle, CatalogCategoryView $catalogCategoryView) { /** @var BundleProduct $bundle */ - $priceData = $bundle->getDataFieldConfig('price')['source']->getPreset(); + $priceData = $bundle->getDataFieldConfig('price')['source']->getPriceData(); //Price from/to verification $priceBlock = $catalogCategoryView->getListProductBlock()->getProductItem($bundle)->getPriceBlock(); diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleItemsOnProductPage.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleItemsOnProductPage.php index 143320dbbba2d..d0e6e7a7f2f69 100755 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleItemsOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleItemsOnProductPage.php @@ -12,13 +12,12 @@ use Magento\Mtf\Constraint\AbstractAssertForm; /** - * Class AssertBundleItemsOnProductPage - * Assert that displayed product bundle items data on product page equals passed from fixture preset + * Assert that displayed product bundle items data on product page equals passed from fixture */ class AssertBundleItemsOnProductPage extends AbstractAssertForm { /** - * Assert that displayed product bundle items data on product page equals passed from fixture preset + * Assert that displayed product bundle items data on product page equals passed from fixture. * * @param CatalogProductView $catalogProductView * @param BundleProduct $product @@ -48,7 +47,7 @@ public function processAssert( } /** - * Prepare bundle options + * Prepare bundle options. * * @param BundleProduct $product * @return array @@ -89,12 +88,12 @@ protected function prepareBundleOptions(BundleProduct $product) } /** - * Return Text if displayed on frontend equals with fixture + * Return Text if displayed on frontend equals with fixture. * * @return string */ public function toString() { - return 'Bundle options data on product page equals to passed from fixture preset.'; + return 'Bundle options data on product page equals to passed from fixture dataset.'; } } diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceType.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceType.php index 77c2e21ce5831..a4346357991c5 100755 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceType.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceType.php @@ -112,7 +112,7 @@ protected function assertPrice( 'Bundle item ' . ($index + 1) . ' options on frontend don\'t equal to fixture.' ); } - $sumOptionsPrice = $product->getDataFieldConfig('price')['source']->getPreset()['cart_price']; + $sumOptionsPrice = $product->getDataFieldConfig('price')['source']->getPriceData()['cart_price']; $subTotal = number_format($cartItem->getPrice(), 2); \PHPUnit_Framework_Assert::assertEquals( diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceView.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceView.php index e5323013d26b5..3a714a0115e86 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceView.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundlePriceView.php @@ -45,7 +45,7 @@ public function processAssert( */ protected function assertPrice(BundleProduct $product, CatalogProductView $catalogProductView) { - $priceData = $product->getDataFieldConfig('price')['source']->getPreset(); + $priceData = $product->getDataFieldConfig('price')['source']->getPriceData(); $priceView = $product->getPriceView(); $priceBlock = $catalogProductView->getViewBlock()->getPriceBlock(); diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductForm.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductForm.php index 38ab1c7f295ba..a1f9b3e23a4f0 100755 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductForm.php @@ -9,12 +9,12 @@ use Magento\Catalog\Test\Constraint\AssertProductForm; /** - * Class AssertBundleProductForm + * Assert bundle product form. */ class AssertBundleProductForm extends AssertProductForm { /** - * Formatting options for array values + * Formatting options for array values. * * @var array */ @@ -28,7 +28,7 @@ class AssertBundleProductForm extends AssertProductForm ]; /** - * Prepares fixture data for comparison + * Prepares fixture data for comparison. * * @param array $data * @param array $sortFields [optional] @@ -44,7 +44,7 @@ protected function prepareFixtureData(array $data, array $sortFields = []) } /** - * Prepare Bundle Options array from preset + * Prepare Bundle Options array from dataset. * * @param array $bundleSelections * @return array diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductPage.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductPage.php index e6d1d24ff1e69..1ccbfd702f4eb 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductPage.php @@ -22,7 +22,7 @@ class AssertBundleProductPage extends AssertProductPage */ protected function verifyPrice() { - $priceData = $this->product->getDataFieldConfig('price')['source']->getPreset(); + $priceData = $this->product->getDataFieldConfig('price')['source']->getPriceData(); $priceView = $this->product->getPriceView(); $priceBlock = $this->productView->getPriceBlock(); diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertGroupedPriceOnBundleProductPage.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertGroupedPriceOnBundleProductPage.php index da18ba61b486e..7d721ba3a304e 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertGroupedPriceOnBundleProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertGroupedPriceOnBundleProductPage.php @@ -29,7 +29,7 @@ protected function getGroupedPrice(View $view, FixtureInterface $product) 'price_regular_price' => $view->getPriceBlock()->getPrice(), 'price_from' => $view->getPriceBlock()->getPriceFrom(), ], - 'fixture' => $product->getDataFieldConfig('price')['source']->getPreset()['price_from'], + 'fixture' => $product->getDataFieldConfig('price')['source']->getPriceData()['price_from'], ]; $groupPrice['onPage'] = isset($groupPrice['onPage']['price_regular_price']) diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.xml index b9f96e1cb55a7..2cff47a580a63 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.xml +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.xml @@ -6,204 +6,94 @@ */ --> - - - BundleProduct %isolation% - Dynamic - Dynamic - Dynamic - - - bundle - - bundle - 4 - - product - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BundleProduct %isolation% - - - - - - - - - - - - - - - - - - - - - - - - - - - Dynamic - - - - - - - - - - - - - - - - - - - - - - Dynamic - - - Dynamic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + bundle + + bundle + 4 + + product + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/BundleSelections.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/BundleSelections.php index f0d58fec564c3..1173b4def58c9 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/BundleSelections.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/BundleSelections.php @@ -6,44 +6,34 @@ namespace Magento\Bundle\Test\Fixture\BundleProduct; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Repository\RepositoryFactory; /** - * Class BundleSelections - * Bundle selections preset + * Prepare bundle selection items. */ -class BundleSelections implements FixtureInterface +class BundleSelections extends DataSource { /** - * Prepared dataSet data - * - * @var array - */ - protected $data; - - /** - * Data set configuration settings - * - * @var array - */ - protected $params; - - /** - * Constructor - * * @constructor + * @param RepositoryFactory $repositoryFactory * @param FixtureFactory $fixtureFactory * @param array $data * @param array $params [optional] */ - public function __construct(FixtureFactory $fixtureFactory, array $data, array $params = []) - { + public function __construct( + RepositoryFactory $repositoryFactory, + FixtureFactory $fixtureFactory, + array $data, + array $params = [] + ) { $this->params = $params; - $this->data = !isset($data['preset']) ? $data : []; + $this->data = !isset($data['dataset']) ? $data : []; - if (isset($data['preset'])) { - $this->data = $this->getPreset($data['preset']); + if (isset($data['dataset']) && isset($this->params['repository'])) { + $this->data = $repositoryFactory->get($this->params['repository'])->get($data['dataset']); if (!empty($data['products'])) { $this->data['products'] = []; $this->data['products'] = explode('|', $data['products']); @@ -63,8 +53,8 @@ public function __construct(FixtureFactory $fixtureFactory, array $data, array $ $productSelection[$key] = $product; continue; } - list($fixture, $dataSet) = explode('::', $product); - $productSelection[$key] = $fixtureFactory->createByCode($fixture, ['dataSet' => $dataSet]); + list($fixture, $dataset) = explode('::', $product); + $productSelection[$key] = $fixtureFactory->createByCode($fixture, ['dataset' => $dataset]); $productSelection[$key]->persist(); $this->data['bundle_options'][$index]['assigned_products'][$key]['search_data']['name'] = $productSelection[$key]->getName(); @@ -73,655 +63,4 @@ public function __construct(FixtureFactory $fixtureFactory, array $data, array $ } } } - - /** - * Persist bundle selections products - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Preset array - * - * @param string $name - * @return mixed - * @throws \InvalidArgumentException - * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - */ - protected function getPreset($name) - { - $presets = [ - 'default_dynamic' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'required' => 'Yes', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - ] - ], - ], - ], - ], - 'products' => [ - [ - 'catalogProductSimple::default', - 'catalogProductSimple::product_100_dollar', - ], - ], - ], - - 'default_fixed' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'required' => 'Yes', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 5.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 6.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ] - ], - ], - ], - ], - 'products' => [ - [ - 'catalogProductSimple::default', - 'catalogProductSimple::product_100_dollar', - ], - ], - ], - - 'fixed_100_dollar' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'required' => 'Yes', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 10.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 560.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ] - ], - ], - ], - ], - 'products' => [ - [ - 'catalogProductSimple::product_10_dollar', - 'catalogProductSimple::default', - ], - ], - ], - - 'second' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'required' => 'Yes', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 5.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 10.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ] - ], - ], - ], - ], - 'products' => [ - [ - 'catalogProductSimple::default', - 'catalogProductSimple::product_100_dollar', - ], - ], - ], - - 'all_types_fixed' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'required' => 'Yes', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 5.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 6.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ] - ], - ], - ], - [ - 'title' => 'Radio Button Option', - 'type' => 'Radio Buttons', - 'required' => 'Yes', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 5.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 6.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ] - ], - ] - ], - [ - 'title' => 'Checkbox Option', - 'type' => 'Checkbox', - 'required' => 'Yes', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 5.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 6.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ] - ], - ] - ], - [ - 'title' => 'Multiple Select Option', - 'type' => 'Multiple Select', - 'required' => 'Yes', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 5.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 6.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ] - ], - ] - ], - ], - 'products' => [ - [ - 'catalogProductSimple::default', - 'catalogProductSimple::product_100_dollar', - ], - [ - 'catalogProductSimple::default', - 'catalogProductSimple::product_100_dollar' - ], - [ - 'catalogProductSimple::default', - 'catalogProductSimple::product_100_dollar' - ], - [ - 'catalogProductSimple::default', - 'catalogProductSimple::product_100_dollar' - ], - ], - ], - - 'all_types_dynamic' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'required' => 'Yes', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - ] - ], - ], - ], - [ - 'title' => 'Radio Button Option', - 'type' => 'Radio Buttons', - 'required' => 'Yes', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - ] - ], - ] - ], - [ - 'title' => 'Checkbox Option', - 'type' => 'Checkbox', - 'required' => 'Yes', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - ] - ], - ] - ], - [ - 'title' => 'Multiple Select Option', - 'type' => 'Multiple Select', - 'required' => 'Yes', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - ] - ], - ] - ], - ], - 'products' => [ - [ - 'catalogProductSimple::default', - 'catalogProductSimple::product_100_dollar', - ], - [ - 'catalogProductSimple::default', - 'catalogProductSimple::product_100_dollar' - ], - [ - 'catalogProductSimple::default', - 'catalogProductSimple::product_100_dollar' - ], - [ - 'catalogProductSimple::default', - 'catalogProductSimple::product_100_dollar' - ], - ], - ], - - 'with_not_required_options' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'required' => 'No', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - 'selection_price_value' => 45, - 'selection_price_type' => 'Fixed', - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - 'selection_price_value' => 43, - 'selection_price_type' => 'Fixed', - ] - ], - ], - ], - [ - 'title' => 'Radio Button Option', - 'type' => 'Radio Buttons', - 'required' => 'No', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - 'selection_price_value' => 45, - 'selection_price_type' => 'Fixed', - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - 'selection_price_value' => 43, - 'selection_price_type' => 'Fixed', - ] - ], - ] - ], - ], - 'products' => [ - [ - 'catalogProductSimple::default', - 'catalogProductSimple::product_100_dollar', - ], - [ - 'catalogProductSimple::default', - 'catalogProductSimple::product_100_dollar' - ], - ], - ], - - 'two_options_with_fixed_and_percent_prices' => [ - 'bundle_options' => [ - [ - 'title' => 'BundleOption1', - 'type' => 'Drop-down', - 'required' => 'Yes', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 10.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 20.00, - 'selection_price_type' => 'Percent', - 'selection_qty' => 1, - ] - ], - ], - ], - ], - 'products' => [ - [ - 'catalogProductSimple::product_without_category', - 'catalogProductSimple::product_without_category', - ], - ], - ], - - 'two_options_assigned_products_without_category' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'required' => 'Yes', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - ] - ], - ], - ], - ], - 'products' => [ - [ - 'catalogProductSimple::product_without_category', - 'catalogProductSimple::product_without_category', - ], - ], - ], - - 'one_options_assigned_simple_big_qty' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'required' => 'Yes', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_qty' => 1, - ], - ], - ], - ], - ], - 'products' => [ - [ - 'catalogProductSimple::simple_big_qty', - ], - ], - ], - - 'required_two_fixed_options' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'required' => 'Yes', - 'assigned_products' => [ - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 10.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ], - ], - [ - 'search_data' => [ - 'name' => '%product_name%', - ], - 'data' => [ - 'selection_price_value' => 20.00, - 'selection_price_type' => 'Fixed', - 'selection_qty' => 1, - ] - ], - ], - ], - ], - 'products' => [ - [ - 'catalogProductSimple::simple', - 'catalogProductVirtual::product_15_dollar', - ], - ], - ], - ]; - if (!isset($presets[$name])) { - throw new \InvalidArgumentException( - sprintf('Wrong Bundle Selections preset name: %s', $name) - ); - } - return $presets[$name]; - } } diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/CheckoutData.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/CheckoutData.php deleted file mode 100644 index bff410f211501..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/CheckoutData.php +++ /dev/null @@ -1,342 +0,0 @@ - [ - 'options' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'value' => [ - 'name' => 'product_100_dollar', - ], - ], - ], - ], - ], - 'default_dynamic' => [ - 'options' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'value' => [ - 'name' => 'product_100_dollar', - ], - ], - ], - ], - 'qty' => 2, - 'cartItem' => [ - 'price' => 100, - 'qty' => 2, - 'subtotal' => 200, - ], - ], - 'default_fixed' => [ - 'options' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'value' => [ - 'name' => 'product_100_dollar', - ], - ], - ], - ], - 'qty' => 1, - 'cartItem' => [ - 'price' => 756, - 'qty' => 1, - 'subtotal' => 756, - ], - ], - 'fixed_100_dollar' => [ - 'options' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'value' => [ - 'name' => 'product_10_dollar', - ], - ], - ], - ], - 'qty' => 1, - 'cartItem' => [ - 'price' => 110, - 'qty' => 1, - 'subtotal' => 110, - ], - ], - 'forUpdateMiniShoppingCart' => [ - 'options' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'value' => [ - 'name' => 'Simple Product', - ], - ], - ], - ], - 'qty' => 1, - 'cartItem' => [ - 'price' => 756, - 'qty' => 1, - 'subtotal' => 756, - ], - ], - 'with_not_required_options' => [ - 'options' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'value' => [ - 'name' => 'product_100_dollar', - ], - ], - [ - 'title' => 'Radio Button Option', - 'type' => 'Radio Buttons', - 'value' => [ - 'name' => 'product_100_dollar', - ] - ], - ], - ], - ], - 'with_custom_options_1' => [ - 'options' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'value' => [ - 'name' => 'product_100_dollar', - ], - ], - ], - 'custom_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_0', - ], - [ - 'title' => 'attribute_key_1', - 'value' => 'option_key_0', - ], - [ - 'title' => 'attribute_key_2', - 'value' => 'Field', - ], - [ - 'title' => 'attribute_key_3', - 'value' => 'Field', - ], - [ - 'title' => 'attribute_key_4', - 'value' => 'Area', - ], - [ - 'title' => 'attribute_key_6', - 'value' => 'option_key_0', - ], - [ - 'title' => 'attribute_key_7', - 'value' => 'option_key_0', - ], - [ - 'title' => 'attribute_key_8', - 'value' => 'option_key_0', - ], - [ - 'title' => 'attribute_key_9', - 'value' => 'option_key_0', - ], - [ - 'title' => 'attribute_key_10', - 'value' => '12/12/2015', - ], - [ - 'title' => 'attribute_key_11', - 'value' => '12/12/2015/12/30/AM', - ], - [ - 'title' => 'attribute_key_12', - 'value' => '12/12/AM', - ], - ], - ], - ], - 'with_custom_options_2' => [ - 'options' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'value' => [ - 'name' => 'product_100_dollar', - ], - ], - ], - 'custom_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_0', - ], - ], - ], - ], - 'all_types_bundle_fixed_and_custom_options' => [ - 'options' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'value' => [ - 'name' => 'product_100_dollar', - ], - ], - [ - 'title' => 'Radio Button Option', - 'type' => 'Radio Buttons', - 'value' => [ - 'name' => 'product_100_dollar', - ] - ], - [ - 'title' => 'Checkbox Option', - 'type' => 'Checkbox', - 'value' => [ - 'name' => 'product_100_dollar', - ] - ], - [ - 'title' => 'Multiple Select Option', - 'type' => 'Multiple', - 'value' => [ - 'name' => 'product_100_dollar', - ] - ], - ], - 'custom_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'Field', - ], - [ - 'title' => 'attribute_key_1', - 'value' => 'Area', - ], - [ - 'title' => 'attribute_key_3', - 'value' => 'option_key_0', - ], - [ - 'title' => 'attribute_key_4', - 'value' => 'option_key_0', - ], - [ - 'title' => 'attribute_key_5', - 'value' => 'option_key_0', - ], - [ - 'title' => 'attribute_key_6', - 'value' => 'option_key_0', - ], - [ - 'title' => 'attribute_key_7', - 'value' => '12/12/2015', - ], - [ - 'title' => 'attribute_key_8', - 'value' => '12/12/2015/12/30/AM', - ], - [ - 'title' => 'attribute_key_9', - 'value' => '12/12/AM', - ], - ], - ], - ], - 'all_types_bundle_options' => [ - 'options' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'value' => [ - 'name' => 'product_100_dollar', - ], - ], - [ - 'title' => 'Radio Button Option', - 'type' => 'Radio Buttons', - 'value' => [ - 'name' => 'product_100_dollar', - ] - ], - [ - 'title' => 'Checkbox Option', - 'type' => 'Checkbox', - 'value' => [ - 'name' => 'product_100_dollar', - ] - ], - [ - 'title' => 'Multiple Select Option', - 'type' => 'Multiple', - 'value' => [ - 'name' => 'product_100_dollar', - ] - ], - ], - ], - ], - 'required_two_fixed_options' => [ - 'options' => [ - 'bundle_options' => [ - [ - 'title' => 'Drop-down Option', - 'type' => 'Drop-down', - 'value' => [ - 'name' => 'Test simple product', - ], - ], - ], - ], - ], - ]; - return isset($presets[$name]) ? $presets[$name] : null; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/Price.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/Price.php deleted file mode 100644 index c4f0aee1ebebe..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/Price.php +++ /dev/null @@ -1,214 +0,0 @@ -params = $params; - $this->data = (!isset($data['value']) && !isset($data['preset'])) ? $data : []; - - $this->data = (isset($data['value']) && $data['value'] != '-') ? $data['value'] : null; - if (isset($data['preset'])) { - $this->currentPreset = $data['preset']; - } - } - - /** - * Persist fixture - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Get preset array - * - * @return array|null - * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - */ - public function getPreset() - { - $presets = [ - 'drop_down_with_one_option_fixed_price' => [ - 'price_from' => '115.00', - 'price_to' => '120.00', - 'cart_price' => '145.00', - ], - 'drop_down_with_one_option_percent_price' => [ - 'price_from' => '115.00', - 'price_to' => '120.00', - 'cart_price' => '126.00', - ], - 'MAGETWO-23070' => [ - 'price_from' => '40.00', - 'price_to' => '100.00', - 'cart_price' => '100.00', - ], - 'MAGETWO-23061' => [ - 'price_from' => '32.00', - 'price_to' => '80.00', - 'cart_price' => '80.00', - ], - // Bundle fixed - 'fixed-10' => [ - 'price_from' => '10.00', - 'price_to' => '100.00', - 'cart_price' => '80.00', - ], - 'fixed-15' => [ - 'price_from' => '15.00', - 'price_to' => '16.00', - 'cart_price' => '80.00', - ], - 'fixed-24' => [ - 'price_from' => '96.00', - 'price_to' => '97.00', - 'cart_price' => '244.00', - ], - 'fixed-100' => [ - 'price_from' => '110.00', - 'price_to' => '120.00', - ], - 'fixed-115' => [ - 'price_from' => '317.00', - 'price_to' => '362.00', - 'cart_price' => '317.00', - ], - 'fixed-110' => [ - 'price_from' => '159.00', - 'price_to' => '164.00', - 'cart_price' => '159.00', - ], - 'fixed-756' => [ - 'price_from' => '755.00', - 'price_to' => '756.00', - 'cart_price' => '756.00', - ], - 'default_fixed' => [ - 'compare_price' => [ - 'price_from' => '755.00', - 'price_to' => '756.00', - ], - ], - 'bundle_fixed_with_category' => [ - 'price_from' => '130.00', - 'price_to' => '144.00', - ], - // Bundle dynamic - 'default_dynamic' => [ - 'compare_price' => [ - 'price_from' => '100.00', - 'price_to' => '560.00', - ], - ], - 'dynamic-8' => [ - 'price_from' => '8.00', - 'price_to' => '20.00', - 'cart_price' => '80.00', - ], - 'dynamic-32' => [ - 'price_from' => '32.00', - 'price_to' => '80.00', - 'cart_price' => '80.00', - ], - 'dynamic-40' => [ - 'price_from' => '40.00', - 'price_to' => '100.00', - 'cart_price' => '100.00', - ], - 'dynamic-50' => [ - 'price_from' => '50.00', - ], - 'dynamic-100' => [ - 'price_from' => '100.00', - 'price_to' => '560.00', - 'cart_price' => '100.00', - ], - 'dynamic-200' => [ - 'price_from' => '200.00', - 'price_to' => '500.00', - 'cart_price' => '400.00', - ], - 'dynamic-560' => [ - 'price_from' => '560.00', - ], - 'bundle_dynamic_with_category' => [ - 'price_from' => '100.00', - 'price_to' => '100.00', - ] - ]; - if (!isset($presets[$this->currentPreset])) { - return null; - } - return $presets[$this->currentPreset]; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/Cart/Item.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/Cart/Item.php index 89bab0c1b7e8a..32afeb9d6a420 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/Cart/Item.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/Cart/Item.php @@ -10,8 +10,7 @@ use Magento\Mtf\Fixture\FixtureInterface; /** - * Class Item - * Data for verify cart item block on checkout page + * Data for verify cart item block on checkout page. * * Data keys: * - product (fixture data for verify) @@ -67,37 +66,4 @@ public function __construct(FixtureInterface $product) $this->data['options'] += $checkoutBundleOptions; } - - /** - * Persist fixture - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - // - } } diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct.xml index 60e602800cc24..2e920885fa488 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct.xml +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct.xml @@ -17,7 +17,7 @@ - taxable_goods + taxable_goods 0 0 @@ -41,7 +41,7 @@ - taxable_goods + taxable_goods 0 0 @@ -60,8 +60,7 @@ Dynamic Dynamic - - - default_dynamic + default_dynamic 666 @@ -70,7 +69,7 @@ Dynamic Separately - taxable_goods + taxable_goods Main Website @@ -84,11 +83,11 @@ bundle-dynamic-product-%isolation% Catalog, Search - default_dynamic + default_dynamic Default - default_dynamic + bundle_default_dynamic @@ -99,10 +98,10 @@ Fixed 750 - default_fixed + default_fixed - taxable_goods + taxable_goods 666 @@ -124,11 +123,11 @@ bundle-fixed-product-%isolation% Catalog, Search - default_fixed + default_fixed Default - default_fixed + bundle_default_fixed @@ -142,7 +141,7 @@ 100 - taxable_goods + taxable_goods 1 Fixed @@ -150,10 +149,10 @@ Main Website - default_subcategory + default_subcategory - two_options_with_fixed_and_percent_prices + two_options_with_fixed_and_percent_prices @@ -164,17 +163,16 @@ Dynamic Dynamic - - - bundle_dynamic_with_category + bundle_dynamic_with_category Main Website - default_subcategory + default_subcategory - two_options_assigned_products_without_category + two_options_assigned_products_without_category @@ -188,7 +186,7 @@ 100 - taxable_goods + taxable_goods 1 Fixed @@ -197,10 +195,10 @@ Separately - required_two_fixed_options + required_two_fixed_options - required_two_fixed_options + bundle_required_two_fixed_options @@ -211,10 +209,10 @@ Fixed 100 - fixed_100_dollar + fixed_100_dollar - taxable_goods + taxable_goods 666 @@ -236,11 +234,11 @@ bundle-fixed-product-%isolation% Catalog, Search - fixed_100_dollar + fixed_100_dollar Default - fixed_100_dollar + bundle_fixed_100_dollar diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/BundleSelections.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/BundleSelections.xml new file mode 100644 index 0000000000000..e8f80bc5a55b4 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/BundleSelections.xml @@ -0,0 +1,608 @@ + + + + + + + + Drop-down Option + Drop-down + Yes + + + + %product_name% + + + 1 + + + + + %product_name% + + + 1 + + + + + + + + catalogProductSimple::default + catalogProductSimple::product_100_dollar + + + + + + + + Drop-down Option + Drop-down + Yes + + + + %product_name% + + + 5.00 + Fixed + 1 + + + + + %product_name% + + + 6.00 + Fixed + 1 + + + + + + + + catalogProductSimple::default + catalogProductSimple::product_100_dollar + + + + + + + + Drop-down Option + Drop-down + Yes + + + + %product_name% + + + 10.00 + Fixed + 1 + + + + + %product_name% + + + 560.00 + Fixed + 1 + + + + + + + + catalogProductSimple::product_10_dollar + catalogProductSimple::default + + + + + + + + Drop-down Option + Drop-down + Yes + + + + %product_name% + + + 5.00 + Fixed + 1 + + + + + %product_name% + + + 10.00 + Fixed + 1 + + + + + + + + catalogProductSimple::default + catalogProductSimple::product_100_dollar + + + + + + + + Drop-down Option + Drop-down + Yes + + + + %product_name% + + + 5.00 + Fixed + 1 + + + + + %product_name% + + + 6.00 + Fixed + 1 + + + + + + Radio Button Option + Radio Buttons + Yes + + + + %product_name% + + + 5.00 + Fixed + 1 + + + + + %product_name% + + + 6.00 + Fixed + 1 + + + + + + Checkbox Option + Checkbox + Yes + + + + %product_name% + + + 5.00 + Fixed + 1 + + + + + %product_name% + + + 6.00 + Fixed + 1 + + + + + + Multiple Select Option + Multiple Select + Yes + + + + %product_name% + + + 5.00 + Fixed + 1 + + + + + %product_name% + + + 6.00 + Fixed + 1 + + + + + + + + catalogProductSimple::default + catalogProductSimple::product_100_dollar + + + catalogProductSimple::default + catalogProductSimple::product_100_dollar + + + catalogProductSimple::default + catalogProductSimple::product_100_dollar + + + catalogProductSimple::default + catalogProductSimple::product_100_dollar + + + + + + + + Drop-down Option + Drop-down + Yes + + + + %product_name% + + + 1 + + + + + %product_name% + + + 1 + + + + + + Radio Button Option + Radio Buttons + Yes + + + + %product_name% + + + 1 + + + + + %product_name% + + + 1 + + + + + + Checkbox Option + Checkbox + Yes + + + + %product_name% + + + 1 + + + + + %product_name% + + + 1 + + + + + + Multiple Select Option + Multiple Select + Yes + + + + %product_name% + + + 1 + + + + + %product_name% + + + 1 + + + + + + + + catalogProductSimple::default + catalogProductSimple::product_100_dollar + + + catalogProductSimple::default + catalogProductSimple::product_100_dollar + + + catalogProductSimple::default + catalogProductSimple::product_100_dollar + + + catalogProductSimple::default + catalogProductSimple::product_100_dollar + + + + + + + + Drop-down Option + Drop-down + No + + + + %product_name% + + + 1 + 45 + Fixed + + + + + %product_name% + + + 1 + 43 + Fixed + + + + + + Radio Button Option + Radio Buttons + Yes + + + + %product_name% + + + 1 + 45 + Fixed + + + + + %product_name% + + + 1 + 43 + Fixed + + + + + + + + catalogProductSimple::default + catalogProductSimple::product_100_dollar + + + catalogProductSimple::default + catalogProductSimple::product_100_dollar + + + + + + + + Drop-down Option + Drop-down + Yes + + + + %product_name% + + + 1 + 10.00 + Fixed + + + + + %product_name% + + + 1 + 20.00 + Percent + + + + + + + + catalogProductSimple::product_without_category + catalogProductSimple::product_without_category + + + + + + + + Drop-down Option + Drop-down + Yes + + + + %product_name% + + + 1 + + + + + %product_name% + + + 1 + + + + + + + + catalogProductSimple::product_without_category + catalogProductSimple::product_without_category + + + + + + + + Drop-down Option + Drop-down + Yes + + + + %product_name% + + + 1 + + + + + + + + catalogProductSimple::simple_big_qty + + + + + + + + Drop-down Option + Drop-down + Yes + + + + %product_name% + + + 10.00 + Fixed + 1 + + + + + %product_name% + + + 20.00 + Fixed + 1 + + + + + + + + catalogProductSimple::simple + catalogProductSimple::product_15_dollar + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/CheckoutData.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/CheckoutData.xml new file mode 100644 index 0000000000000..7b9551aeae7c0 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/CheckoutData.xml @@ -0,0 +1,331 @@ + + + + + + + + + Drop-down Option + Drop-down + + product_100_dollar + + + + + + + + + + + Drop-down Option + Drop-down + + product_100_dollar + + + + + 2 + + 100 + 2 + 200 + + + + + + + + Drop-down Option + Drop-down + + product_100_dollar + + + + + 1 + + 756 + 1 + 756 + + + + + + + + Drop-down Option + Drop-down + + product_10_dollar + + + + + 1 + + 110 + 1 + 110 + + + + + + + + Drop-down Option + Drop-down + + Simple Product + + + + + 1 + + 756 + 1 + 756 + + + + + + + + Drop-down Option + Drop-down + + product_100_dollar + + + + Radio Button Option + Radio Buttons + + product_100_dollar + + + + + + + + + + + Drop-down Option + Drop-down + + product_100_dollar + + + + + + attribute_key_0 + option_key_0 + + + attribute_key_1 + option_key_0 + + + attribute_key_2 + Field + + + attribute_key_3 + Field + + + attribute_key_4 + Area + + + attribute_key_6 + option_key_0 + + + attribute_key_7 + option_key_0 + + + attribute_key_8 + option_key_0 + + + attribute_key_9 + option_key_0 + + + attribute_key_10 + 12/12/2015 + + + attribute_key_11 + 12/12/2015/12/30/AM + + + attribute_key_12 + 12/12/AM + + + + + + + + + + Drop-down Option + Drop-down + + product_100_dollar + + + + + + attribute_key_0 + option_key_0 + + + + + + + + + + Drop-down Option + Drop-down + + product_100_dollar + + + + Radio Button Option + Radio Buttons + + product_100_dollar + + + + Checkbox Option + Checkbox + + product_100_dollar + + + + Multiple Select Option + Multiple + + product_100_dollar + + + + + + attribute_key_0 + Field + + + attribute_key_1 + Area + + + attribute_key_3 + option_key_0 + + + attribute_key_4 + option_key_0 + + + attribute_key_5 + option_key_0 + + + attribute_key_6 + option_key_0 + + + attribute_key_7 + 12/12/2015 + + + attribute_key_8 + 12/12/2015/12/30/AM + + + attribute_key_9 + 12/12/AM + + + + + + + + + + Drop-down Option + Drop-down + + product_100_dollar + + + + Radio Button Option + Radio Buttons + + product_100_dollar + + + + Checkbox Option + Checkbox + + product_100_dollar + + + + Multiple Select Option + Multiple + + product_100_dollar + + + + + + + + + + + Drop-down Option + Drop-down + + Test simple product + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/Price.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/Price.xml new file mode 100644 index 0000000000000..99871d62cd2cb --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/Price.xml @@ -0,0 +1,137 @@ + + + + + + + 755.00 + 756.00 + + + + + 115.00 + 120.00 + 145.00 + + + + 115.00 + 120.00 + 126.00 + + + + 40.00 + 100.00 + 100.00 + + + + 32.00 + 80.00 + 80.00 + + + + 10.00 + 100.00 + 80.00 + + + + 15.00 + 16.00 + 80.00 + + + + 96.00 + 97.00 + 244.00 + + + + 110.00 + 120.00 + + + + 159.00 + 164.00 + 159.00 + + + + 317.00 + 362.00 + 317.00 + + + + 755.00 + 756.00 + 756.00 + + + + 130.00 + 144.00 + + + + + 100.00 + 560.00 + + + + + 8.00 + 20.00 + 80.00 + + + + 32.00 + 80.00 + 80.00 + + + + 40.00 + 100.00 + 100.00 + + + + 50.00 + + + + 100.00 + 560.00 + 100.00 + + + + 200.00 + 500.00 + 400.00 + + + + 560.00 + + + + 100.00 + 100.00 + + + diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.xml index ad5b9bfa0c055..31ced246ab4d3 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.xml @@ -15,9 +15,9 @@ Bundle Product Dynamic Required No No - default_dynamic + default_dynamic catalogProductSimple::product_100_dollar,catalogProductVirtual::product_50_dollar - default + bundle_default @@ -34,9 +34,9 @@ Dynamic category_%isolation% Separately - default_dynamic + default_dynamic catalogProductSimple::product_100_dollar,catalogProductVirtual::product_50_dollar - default + bundle_default Catalog, Search No Yes @@ -51,16 +51,16 @@ bundle_sku_%isolation% Product online Dynamic - dynamic-200 + dynamic-200 In Stock Dynamic category_%isolation% Bundle Product Dynamic Price Range Together - all_types_dynamic + all_types_dynamic catalogProductSimple::product_100_dollar,catalogProductVirtual::product_50_dollar|catalogProductSimple::product_100_dollar,catalogProductVirtual::product_50_dollar|catalogProductSimple::product_100_dollar,catalogProductVirtual::product_50_dollar|catalogProductSimple::product_100_dollar,catalogProductVirtual::product_50_dollar - all_types_bundle_options + bundle_all_types_bundle_options Catalog, Search No Yes @@ -83,14 +83,14 @@ bundle_sku_%isolation% Fixed 10 - fixed-15 - None + fixed-15 + None Fixed 10 Bundle Product Fixed Required - default_fixed + default_fixed catalogProductSimple::product_100_dollar,catalogProductVirtual::product_50_dollar - default + bundle_default @@ -108,20 +108,20 @@ Product online Fixed 100 - fixed-24 - taxable_goods + fixed-24 + taxable_goods In Stock Fixed 10 category_%isolation% Bundle Product Fixed - default + not_logged_in_20 As Low as Separately - all_types_fixed + all_types_fixed catalogProductSimple::product_100_dollar,catalogProductVirtual::product_50_dollar|catalogProductSimple::product_100_dollar,catalogProductVirtual::product_50_dollar|catalogProductSimple::product_100_dollar,catalogProductVirtual::product_50_dollar|catalogProductSimple::product_100_dollar,catalogProductVirtual::product_50_dollar - all_types_bundle_fixed_and_custom_options - all_types + bundle_all_types_bundle_fixed_and_custom_options + all_types Catalog, Search No No @@ -145,8 +145,8 @@ Product online Fixed 10 - fixed-10 - taxable_goods + fixed-10 + taxable_goods Out of Stock Fixed 10 @@ -155,9 +155,9 @@ No Yes Together - with_not_required_options + with_not_required_options catalogProductSimple::product_100_dollar,catalogProductVirtual::product_50_dollar|catalogProductSimple::product_100_dollar,catalogProductVirtual::product_50_dollar - with_not_required_options + bundle_with_not_required_options Catalog No No @@ -173,17 +173,17 @@ Dynamic bundle_sku_%isolation% Dynamic - dynamic-50 + dynamic-50 Fixed 10 - default + default As Low as No No Together - default_dynamic + default_dynamic catalogProductSimple::product_100_dollar,catalogProductVirtual::product_50_dollar - default + bundle_default Search @@ -200,13 +200,13 @@ Dynamic sku_bundle_dynamic_%isolation% Dynamic - dynamic-8 + dynamic-8 20 m/d/Y m/d/Y +3 days - default_dynamic + default_dynamic catalogProductSimple::product_100_dollar,catalogProductSimple::product_40_dollar - default + bundle_default @@ -217,11 +217,11 @@ Dynamic sku_bundle_dynamic_%isolation% Dynamic - dynamic-32 - MAGETWO-23061 - default_dynamic + dynamic-32 + not_logged_in_20 + default_dynamic catalogProductSimple::product_100_dollar,catalogProductSimple::product_40_dollar - default + bundle_default @@ -234,10 +234,10 @@ Dynamic sku_bundle_dynamic_%isolation% Dynamic - dynamic-40 - default_dynamic + dynamic-40 + default_dynamic catalogProductSimple::product_100_dollar,catalogProductSimple::product_40_dollar - default + bundle_default @@ -251,11 +251,11 @@ sku_bundle_fixed_%isolation% Fixed 110 - fixed-115 - second + fixed-115 + second catalogProductSimple::product_100_dollar,catalogProductSimple::product_40_dollar - with_custom_options_1 - drop_down_with_one_option_fixed_price + bundle_with_custom_options_1 + drop_down_with_one_option_fixed_price catalogProductSimple::with_two_custom_option,catalogProductSimple::with_all_custom_option @@ -271,11 +271,11 @@ sku_bundle_fixed_%isolation% Fixed 110 - fixed-110 - second + fixed-110 + second catalogProductSimple::product_100_dollar,catalogProductSimple::product_40_dollar - with_custom_options_2 - drop_down_with_one_option_percent_price + bundle_with_custom_options_2 + drop_down_with_one_option_percent_price @@ -288,9 +288,9 @@ Dynamic sku_bundle_dynamic_%isolation% Dynamic - default_dynamic + default_dynamic catalogProductSimple::product_100_dollar,catalogProductSimple::product_40_dollar - default + bundle_default @@ -301,9 +301,9 @@ sku_bundle_fixed_%isolation% Fixed 10 - second + second catalogProductSimple::product_100_dollar,catalogProductSimple::product_40_dollar - default + bundle_default @@ -314,13 +314,13 @@ sku_bundle_fixed_%isolation% Fixed 100 - fixed-100 - taxable_goods + fixed-100 + taxable_goods Fixed 1 category_%isolation% Together - two_options_with_fixed_and_percent_prices + two_options_with_fixed_and_percent_prices test_type:acceptance_test @@ -333,10 +333,10 @@ Bundle Dynamic %isolation% sku_bundle_dynamic_%isolation% Dynamic - dynamic-560 + dynamic-560 category_%isolation% Together - one_options_assigned_simple_big_qty + one_options_assigned_simple_big_qty test_type:acceptance_test diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/UpdateBundleProductEntityTest.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/UpdateBundleProductEntityTest.xml index 89e9f03427db7..bbe84c24f29ab 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/UpdateBundleProductEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/UpdateBundleProductEntityTest.xml @@ -6,99 +6,74 @@ */ --> - - - Update dynamic bundle product - bundle_dynamic_product - bundle-product-%isolation% - bundle_dynamic_%isolation% - Fixed - bundle_dynamic_%isolation% - - - dynamic-100 - Fixed - 1 - - - Bundle Product Fixed Required - Together - default_dynamic - default - - - - - - - - - - - - - Update fixed bundle product - bundle_fixed_product - bundle-product-%isolation% - bundle_fixed_%isolation% - Dynamic - bundle_sku_%isolation% - - - fixed-756 - Dynamic - - - default_subcategory - - - Separately - default_fixed - default - Catalog, Search - - - - - - - - - - - - MAGETWO-12841: Edit Bundle Product (Fixed Price) - bundle_fixed_with_category - bundle-product-%isolation% - bundle_fixed_%isolation% - - - bundle_sku_%isolation% - 120.00 - bundle_fixed_with_category - - - - - - - - - - - - - - - - - - - - - MAGETWO-12842: Edit Bundle (dynamic) Product - bundle_dynamic_with_category - bundle-product-%isolation% - bundle_dynamic_%isolation% - - - bundle_sku_%isolation% - - - bundle_dynamic_with_category - - - - - - - - - - - - - - - - - - - - + + + Update dynamic bundle product + bundle_dynamic_product + bundle-product-%isolation% + bundle_dynamic_%isolation% + Fixed + bundle_dynamic_%isolation% + dynamic-100 + Fixed + 1 + Bundle Product Fixed Required + Together + default_dynamic + bundle_default + + + + + + + + + + + Update fixed bundle product + bundle_fixed_product + bundle-product-%isolation% + bundle_fixed_%isolation% + Dynamic + bundle_sku_%isolation% + fixed-756 + Dynamic + default_subcategory + Separately + default_fixed + bundle_default + Catalog, Search + + + + + + + + + + + + MAGETWO-12841: Edit Bundle Product (Fixed Price) + bundle_fixed_with_category + bundle-product-%isolation% + bundle_fixed_%isolation% + bundle_sku_%isolation% + 120.00 + bundle_fixed_with_category + + + + + MAGETWO-12842: Edit Bundle (dynamic) Product + bundle_dynamic_with_category + bundle-product-%isolation% + bundle_dynamic_%isolation% + bundle_sku_%isolation% + bundle_dynamic_with_category + + + + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryPage.php index 08f536e9e41b8..def6490e3bf27 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCategoryPage.php @@ -78,7 +78,7 @@ protected function prepareData(FixtureFactory $fixtureFactory, Category $categor $product = $fixtureFactory->createByCode( 'catalogProductSimple', [ - 'dataSet' => 'default', + 'dataset' => 'default', 'data' => [ 'category_ids' => [ 'category' => $initialCategory, diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsFilterable.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsFilterable.php index 30224411bc7df..1f355049a172e 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsFilterable.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsFilterable.php @@ -38,10 +38,10 @@ public function processAssert( $fixtureFactory->createByCode( 'catalogProductSimple', [ - 'dataSet' => 'product_with_category_with_anchor', + 'dataset' => 'product_with_category_with_anchor', 'data' => [ 'category_ids' => [ - 'presets' => null, + 'dataset' => null, 'category' => $product->getDataFieldConfig('category_ids')['source']->getCategories()[0] ] ], diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsUnique.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsUnique.php index f812fcdcf2617..4d29d2c4ccdf2 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsUnique.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeIsUnique.php @@ -95,7 +95,7 @@ protected function createSimpleProductFixture(CatalogProductSimple $product, Cat return $this->fixtureFactory->createByCode( 'catalogProductSimple', [ - 'dataSet' => 'product_with_category_with_anchor', + 'dataset' => 'product_with_category_with_anchor', 'data' => [ 'attribute_set_id' => [ 'attribute_set' => $product->getDataFieldConfig('attribute_set_id')['source']->getAttributeSet() diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareBlockOnCmsPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareBlockOnCmsPage.php index c44e68eb547f3..4be5339886f26 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareBlockOnCmsPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductCompareBlockOnCmsPage.php @@ -32,7 +32,7 @@ public function processAssert( FixtureFactory $fixtureFactory, BrowserInterface $browser ) { - $newCmsPage = $fixtureFactory->createByCode('cmsPage', ['dataSet' => '3_column_template']); + $newCmsPage = $fixtureFactory->createByCode('cmsPage', ['dataset' => '3_column_template']); $newCmsPage->persist(); $browser->open($_ENV['app_frontend_url'] . $newCmsPage->getIdentifier()); foreach ($products as &$product) { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductComparePage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductComparePage.php index c3f069fa2ed05..4c52c900a1e74 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductComparePage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductComparePage.php @@ -60,8 +60,8 @@ public function processAssert( ? ($product->hasData($attribute) ? $product->getData($attribute) : 'N/A') - : ($product->getDataFieldConfig('price')['source']->getPreset() !== null - ? $product->getDataFieldConfig('price')['source']->getPreset()['compare_price'] + : ($product->getDataFieldConfig('price')['source']->getPriceData() !== null + ? $product->getDataFieldConfig('price')['source']->getPriceData()['compare_price'] : number_format($product->getPrice(), 2)); $attribute = is_numeric($attributeKey) ? 'info' : 'attribute'; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php index 165f69f007b7e..2baac340525f3 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php @@ -52,7 +52,7 @@ public function processAssert( $productSimple = $fixtureFactory->createByCode( 'catalogProductSimple', [ - 'dataSet' => 'default', + 'dataset' => 'default', 'data' => [ 'attribute_set_id' => ['attribute_set' => $attributeSet], ], diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateOnProductForm.php index e1aba5f1afee7..10872b63804d8 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateOnProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateOnProductForm.php @@ -52,7 +52,7 @@ public function processAssert( $productSimple = $fixtureFactory->createByCode( 'catalogProductSimple', [ - 'dataSet' => 'default', + 'dataset' => 'default', 'data' => [ 'attribute_set_id' => ['attribute_set' => $attributeSet], ], diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Cart/Item.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Cart/Item.php index 9e8d1996b13a2..c5b0a6ead5672 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Cart/Item.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Cart/Item.php @@ -6,27 +6,20 @@ namespace Magento\Catalog\Test\Fixture\Cart; -use Magento\Catalog\Test\Fixture\CatalogProductSimple; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Catalog\Test\Fixture\CatalogProductSimple; /** - * Class Item - * Data for verify cart item block on checkout page + * Data for verify cart item block on checkout page. * * Data keys: * - product (fixture data for verify) * * @SuppressWarnings(PHPMD.NPathComplexity) */ -class Item implements FixtureInterface +class Item extends DataSource { - /** - * Prepared dataSet data - * - * @var array - */ - protected $data = []; - /** * @constructor * @param FixtureInterface $product @@ -64,37 +57,4 @@ public function __construct(FixtureInterface $product) $this->data = $cartItem; } - - /** - * Persist fixture - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - // - } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.xml index 20c3c831f6e62..8fad06be79f59 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.xml @@ -6,31 +6,20 @@ */ --> - - - Default_attribute_set_%isolation% - - default - - - - - - - 0 - - - Default_attribute_set_%isolation% - - - 0 - - - - default - - - - - + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet/AssignedAttributes.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet/AssignedAttributes.php index 3cab123641402..ef7559333b1e5 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet/AssignedAttributes.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet/AssignedAttributes.php @@ -6,33 +6,19 @@ namespace Magento\Catalog\Test\Fixture\CatalogAttributeSet; -use Magento\Catalog\Test\Fixture\CatalogProductAttribute; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Catalog\Test\Fixture\CatalogProductAttribute; /** - * Class AssignedAttributes + * Assigned attributes sources. * * Data keys: - * - presets + * - dataset * - attributes */ -class AssignedAttributes implements FixtureInterface +class AssignedAttributes extends DataSource { - /** - * Data set configuration settings - * - * @var array - */ - protected $params = []; - - /** - * Names of assigned attributes - * - * @var array - */ - protected $data = []; - /** * Assigned attributes * @@ -49,11 +35,11 @@ class AssignedAttributes implements FixtureInterface public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = []) { $this->params = $params; - if (isset($data['presets']) && is_string($data['presets'])) { - $presets = explode(',', $data['presets']); - foreach ($presets as $preset) { + if (isset($data['dataset']) && is_string($data['dataset'])) { + $datasets = explode(',', $data['dataset']); + foreach ($datasets as $dataset) { /** @var CatalogProductAttribute $attribute */ - $attribute = $fixtureFactory->createByCode('catalogProductAttribute', ['dataSet' => $preset]); + $attribute = $fixtureFactory->createByCode('catalogProductAttribute', ['dataset' => $dataset]); $attribute->persist(); $this->data[] = $attribute->getAttributeCode(); @@ -70,39 +56,6 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array } } - /** - * Persist attribute - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Return prepared data set - * - * @param string|null $key - * @return array - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - /** * Get Attributes * diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet/SkeletonSet.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet/SkeletonSet.php index 27f86800767f5..8367af66ae848 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet/SkeletonSet.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet/SkeletonSet.php @@ -6,25 +6,18 @@ namespace Magento\Catalog\Test\Fixture\CatalogAttributeSet; -use Magento\Catalog\Test\Fixture\CatalogAttributeSet; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Catalog\Test\Fixture\CatalogAttributeSet; /** * Class SkeletonSet * * Data keys: - * - dataSet + * - dataset */ -class SkeletonSet implements FixtureInterface +class SkeletonSet extends DataSource { - /** - * Attribute Set name - * - * @var string - */ - protected $data; - /** * New Attribute Set * @@ -33,6 +26,7 @@ class SkeletonSet implements FixtureInterface protected $attributeSet; /** + * @constructor * @param FixtureFactory $fixtureFactory * @param array $params * @param array $data @@ -40,8 +34,8 @@ class SkeletonSet implements FixtureInterface public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = []) { $this->params = $params; - if (isset($data['dataSet']) && $data['dataSet'] !== '-') { - $parentSet = $fixtureFactory->createByCode('catalogAttributeSet', ['dataSet' => $data['dataSet']]); + if (isset($data['dataset']) && $data['dataset'] !== '-') { + $parentSet = $fixtureFactory->createByCode('catalogAttributeSet', ['dataset' => $data['dataset']]); if (!$parentSet->hasData('attribute_set_id')) { $parentSet->persist(); } @@ -51,29 +45,6 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array } } - /** - * Persist attribute options - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string|null $key - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - /** * Get Attribute Set * @@ -83,14 +54,4 @@ public function getAttributeSet() { return $this->attributeSet; } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.xml index 1a38dd8158cd6..c2606db97bb6d 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.xml @@ -6,123 +6,52 @@ */ --> - - - attribute_label%isolation% - Text Field - No - - - - - - 0 - - - - - - - - - - - - static - - - - - - - - - Text Field - - - attribute_label%isolation% - - - - - - - - - - - - No - - - 0 - - - 0 - - - - - - - - - 1 - - - 1 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 1 - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute/Options.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute/Options.php deleted file mode 100644 index e0a28bee41f49..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute/Options.php +++ /dev/null @@ -1,108 +0,0 @@ -params = $params; - if (isset($data['preset'])) { - $this->data = $this->getPreset($data['preset']); - } else { - $this->data = $data; - } - } - - /** - * Persist attribute options - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string|null $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Preset for Attribute manage options - * - * @param string $name - * @return array|null - */ - protected function getPreset($name) - { - $presets = [ - 'default' => [ - [ - 'is_default' => 'Yes', - 'admin' => 'blue', - 'view' => '', - ], - ], - 'two_options' => [ - ['admin' => 'black'], - ['admin' => 'white'], - ], - ]; - - if (!isset($presets[$name])) { - return null; - } - - return $presets[$name]; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml index 59bc10f7eeecd..e295d379e33d2 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml @@ -6,212 +6,87 @@ */ --> - - - Test simple product %isolation% - test_simple_sku_%isolation% - - default - - - 100.00 - - 12.00 - - 10.00 - In Stock - - - Main Website - - simple-product-%isolation% - - - simple - - simple - 4 - - product - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Test simple product %isolation% - - - - - - - - - - - - - 100 - - - - - 10 - In Stock - - - - - - - test_simple_sku_%isolation% - - - - - - - - - - - - - - - - - - - - - Product online - - - Taxable Goods - - - - - - - - - - - - - - - - - - - - - Catalog, Search - - - 12 - - - - - - default - - - - - - - Main Website - - - - - - - - - - - - - - - - - - - - - - + + + simple + + simple + 4 + + product + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php deleted file mode 100644 index 238cfafd0832a..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php +++ /dev/null @@ -1,216 +0,0 @@ -params = $params; - $preset = []; - if (isset($data['preset'])) { - $preset = $this->getPreset($data['preset']); - unset($data['preset']); - } - $this->data = empty($preset) ? $data : array_replace_recursive($preset, $data); - } - - /** - * Persist custom selections products - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Return array preset - * - * @param string $name - * @return array|null - * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - */ - protected function getPreset($name) - { - $presets = [ - 'with_two_custom_option' => [ - 'options' => [ - 'custom_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_0', - ], - [ - 'title' => 'attribute_key_1', - 'value' => 'Content option %isolation%', - ], - ], - ], - 'qty' => 1, - 'cartItem' => [ - 'price' => 340, - 'subtotal' => 340, - ], - ], - 'forUpdateMiniShoppingCart' => [ - 'options' => [ - 'custom_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_1', - ], - [ - 'title' => 'attribute_key_1', - 'value' => 'Content option %isolation%', - ], - ], - ], - 'qty' => 2, - 'cartItem' => [ - 'price' => 370, - 'subtotal' => 740, - ], - ], - 'options-suite' => [ - 'options' => [ - 'custom_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'Field value 1 %isolation%', - ], - [ - 'title' => 'attribute_key_1', - 'value' => 'Field value 2 %isolation%' - ], - [ - 'title' => 'attribute_key_2', - 'value' => 'option_key_1' - ], - [ - 'title' => 'attribute_key_3', - 'value' => 'option_key_0' - ], - ], - ], - ], - 'drop_down_with_one_option_fixed_price' => [ - 'options' => [ - 'custom_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_0', - ], - ], - ], - ], - 'drop_down_with_one_option_percent_price' => [ - 'options' => [ - 'custom_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_0', - ], - ], - ], - ], - 'order_default' => [ - 'qty' => 1, - 'cartItem' => [ - 'price' => 560, - 'subtotal' => 560, - ], - ], - 'two_products' => [ - 'qty' => 2, - 'cartItem' => [ - 'price' => 100, - 'subtotal' => 200, - ], - ], - 'order_big_qty' => [ - 'qty' => 900, - ], - 'order_custom_price' => [ - 'qty' => 3, - 'checkout_data' => [ - 'use_custom_price' => "Yes", - 'custom_price' => 100, - ], - 'cartItem' => [], - ], - 'order_special_price' => [ - 'qty' => 1, - 'cartItem' => [ - 'price' => 9, - 'subtotal' => 9, - ], - ], - 'order_10_dollar_product' => [ - 'qty' => 1, - 'cartItem' => [ - 'price' => 10, - 'subtotal' => 10, - ], - ] - ]; - return isset($presets[$name]) ? $presets[$name] : []; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CrossSellProducts.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CrossSellProducts.php deleted file mode 100644 index 7c4a89ea39b40..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CrossSellProducts.php +++ /dev/null @@ -1,16 +0,0 @@ -params = $params; - if (is_array($data) && isset($data['dataSet'])) { + if (is_array($data) && isset($data['dataset'])) { /** @var CatalogProductAttribute $data */ - $data = $fixtureFactory->createByCode('catalogProductAttribute', ['dataSet' => $data['dataSet']]); + $data = $fixtureFactory->createByCode('catalogProductAttribute', ['dataset' => $data['dataset']]); } $this->data['value'] = $this->getDefaultAttributeValue($data); $this->data['code'] = $data->hasData('attribute_code') == false @@ -84,29 +70,6 @@ protected function getDefaultAttributeValue(CatalogProductAttribute $attribute) return $value; } - /** - * Persist attribute options. - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set. - * - * @param string|null $key - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - /** * Return CatalogProductAttribute fixture. * @@ -117,16 +80,6 @@ public function getAttribute() return $this->attribute; } - /** - * Return data set configuration settings. - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - /** * Get default attribute code according to attribute label. * diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CustomOptions.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CustomOptions.php deleted file mode 100755 index c6fa45ab95730..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CustomOptions.php +++ /dev/null @@ -1,455 +0,0 @@ -params = $params; - $this->data = (!isset($data['preset']) && !isset($data['import_products'])) ? $data : []; - $this->customOptions = $this->data; - - if (isset($data['preset'])) { - $this->data = $this->replaceData($this->getPreset($data['preset']), mt_rand()); - $this->customOptions = $this->data; - } - if (isset($data['import_products'])) { - $importData = explode(',', $data['import_products']); - $importCustomOptions = []; - $importProducts = []; - foreach ($importData as $item) { - list($fixture, $dataSet) = explode('::', $item); - $product = $fixtureFactory->createByCode($fixture, ['dataSet' => $dataSet]); - if ($product->hasData('id') !== null) { - $product->persist(); - } - $importCustomOptions = array_merge($importCustomOptions, $product->getCustomOptions()); - $importProducts[] = $product->getSku(); - } - $this->customOptions = array_merge($this->data, $importCustomOptions); - $this->data['import'] = ['options' => $importCustomOptions, 'products' => $importProducts]; - } - } - - /** - * Replace custom options data - * - * @param array $data - * @param int $replace - * @return array - */ - protected function replaceData(array $data, $replace) - { - $result = []; - foreach ($data as $key => $value) { - if (is_array($value)) { - $value = $this->replaceData($value, $replace); - } - $result[$key] = str_replace('%isolation%', $replace, $value); - } - - return $result; - } - - /** - * Persist custom selections products - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return all custom options - * - * @return array - */ - public function getCustomOptions() - { - return $this->customOptions; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * @param string $name - * @return array|null - * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - */ - protected function getPreset($name) - { - $presets = [ - 'drop_down_with_one_option_fixed_price' => [ - [ - 'title' => 'custom option drop down %isolation%', - 'is_require' => 'Yes', - 'type' => 'Select/Drop-down', - 'options' => [ - [ - 'title' => '30 bucks', - 'price' => 30, - 'price_type' => 'Fixed', - 'sku' => 'sku_drop_down_row_1', - ], - ], - ], - ], - 'drop_down_with_one_option_percent_price' => [ - [ - 'title' => 'custom option drop down %isolation%', - 'is_require' => 'Yes', - 'type' => 'Select/Drop-down', - 'options' => [ - [ - 'title' => '40 bucks', - 'price' => 40, - 'price_type' => 'Percent', - 'sku' => 'sku_drop_down_row_1', - ], - ], - ], - ], - 'options-suite' => [ - [ - 'title' => 'Test1 option %isolation%', - 'is_require' => 'Yes', - 'type' => 'Text/Field', - 'options' => [ - [ - 'price' => 120.03, - 'price_type' => 'Fixed', - 'sku' => 'sku1_%isolation%', - 'max_characters' => 45, - ], - ], - ], - [ - 'title' => 'Test2 option %isolation%', - 'is_require' => 'Yes', - 'type' => 'Text/Field', - 'options' => [ - [ - 'price' => 120.03, - 'price_type' => 'Fixed', - 'sku' => 'sku1_%isolation%', - 'max_characters' => 45, - ], - ] - ], - [ - 'title' => 'Test3 option %isolation%', - 'is_require' => 'Yes', - 'type' => 'Select/Drop-down', - 'options' => [ - [ - 'title' => 'Test3-1 %isolation%', - 'price' => 110.01, - 'price_type' => 'Percent', - 'sku' => 'sku2_%isolation%', - ], - [ - 'title' => 'Test3-2 %isolation%', - 'price' => 210.02, - 'price_type' => 'Fixed', - 'sku' => 'sku3_%isolation%' - ], - ] - ], - [ - 'title' => 'Test4 option %isolation%', - 'is_require' => 'Yes', - 'type' => 'Select/Drop-down', - 'options' => [ - [ - 'title' => 'Test1 %isolation%', - 'price' => 10.01, - 'price_type' => 'Percent', - 'sku' => 'sku2_%isolation%', - ], - [ - 'title' => 'Test2 %isolation%', - 'price' => 20.02, - 'price_type' => 'Fixed', - 'sku' => 'sku3_%isolation%' - ], - ] - ], - ], - 'default' => [ - [ - 'title' => 'custom option drop down %isolation%', - 'is_require' => 'Yes', - 'type' => 'Select/Drop-down', - 'options' => [ - [ - 'title' => '10 percent', - 'price' => 10, - 'price_type' => 'Percent', - 'sku' => 'sku_drop_down_row_1', - ], - ], - ], - [ - 'title' => 'custom option drop down2 %isolation%', - 'is_require' => 'Yes', - 'type' => 'Select/Drop-down', - 'options' => [ - [ - 'title' => '20 percent', - 'price' => 20, - 'price_type' => 'Percent', - 'sku' => 'sku_drop_down_row_2', - ], - ] - ], - ], - 'two_options' => [ - [ - 'title' => 'custom option drop down %isolation%', - 'is_require' => 'Yes', - 'type' => 'Select/Drop-down', - 'options' => [ - [ - 'title' => '10 percent', - 'price' => 10, - 'price_type' => 'Percent', - 'sku' => 'sku_drop_down_row_1', - ], - [ - 'title' => '20 percent', - 'price' => 20, - 'price_type' => 'Percent', - 'sku' => 'sku_drop_down_row_2' - ], - ], - ], - [ - 'title' => 'custom option field %isolation%', - 'is_require' => 'Yes', - 'type' => 'Text/Field', - 'options' => [ - [ - 'price' => 10, - 'price_type' => 'Fixed', - 'sku' => 'sku_field_option_%isolation%', - 'max_characters' => 1024, - ], - ] - ], - ], - 'all_types' => [ - [ - 'title' => 'custom option field %isolation%', - 'type' => 'Text/Field', - 'is_require' => 'Yes', - 'options' => [ - [ - 'price' => 10, - 'price_type' => 'Fixed', - 'sku' => 'sku_field_option_%isolation%', - 'max_characters' => 1024, - ], - ], - ], - [ - 'title' => 'custom option Area %isolation%', - 'is_require' => 'Yes', - 'type' => 'Text/Area', - 'options' => [ - [ - 'price' => 10, - 'price_type' => 'Fixed', - 'sku' => 'sku_area_row_%isolation%', - 'max_characters' => '10', - ], - ] - ], - [ - 'title' => 'custom option File %isolation%', - 'is_require' => 'No', - 'type' => 'File/File', - 'options' => [ - [ - 'price' => 10, - 'price_type' => 'Fixed', - 'sku' => 'sku_file_row_%isolation%', - 'file_extension' => 'jpg', - 'image_size_x' => '100', - 'image_size_y' => '100', - ], - ] - ], - [ - 'title' => 'custom option drop down %isolation%', - 'is_require' => 'Yes', - 'type' => 'Select/Drop-down', - 'options' => [ - [ - 'title' => '10 percent', - 'price' => 10, - 'price_type' => 'Percent', - 'sku' => 'sku_drop_down_row_1_%isolation%', - ], - [ - 'title' => '20 percent', - 'price' => 20, - 'price_type' => 'Percent', - 'sku' => 'sku_drop_down_row_2_%isolation%' - ], - [ - 'title' => '30 fixed', - 'price' => 30, - 'price_type' => 'Fixed', - 'sku' => 'sku_drop_down_row_3_%isolation%' - ], - ] - ], - [ - 'title' => 'custom option Radio Buttons %isolation%', - 'is_require' => 'Yes', - 'type' => 'Select/Radio Buttons', - 'options' => [ - [ - 'title' => '20 fixed', - 'price' => 20, - 'price_type' => 'Fixed', - 'sku' => 'sku_radio_buttons_row%isolation%', - ], - ] - ], - [ - 'title' => 'custom option Checkbox %isolation%', - 'is_require' => 'Yes', - 'type' => 'Select/Checkbox', - 'options' => [ - [ - 'title' => '20 fixed', - 'price' => 20, - 'price_type' => 'Fixed', - 'sku' => 'sku_checkbox_row%isolation%', - ], - ] - ], - [ - 'title' => 'custom option Multiple Select %isolation%', - 'is_require' => 'Yes', - 'type' => 'Select/Multiple Select', - 'options' => [ - [ - 'title' => '20 fixed', - 'price' => 20, - 'price_type' => 'Fixed', - 'sku' => 'sku_multiple_select_row%isolation%', - ], - ] - ], - [ - 'title' => 'custom option Date %isolation%', - 'is_require' => 'Yes', - 'type' => 'Date/Date', - 'options' => [ - [ - 'price' => 20, - 'price_type' => 'Fixed', - 'sku' => 'sku_date_row%isolation%', - ], - ] - ], - [ - 'title' => 'custom option Date & Time %isolation%', - 'is_require' => 'Yes', - 'type' => 'Date/Date & Time', - 'options' => [ - [ - 'price' => 20, - 'price_type' => 'Fixed', - 'sku' => 'sku_date_and_time_row%isolation%', - ], - ] - ], - [ - 'title' => 'custom option Time %isolation%', - 'is_require' => 'Yes', - 'type' => 'Date/Time', - 'options' => [ - [ - 'price' => 20, - 'price_type' => 'Fixed', - 'sku' => 'sku_time_row%isolation%', - ], - ] - ], - ], - ]; - if (!isset($presets[$name])) { - return null; - } - return $presets[$name]; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/Fpt.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/Fpt.php deleted file mode 100644 index 8d29bd7bd8bf1..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/Fpt.php +++ /dev/null @@ -1,87 +0,0 @@ -params = $params; - if (isset($data['preset'])) { - $this->data = $this->getPreset($data['preset']); - } - } - - /** - * Persist group price - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Get fpt preset for product fixture - * - * @param string $name - * @return mixed|null - */ - protected function getPreset($name) - { - $presets = [ - 'one_fpt_for_all_states' => [ - [ - 'price' => 10, - 'website' => 'All Websites [USD]', - 'country_name' => 'United States', - 'state_name' => '*', - ], - ], - ]; - if (!isset($presets[$name])) { - return null; - } - return $presets[$name]; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/GroupPriceOptions.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/GroupPriceOptions.php deleted file mode 100644 index 2640e83ddd9bd..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/GroupPriceOptions.php +++ /dev/null @@ -1,113 +0,0 @@ -params = $params; - if (isset($data['preset'])) { - $this->data = $this->getPreset($data['preset']); - } - } - - /** - * Persist group price - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Get preset array - * - * @param string $name - * @return mixed|null - */ - protected function getPreset($name) - { - $presets = [ - 'MAGETWO-23055' => [ - [ - 'price' => 90, - 'website' => 'All Websites [USD]', - 'customer_group' => 'NOT LOGGED IN', - ], - ], - 'MAGETWO-23061' => [ - [ - 'price' => 20, - 'website' => 'All Websites [USD]', - 'customer_group' => 'NOT LOGGED IN', - ], - ], - 'default' => [ - [ - 'price' => 20, - 'website' => 'All Websites [USD]', - 'customer_group' => 'NOT LOGGED IN', - ], - ], - 'tax_calculation' => [ - [ - 'price' => 90.99, - 'website' => 'All Websites [USD]', - 'customer_group' => 'General', - ], - ], - ]; - if (!isset($presets[$name])) { - return null; - } - return $presets[$name]; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/Price.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/Price.php deleted file mode 100644 index 470558b5d4d0b..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/Price.php +++ /dev/null @@ -1,146 +0,0 @@ -params = $params; - $this->data = (!isset($data['preset']) && !isset($data['value'])) ? $data : []; - - if (isset($data['value'])) { - $this->data = $data['value']; - if (is_array($this->data)) { - $this->data = array_filter( - $this->data, - function ($value) { - return $value !== '-'; - } - ); - } - } - if (isset($data['preset'])) { - $this->currentPreset = $data['preset']; - } - } - - /** - * Persist custom selections products - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * @return array|null - */ - public function getPreset() - { - $presets = [ - 'drop_down_with_one_option_fixed_price' => [ - 'category_price' => '100.00', - 'product_price' => '100.00', - 'cart_price' => '130.00', - ], - 'drop_down_with_one_option_percent_price' => [ - 'category_price' => '100.00', - 'product_price' => '100.00', - 'cart_price' => '140.00', - ], - 'MAGETWO-23029' => [ - 'category_price' => '100.00', - 'category_special_price' => '90.00', - 'product_price' => '100.00', - 'product_special_price' => '90.00', - 'cart_price' => '120.00', - ], - 'MAGETWO-23030' => [ - 'category_price' => '100.00', - 'category_special_price' => '90.00', - 'product_price' => '100.00', - 'product_special_price' => '90.00', - 'cart_price' => '126.00', - ], - 'MAGETWO-23036' => [ - 'category_price' => '100.00', - 'category_special_price' => '90.00', - 'product_price' => '100.00', - 'product_special_price' => '90.00', - 'cart_price' => '90.00', - ], - ]; - if (!isset($presets[$this->currentPreset])) { - return null; - } - return $presets[$this->currentPreset]; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/RelatedProducts.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/RelatedProducts.php deleted file mode 100644 index ccb66fbfb3359..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/RelatedProducts.php +++ /dev/null @@ -1,16 +0,0 @@ -params = $params; - if (isset($data['preset'])) { - $this->data = $this->getPreset($data['preset']); - } - } - - /** - * Persist group price - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * @param string $name - * @return mixed|null - */ - protected function getPreset($name) - { - $presets = [ - 'default' => [ - [ - 'price' => 15, - 'website' => 'All Websites [USD]', - 'price_qty' => 3, - 'customer_group' => 'ALL GROUPS', - ], - [ - 'price' => 24, - 'website' => 'All Websites [USD]', - 'price_qty' => 15, - 'customer_group' => 'ALL GROUPS' - ], - ], - 'MAGETWO-23002' => [ - [ - 'price' => 90, - 'website' => 'All Websites [USD]', - 'price_qty' => 2, - 'customer_group' => 'ALL GROUPS', - ], - ], - ]; - - if (!isset($presets[$name])) { - return null; - } - return $presets[$name]; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/UpSellProducts.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/UpSellProducts.php deleted file mode 100644 index 887125967f75c..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/UpSellProducts.php +++ /dev/null @@ -1,16 +0,0 @@ - - - - Test virtual product %isolation% - test_virtual_sku_%isolation% - - 100.00 - - - 10.00 - In Stock - - Yes - - - virtual - - virtual - 4 - - product - - - Yes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Use config - - - Test virtual product %isolation% - - - - - - - - - - - - Block after Info Column - - - - - - - 100 - - - - - 10 - In Stock - - - - - - - sku_test_virtual_product_%isolation% - - - - - - - - - - - - - - - - - - - - - Product online - - - Taxable Goods - - - - - - - - - - - - - - - - - - - - - Catalog, Search - - - - - - - - - - - Main Website - - - - - - - + + + virtual + + virtual + 4 + + product + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual/CheckoutData.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual/CheckoutData.php deleted file mode 100644 index bb1ba27ff3bcf..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual/CheckoutData.php +++ /dev/null @@ -1,51 +0,0 @@ - [ - 'qty' => 1, - ], - 'product_50_dollar' => [ - 'qty' => 1, - 'cartItem' => [ - 'price' => 50, - 'qty' => 1, - 'subtotal' => 50, - ], - ], - 'order_custom_price' => [ - 'qty' => 3, - 'checkout_data' => [ - 'use_custom_price' => "Yes", - 'custom_price' => 100, - ], - ], - 'order_big_qty' => [ - 'qty' => 900, - ], - ]; - return isset($presets[$name]) ? $presets[$name] : null; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.xml index 9ea63b5e3616f..2a973efeac3d2 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.xml @@ -6,80 +6,38 @@ */ --> - - - Category%isolation% - category%isolation% - Yes - Yes - - default_category - - - - - - - 0 - - - 0 - - - - - - 2 - - - - - - - - - Default Category - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - Category%isolation% - - - Yes - - - - category%isolation% - - - Yes - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/CategoryProducts.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/CategoryProducts.php index 1230c6c96549b..88ac5ece79d53 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/CategoryProducts.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/CategoryProducts.php @@ -6,36 +6,21 @@ namespace Magento\Catalog\Test\Fixture\Category; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; /** - * Class CategoryProducts - * Prepare products + * Prepare products. */ -class CategoryProducts implements FixtureInterface +class CategoryProducts extends DataSource { /** - * Prepared dataSet data - * - * @var array|null - */ - protected $data; - - /** - * Return products + * Return products. * * @var array */ protected $products = []; - /** - * Fixture params - * - * @var array - */ - protected $params; - /** * @constructor * @param FixtureFactory $fixtureFactory @@ -45,11 +30,11 @@ class CategoryProducts implements FixtureInterface public function __construct(FixtureFactory $fixtureFactory, array $params, $data = []) { $this->params = $params; - if (!empty($data['dataSet']) && $data['dataSet'] !== '-') { - $dataSet = array_map('trim', explode(',', $data['dataSet'])); - foreach ($dataSet as $value) { + if (!empty($data['dataset']) && $data['dataset'] !== '-') { + $dataset = array_map('trim', explode(',', $data['dataset'])); + foreach ($dataset as $value) { $explodeValue = explode('::', $value); - $product = $fixtureFactory->createByCode($explodeValue[0], ['dataSet' => $explodeValue[1]]); + $product = $fixtureFactory->createByCode($explodeValue[0], ['dataset' => $explodeValue[1]]); if (!$product->getId()) { $product->persist(); } @@ -60,40 +45,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, $data } /** - * Persist attribute options - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string|null $key [optional] - * @return array|null - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Return products + * Return products. * * @return array */ diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/LandingPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/LandingPage.php index 22ac44c8c5e55..fcab7554227ca 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/LandingPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/LandingPage.php @@ -6,22 +6,15 @@ namespace Magento\Catalog\Test\Fixture\Category; +use Magento\Mtf\Fixture\DataSource; use Magento\Cms\Test\Fixture\CmsBlock; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; /** * Prepare landing page. */ -class LandingPage implements FixtureInterface +class LandingPage extends DataSource { - /** - * Prepared dataSet data. - * - * @var string - */ - protected $data; - /** * Source Cms Block. * @@ -29,13 +22,6 @@ class LandingPage implements FixtureInterface */ protected $cmsBlock = null; - /** - * Fixture params. - * - * @var array - */ - protected $params; - /** * @constructor * @param FixtureFactory $fixtureFactory @@ -47,9 +33,9 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, $data $this->params = $params; $this->data = $data; - if (isset($data['preset'])) { + if (isset($data['dataset'])) { /** @var CmsBlock $cmsBlock */ - $cmsBlock = $fixtureFactory->createByCode('cmsBlock', ['dataSet' => $data['preset']]); + $cmsBlock = $fixtureFactory->createByCode('cmsBlock', ['dataset' => $data['dataset']]); if (!$cmsBlock->getBlockId()) { $cmsBlock->persist(); } @@ -59,39 +45,6 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, $data } } - /** - * Persist source. - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set. - * - * @param string|null $key [optional] - * @return array|null - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings. - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - /** * Return Cms Block. * diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/ParentId.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/ParentId.php index 7075706983b99..17a37eef163e4 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/ParentId.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category/ParentId.php @@ -6,30 +6,22 @@ namespace Magento\Catalog\Test\Fixture\Category; -use Magento\Catalog\Test\Fixture\Category; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Catalog\Test\Fixture\Category; /** - * Class ParentId - * Prepare parent category + * Prepare parent category. */ -class ParentId implements FixtureInterface +class ParentId extends DataSource { /** - * Return category + * Return category. * * @var Category */ protected $parentCategory = null; - /** - * Fixture params - * - * @var array - */ - protected $params; - /** * @constructor * @param FixtureFactory $fixtureFactory @@ -39,8 +31,8 @@ class ParentId implements FixtureInterface public function __construct(FixtureFactory $fixtureFactory, array $params, $data = []) { $this->params = $params; - if (isset($data['dataSet']) && $data['dataSet'] !== '-') { - $this->parentCategory = $fixtureFactory->createByCode('category', ['dataSet' => $data['dataSet']]); + if (isset($data['dataset']) && $data['dataset'] !== '-') { + $this->parentCategory = $fixtureFactory->createByCode('category', ['dataset' => $data['dataset']]); if (!$this->parentCategory->hasData('id')) { $this->parentCategory->persist(); } @@ -51,40 +43,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, $data } /** - * Persist attribute options - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string|null $key - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Return entity + * Return entity. * * @return Category */ diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/AttributeSetId.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/AttributeSetId.php similarity index 56% rename from dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/AttributeSetId.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/AttributeSetId.php index 798cb76ead304..9a314c06e7d28 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/AttributeSetId.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/AttributeSetId.php @@ -4,36 +4,30 @@ * See COPYING.txt for license details. */ -namespace Magento\Catalog\Test\Fixture\CatalogProductSimple; +namespace Magento\Catalog\Test\Fixture\Product; -use Magento\Catalog\Test\Fixture\CatalogAttributeSet; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Catalog\Test\Fixture\CatalogAttributeSet; /** - * Class AttributeSetId + * Product template entity data source. * * Data keys: - * - dataSet + * - dataset * - attribute_set */ -class AttributeSetId implements FixtureInterface +class AttributeSetId extends DataSource { /** - * Attribute Set name - * - * @var string - */ - protected $data; - - /** - * Attribute Set fixture + * Attribute Set fixture. * * @var CatalogAttributeSet */ protected $attributeSet; /** + * @constructor * @param FixtureFactory $fixtureFactory * @param array $params * @param array $data @@ -41,9 +35,9 @@ class AttributeSetId implements FixtureInterface public function __construct(FixtureFactory $fixtureFactory, array $params, $data = []) { $this->params = $params; - if (isset($data['dataSet']) && $data['dataSet'] !== '-') { + if (isset($data['dataset'])) { /** @var CatalogAttributeSet $attributeSet */ - $attributeSet = $fixtureFactory->createByCode('catalogAttributeSet', ['dataSet' => $data['dataSet']]); + $attributeSet = $fixtureFactory->createByCode('catalogAttributeSet', ['dataset' => $data['dataset']]); if (!$attributeSet->hasData('attribute_set_id')) { $attributeSet->persist(); } @@ -51,7 +45,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, $data if (isset($data['attribute_set']) && $data['attribute_set'] instanceof CatalogAttributeSet) { $attributeSet = $data['attribute_set']; } - if (!isset($data['dataSet']) && !isset($data['attribute_set'])) { + if (!isset($data['dataset']) && !isset($data['attribute_set'])) { $this->data = $data; } else { /** @var CatalogAttributeSet $attributeSet */ @@ -61,30 +55,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, $data } /** - * Persist attribute options - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string|null $key - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return Attribute Set fixture + * Return Attribute Set fixture. * * @return CatalogAttributeSet */ @@ -92,14 +63,4 @@ public function getAttributeSet() { return $this->attributeSet; } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CategoryIds.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/CategoryIds.php old mode 100755 new mode 100644 similarity index 63% rename from dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CategoryIds.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/CategoryIds.php index 7742361674d6f..3eda80caa7c3e --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CategoryIds.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/CategoryIds.php @@ -4,25 +4,17 @@ * See COPYING.txt for license details. */ -namespace Magento\Catalog\Test\Fixture\CatalogProductSimple; +namespace Magento\Catalog\Test\Fixture\Product; -use Magento\Catalog\Test\Fixture\Category; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Catalog\Test\Fixture\Category; /** - * Class CategoryIds - * Create and return Category + * Create and return Category. */ -class CategoryIds implements FixtureInterface +class CategoryIds extends DataSource { - /** - * Names and Ids of the created categories - * - * @var array - */ - protected $data; - /** * Fixtures of category * @@ -46,7 +38,7 @@ public function __construct( $this->params = $params; if (!empty($data['category']) - && empty($data['presets']) + && empty($data['dataset']) && $data['category'] instanceof Category ) { /** @var Category $category */ @@ -56,14 +48,14 @@ public function __construct( } $this->data[] = $category->getName(); $this->categories[] = $category; - } elseif (isset($data['presets'])) { - $presets = explode(',', $data['presets']); - foreach ($presets as $preset) { - if (trim($preset) == '-') { + } elseif (isset($data['dataset'])) { + $datasets = explode(',', $data['dataset']); + foreach ($datasets as $dataset) { + if (trim($dataset) == '-') { $this->data[] = ''; continue; } - $category = $fixtureFactory->createByCode('category', ['dataSet' => $preset]); + $category = $fixtureFactory->createByCode('category', ['dataset' => $dataset]); if (!isset($data['new_category']) || $data['new_category'] !== 'yes') { $category->persist(); } @@ -75,39 +67,6 @@ public function __construct( } } - /** - * Persist custom selections products - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string|null $key - * @return array - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - /** * Return category array * diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/CustomOptions.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/CustomOptions.php new file mode 100644 index 0000000000000..4d677778a4b60 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/CustomOptions.php @@ -0,0 +1,98 @@ +params = $params; + $this->data = (!isset($data['dataset']) && !isset($data['import_products'])) ? $data : []; + $this->customOptions = $this->data; + + if (isset($data['dataset']) && isset($this->params['repository'])) { + $this->data = $repositoryFactory->get($this->params['repository'])->get($data['dataset']); + $this->data = $this->replaceData($this->data, mt_rand()); + $this->customOptions = $this->data; + } + if (isset($data['import_products'])) { + $importData = explode(',', $data['import_products']); + $importCustomOptions = []; + $importProducts = []; + foreach ($importData as $item) { + list($fixture, $dataset) = explode('::', $item); + $product = $fixtureFactory->createByCode($fixture, ['dataset' => $dataset]); + if ($product->hasData('id') !== null) { + $product->persist(); + } + $importCustomOptions = array_merge($importCustomOptions, $product->getCustomOptions()); + $importProducts[] = $product->getSku(); + } + $this->customOptions = array_merge($this->data, $importCustomOptions); + $this->data['import'] = ['options' => $importCustomOptions, 'products' => $importProducts]; + } + } + + /** + * Replace custom options data. + * + * @param array $data + * @param int $replace + * @return array + */ + protected function replaceData(array $data, $replace) + { + $result = []; + foreach ($data as $key => $value) { + if (is_array($value)) { + $value = $this->replaceData($value, $replace); + } + $result[$key] = str_replace('%isolation%', $replace, $value); + } + + return $result; + } + + /** + * Return all custom options. + * + * @return array + */ + public function getCustomOptions() + { + return $this->customOptions; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/Price.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/Price.php new file mode 100644 index 0000000000000..7827c33370301 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/Price.php @@ -0,0 +1,65 @@ +params = $params; + $this->data = (!isset($data['dataset']) && !isset($data['value'])) ? $data : null; + + if (isset($data['value'])) { + $this->data = $data['value']; +// if (is_array($this->data)) { +// $this->data = array_filter( +// $this->data, +// function ($value) { +// return $value !== '-'; +// } +// ); +// } + } + + if (isset($data['dataset']) && isset($this->params['repository'])) { + $this->priceData = $repositoryFactory->get($this->params['repository'])->get($data['dataset']); + } + } + + /** + * Get price data for different pages. + * + * @return array|null + */ + public function getPriceData() + { + return $this->priceData; + } +} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/AbstractRelatedProducts.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/RelatedProducts.php similarity index 52% rename from dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/AbstractRelatedProducts.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/RelatedProducts.php index fbe47d82bdf68..3aada24483b40 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/AbstractRelatedProducts.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/RelatedProducts.php @@ -4,31 +4,18 @@ * See COPYING.txt for license details. */ -namespace Magento\Catalog\Test\Fixture\CatalogProductSimple; +namespace Magento\Catalog\Test\Fixture\Product; -use Magento\Catalog\Test\Fixture\CatalogProductSimple; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Mtf\Repository\RepositoryFactory; +use Magento\Catalog\Test\Fixture\CatalogProductSimple; /** * Base class for create related products. */ -class AbstractRelatedProducts implements FixtureInterface +class RelatedProducts extends DataSource { - /** - * Data set configuration settings. - * - * @var array - */ - protected $params; - - /** - * Data of the created products. - * - * @var array - */ - protected $data = []; - /** * Products fixture. * @@ -38,19 +25,24 @@ class AbstractRelatedProducts implements FixtureInterface /** * @constructor + * @param RepositoryFactory $repositoryFactory * @param FixtureFactory $fixtureFactory * @param array $params * @param array $data [optional] */ - public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = []) - { + public function __construct( + RepositoryFactory $repositoryFactory, + FixtureFactory $fixtureFactory, + array $params, + array $data = [] + ) { $this->params = $params; - if (isset($data['presets'])) { - $presets = array_map('trim', explode(',', $data['presets'])); - foreach ($presets as $preset) { - list($fixtureCode, $dataSet) = explode('::', $preset); - $this->products[] = $fixtureFactory->createByCode($fixtureCode, ['dataSet' => $dataSet]); + if (isset($data['dataset']) && isset($this->params['repository'])) { + $datasets = $repositoryFactory->get($this->params['repository'])->get($data['dataset']); + foreach ($datasets as $dataset) { + list($fixtureCode, $dataset) = explode('::', $dataset); + $this->products[] = $fixtureFactory->createByCode($fixtureCode, ['dataset' => $dataset]); } } if (isset($data['products'])) { @@ -75,39 +67,6 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array } } - /** - * Persist related products. - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set. - * - * @param string|null $key - * @return array - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings. - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - /** * Return related products. * diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TaxClass.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/TaxClass.php similarity index 72% rename from dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TaxClass.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/TaxClass.php index 7bc605d82acca..c471725a5f02c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/TaxClass.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/TaxClass.php @@ -4,48 +4,47 @@ * See COPYING.txt for license details. */ -namespace Magento\Catalog\Test\Fixture\CatalogProductSimple; +namespace Magento\Catalog\Test\Fixture\Product; -use Magento\Tax\Test\Fixture\TaxClass as FixtureTaxClass; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Util\Protocol\CurlInterface; use Magento\Mtf\Util\Protocol\CurlTransport; +use Magento\Tax\Test\Fixture\TaxClass as FixtureTaxClass; use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** - * Class TaxClass + * Taz class data source. * * Data keys: - * - dataSet + * - dataset * - tax_product_class */ -class TaxClass implements FixtureInterface +class TaxClass extends DataSource { /** - * Tax class id + * Tax class id. * * @var int */ protected $taxClassId; /** - * Tax class name + * Tax class name. * * @var string */ protected $data = 'None'; /** - * Tax class fixture + * Tax class fixture. * * @var \Magento\Tax\Test\Fixture\TaxClass */ protected $taxClass; /** - * Constructor - * + * @constructor * @param FixtureFactory $fixtureFactory * @param array $params * @param array|string $data @@ -53,13 +52,13 @@ class TaxClass implements FixtureInterface public function __construct(FixtureFactory $fixtureFactory, array $params, $data = []) { $this->params = $params; - if ((!isset($data['dataSet']) && !isset($data['tax_product_class']))) { + if ((!isset($data['dataset']) && !isset($data['tax_product_class']))) { $this->data = $data; return; } - if (isset($data['dataSet'])) { - $this->taxClass = $fixtureFactory->createByCode('taxClass', ['dataSet' => $data['dataSet']]); + if (isset($data['dataset'])) { + $this->taxClass = $fixtureFactory->createByCode('taxClass', ['dataset' => $data['dataset']]); $this->data = $this->taxClass->getClassName(); if (!$this->taxClass->hasData('id')) { $this->taxClass->persist(); @@ -79,7 +78,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, $data } /** - * Set tax class id + * Set tax class id. * * @param string $taxClassName * @return void @@ -104,40 +103,7 @@ protected function setTaxClassId($taxClassName) } /** - * Persist custom selections tax classes - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string|null $key - * @return string - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Return tax class fixture + * Return tax class fixture. * * @return FixtureTaxClass */ @@ -147,7 +113,7 @@ public function getTaxClass() } /** - * Return tax class id + * Return tax class id. * * @return int */ diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/ProductAttribute.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/ProductAttribute.php deleted file mode 100644 index a738e51b8874f..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/ProductAttribute.php +++ /dev/null @@ -1,204 +0,0 @@ -getData('fields/frontend_label/value'); - } - - /** - * Get attribute code - * - * @return string - */ - public function getAttributeCode() - { - return $this->getData('fields/attribute_code/value'); - } - - /** - * Get attribute option ids - * - * @return array - */ - public function getOptionIds() - { - return $this->getData('fields/option_ids'); - } - - /** - * Get attribute options labels - * - * @return array - */ - public function getOptionLabels() - { - $options = $this->getOptions(); - $optionsLabels = []; - foreach ($options as $option) { - $optionsLabels[] = $option['label']['value']; - } - return $optionsLabels; - } - - /** - * Get attribute options - * - * @return array - */ - public function getOptions() - { - $options = $this->getData('options/value'); - return is_array($options) ? $options : []; - } - - /** - * Get attribute id - * - * @return string - */ - public function getAttributeId() - { - return $this->getData('fields/attribute_id/value'); - } - - /** - * Save Attribute into Magento - */ - public function persist() - { - $attributeIds = Factory::getApp()->magentoCatalogCreateProductAttribute($this); - $this->_data['fields']['attribute_id']['value'] = $attributeIds['attributeId']; - $this->_data['fields']['option_ids'] = $attributeIds['optionIds']; - - return $this; - } - - /** - * {inheritdoc} - * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - */ - protected function _initData() - { - $this->_data = [ - 'fields' => [ - 'attribute_code' => [ - 'value' => 'attribute_code_%isolation%', - 'group' => self::GROUP_PRODUCT_ATTRIBUTE_MAIN, - ], - 'frontend_label' => [ - 'value' => 'Attribute %isolation%', - 'input_name' => 'frontend_label[0]', - 'group' => self::GROUP_PRODUCT_ATTRIBUTE_MAIN, - ], - 'frontend_input' => [ - 'value' => 'Dropdown', - 'input' => 'select', - 'input_value' => 'select', - 'group' => self::GROUP_PRODUCT_ATTRIBUTE_MAIN, - ], - 'is_searchable' => [ - 'value' => 'Yes', - 'input' => 'select', - 'input_value' => 1, - 'group' => self::GROUP_PRODUCT_ATTRIBUTE_FRONT, - ], - 'is_visible_in_advanced_search' => [ - 'value' => 'Yes', - 'input' => 'select', - 'input_value' => 1, - 'group' => self::GROUP_PRODUCT_ATTRIBUTE_FRONT, - ], - 'is_comparable' => [ - 'value' => 'Yes', - 'input' => 'select', - 'input_value' => 1, - 'group' => self::GROUP_PRODUCT_ATTRIBUTE_FRONT, - ], - 'is_filterable' => [ - 'value' => 'Filterable (with results)', - 'input' => 'select', - 'input_value' => 1, - 'group' => self::GROUP_PRODUCT_ATTRIBUTE_FRONT, - ], - 'is_visible_on_front' => [ - 'value' => 'Yes', - 'input' => 'select', - 'input_value' => 1, - 'group' => self::GROUP_PRODUCT_ATTRIBUTE_FRONT, - ], - 'is_filterable_in_search' => [ - 'value' => 'Yes', - 'input' => 'select', - 'input_value' => 1, - 'group' => self::GROUP_PRODUCT_ATTRIBUTE_FRONT, - ], - ], - 'options' => [ - 'value' => [ - 'option_1' => [ - 'label' => [ - 'value' => 'Option 1 %isolation%', - 'input_name' => 'option[value][option_0][0]', - 'selector' => '//*[@id="manage-options-panel"]/table/tbody/tr[1]/td[3]/input', - 'strategy' => Locator::SELECTOR_XPATH, - ], - 'default' => [ - 'value' => 'Yes', - 'input' => 'checkbox', - 'input_name' => 'default[0]', - 'input_value' => 'option_0', - 'selector' => '//*[@id="manage-options-panel"]/table/tbody/tr[1]/td[2]/input', - 'strategy' => Locator::SELECTOR_XPATH, - ], - ], - 'option_2' => [ - 'label' => [ - 'value' => 'Option 2 %isolation%', - 'input_name' => 'option[value][option_1][0]', - 'selector' => '//*[@id="manage-options-panel"]/table/tbody/tr[2]/td[3]/input', - 'strategy' => Locator::SELECTOR_XPATH, - ], - 'default' => [ - 'value' => 'No', - 'input' => 'checkbox', - 'input_name' => 'default[1]', - 'input_value' => 'option_1', - 'selector' => '//*[@id="manage-options-panel"]/table/tbody/tr[2]/td[2]/input', - 'strategy' => Locator::SELECTOR_XPATH, - ], - ], - ], - ], - ]; - $this->_repository = Factory::getRepositoryFactory() - ->getMagentoCatalogProductAttribute($this->_dataConfig, $this->_data); - } -} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProductAttribute.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProductAttribute.php deleted file mode 100644 index 632de082cfe61..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/Curl/CreateProductAttribute.php +++ /dev/null @@ -1,121 +0,0 @@ -_configuration); - $curl->write(CurlInterface::POST, $url, '1.0', [], $this->getPostParams($fixture)); - $response = $curl->read(); - $curl->close(); - - $id = null; - if (preg_match('!catalog/product_attribute/save/attribute_id/(\d+)/active_tab/main/!', $response, $matches)) { - $id = $matches[1]; - } - - $optionIds = []; - if (preg_match_all( - '!attributeOption\.add\({"checked":"(.?)*","intype":"radio","id":"(\d+)"!', - $response, - $matches - )) { - $optionIds = $matches[2]; - } - - return ['attributeId' => $id, 'optionIds' => $optionIds]; - } - - /** - * Get data for curl POST params - * - * @param ProductAttribute $fixture - * @return array - */ - protected function getPostParams(ProductAttribute $fixture) - { - $data = $this->prepareParams($fixture->getData('fields')); - $options = $fixture->getOptions(); - foreach ($options as $option) { - $data = array_merge($data, $this->prepareParams($option)); - } - return $data; - } - - /** - * Prepare data for curl POST params - * - * @param array $fields - * @return array - */ - protected function prepareParams(array $fields) - { - $data = []; - foreach ($fields as $key => $field) { - $value = $this->getParamValue($field); - - if (null === $value) { - continue; - } - - $_key = $this->getFieldKey($field); - if (null === $_key) { - $_key = $key; - } - $data[$_key] = $value; - } - return $data; - } - - /** - * Return key for request - * - * @param array $data - * @return null|string - */ - protected function getFieldKey(array $data) - { - return isset($data['input_name']) ? $data['input_name'] : null; - } - - /** - * Return value for request - * - * @param array $data - * @return null|string - */ - protected function getParamValue(array $data) - { - if (array_key_exists('input_value', $data)) { - return $data['input_value']; - } - - if (array_key_exists('value', $data)) { - return $data['value']; - } - return null; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogAttributeSet.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogAttributeSet.xml index 2ae408622b112..3d89c92046b04 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogAttributeSet.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogAttributeSet.xml @@ -15,17 +15,17 @@ Custom_attribute_set%isolation% - default + default Custom_attribute_set%isolation% - default + default - attribute_type_fpt + attribute_type_fpt diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductAttribute.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductAttribute.xml index 0562055a8c5ad..82f92677fd218 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductAttribute.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductAttribute.xml @@ -7,6 +7,12 @@ --> + + attribute_label%isolation% + Text Field + No + + attribute_text%isolation% attribute_text%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductAttribute/Options.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductAttribute/Options.xml new file mode 100644 index 0000000000000..38ec9a7268549 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductAttribute/Options.xml @@ -0,0 +1,26 @@ + + + + + + + Yes + blue + + + + + + black + + + white + + + + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.xml index c4ae2d72fde4d..328c932717e73 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.xml @@ -9,7 +9,7 @@ - default + default Simple Product %isolation% sku_simple_product_%isolation% @@ -21,10 +21,9 @@ 560 - - - taxable_goods + taxable_goods Main Website @@ -32,13 +31,13 @@ Catalog, Search simple-product-%isolation% - order_default + simple_order_default - default + default product_10_dollar %isolation% sku_product_10_dollar_%isolation% @@ -50,10 +49,9 @@ 10 - - - taxable_goods + taxable_goods Main Website @@ -61,13 +59,13 @@ Catalog, Search product-10-dollar-%isolation% - order_10_dollar_product + simple_order_10_dollar_product - default + default product_20_dollar %isolation% sku_product_20_dollar_%isolation% @@ -81,7 +79,7 @@ 20 - taxable_goods + taxable_goods Main Website @@ -102,20 +100,19 @@ simple-product-%isolation% 560 - - Main Website Catalog, Search - order_default + simple_order_default - default + default Simple Product %isolation% sku_simple_product_%isolation% @@ -126,10 +123,9 @@ 560 - - - taxable_goods + taxable_goods Main Website @@ -137,13 +133,13 @@ Catalog, Search simple-product-%isolation% - order_big_qty + simple_order_big_qty - default + default Simple Product %isolation% sku_simple_product_%isolation% @@ -154,10 +150,9 @@ 560 - - - taxable_goods + taxable_goods Main Website @@ -165,7 +160,7 @@ Catalog, Search simple-product-%isolation% - order_custom_price + simple_order_custom_price @@ -179,18 +174,17 @@ 1 - default + default 100 - - Main Website simple-product-%isolation% - two_products + simple_two_products @@ -204,11 +198,10 @@ 1 - default + default 40 - - product_40_dollar simple-product-%isolation% @@ -221,7 +214,7 @@ MAGETWO-23036_%isolation% simple_with_category %isolation% - default + default simple @@ -231,10 +224,10 @@ 1 100 - MAGETWO-23036 + MAGETWO-23036 - default_subcategory + default_subcategory simple_with_category @@ -252,14 +245,14 @@ 1 - default + default 100 - + - default_subcategory + default_subcategory Main Website @@ -274,11 +267,11 @@ simple_product_without_category_%isolation% 1 - default + default 100 - + Main Website @@ -287,7 +280,7 @@ - default + default simple @@ -298,7 +291,7 @@ sku_simple_product_%isolation% 100 - + 100 @@ -306,7 +299,7 @@ simple-product-%isolation% - default_subcategory + default_subcategory @@ -315,13 +308,12 @@ simple_for_composite_products%isolation% 560 - - - default + default - taxable_goods + taxable_goods 111 @@ -343,13 +335,13 @@ - default + default Simple Product %isolation% sku_simple_product_%isolation% 50 - + 50 @@ -357,7 +349,7 @@ simple-product-%isolation% - default_subcategory + default_subcategory @@ -365,15 +357,15 @@ simple_product_with_special_price_and_category%isolation% Simple product with special price and category %isolation% - default + default 100 - + 90 - default_subcategory + default_subcategory Main Website @@ -385,11 +377,11 @@ simple_product_with_special_price_and_category%isolation% Simple with Special Price 1$ off %isolation% - default + default 10 - + 9 @@ -397,7 +389,7 @@ simple-product-%isolation% - order_special_price + simple_order_special_price @@ -406,10 +398,9 @@ adc_123 100 - - - None + None 666 @@ -430,10 +421,9 @@ adc_123 100 - - - None + None 666 @@ -454,10 +444,9 @@ adc_123 100 - - - None + None 666 @@ -478,10 +467,9 @@ abc_dfj 50 - - - taxable_goods + taxable_goods 666 @@ -502,7 +490,7 @@ product_100_dollar%isolation% product_100_dollar%isolation% - default + default simple @@ -512,7 +500,6 @@ 1 100 - - Main Website @@ -523,13 +510,12 @@ simple - default + default Simple Product %isolation% sku_simple_product_%isolation% 100 - - 1 simple-product-%isolation% @@ -539,17 +525,16 @@ simple - default + default Simple Product %isolation% sku_simple_product_%isolation% 100 - - 1 - default + not_logged_in_20 simple-product-%isolation% @@ -557,20 +542,19 @@ simple - default + default Simple Product %isolation% sku_simple_product_%isolation% 100 - - 1 - tax_calculation + general_90_99 - default_subcategory + default_subcategory Main Website @@ -581,17 +565,16 @@ simple - default + default Simple Product %isolation% sku_simple_product_%isolation% 300 - - 1 - default + default simple-product-%isolation% @@ -599,20 +582,19 @@ simple - default + default Simple Product %isolation% sku_simple_product_%isolation% 300 - - 1 - default + default - default_subcategory + default_subcategory Main Website @@ -623,50 +605,48 @@ simple - default + default Simple Product %isolation% sku_simple_product_%isolation% 300 - - 1 Main Website - two_options + two_options simple-product-%isolation% - with_two_custom_option + simple_with_two_custom_option simple - default + default Simple Product %isolation% sku_simple_product_%isolation% 300 - - 1 - drop_down_with_one_option_percent_price + drop_down_with_one_option_percent_price - drop_down_with_one_option_percent_price + simple_drop_down_with_one_option_percent_price Main Website - default_subcategory + default_subcategory simple-product-%isolation% @@ -674,18 +654,17 @@ simple - default + default Simple Product With Custom Option %isolation% sku_simple_product_%isolation% 300 - - 1 simple-product-%isolation% - all_types + all_types @@ -703,11 +682,10 @@ 1 - default + default 100 - - Main Website @@ -717,7 +695,7 @@ - default + default Simple Product out of stock %isolation% sku_simple_product_out_of_stock%isolation% @@ -728,24 +706,23 @@ 560 - - - taxable_goods + taxable_goods Main Website Catalog, Search - order_default + simple_order_default simple-product-%isolation% - default + default Simple Product offline %isolation% sku_simple_product_offline_%isolation% @@ -756,17 +733,16 @@ 560 - - - taxable_goods + taxable_goods Main Website Catalog, Search - order_default + simple_order_default Product offline simple-product-%isolation% @@ -774,7 +750,7 @@ - default + default Simple Product not visible %isolation% sku_simple_product_not_visible_%isolation% @@ -785,24 +761,23 @@ 560 - - - taxable_goods + taxable_goods Main Website Not Visible Individually - order_default + simple_order_default simple-product-%isolation% - default + default Simple Product with cart limit %isolation% sku_simple_product_with_cart_limit_%isolation% @@ -813,17 +788,16 @@ 560 - - - taxable_goods + taxable_goods Main Website Catalog, Search - order_default + simple_order_default 2 @@ -835,20 +809,19 @@ simple - default + default Simple Product %isolation% sku_simple_product_%isolation% 300 - - 1 - drop_down_with_one_option_percent_price + drop_down_with_one_option_percent_price - drop_down_with_one_option_percent_price + simple_drop_down_with_one_option_percent_price simple-product-%isolation% @@ -858,7 +831,7 @@ - default + default Simple Product with qty increments %isolation% sku_simple_product_with_qty_increments_%isolation% @@ -869,17 +842,16 @@ 560 - - - taxable_goods + taxable_goods Main Website Catalog, Search - order_default + simple_order_default Yes @@ -891,13 +863,12 @@ simple - default + default Simple Product %isolation% sku_simple_product_%isolation% 300 - - 1 @@ -906,7 +877,7 @@ simple-product-%isolation% - default + default Main Website @@ -922,14 +893,14 @@ 1 - default + default 100 - + - default_anchor_subcategory + default_anchor_subcategory Main Website @@ -941,10 +912,10 @@ simple - default + default - default_subcategory + default_subcategory Main Website @@ -953,28 +924,27 @@ sku_simple_product_%isolation% 70 - - 1 - drop_down_with_one_option_fixed_price + drop_down_with_one_option_fixed_price - drop_down_with_one_option_fixed_price + simple_drop_down_with_one_option_fixed_price simple-product-%isolation% - one_fpt_for_all_states + one_fpt_for_all_states simple - default + default - default_subcategory + default_subcategory Main Website @@ -983,19 +953,18 @@ sku_simple_product_%isolation% 110 - - 100 1 simple-product-%isolation% - one_fpt_for_all_states + one_fpt_for_all_states - default + default Simple Product %isolation% sku_simple_product_%isolation% @@ -1007,23 +976,22 @@ 10 - - - taxable_goods + taxable_goods Main Website Catalog, Search - order_default + simple_order_default No - default_subcategory + default_subcategory diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple/CheckoutData.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple/CheckoutData.xml new file mode 100644 index 0000000000000..53227bff53859 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple/CheckoutData.xml @@ -0,0 +1,140 @@ + + + + + + + + + attribute_key_0 + option_key_0 + + + attribute_key_1 + Content option %isolation% + + + + 1 + + 340 + 1 + 340 + + + + + + + + attribute_key_0 + option_key_1 + + + attribute_key_1 + Content option %isolation% + + + + 2 + + 370 + 74 + + + + + + + + attribute_key_0 + Field value 1 %isolation% + + + attribute_key_1 + Field value 2 %isolation% + + + attribute_key_2 + option_key_1 + + + attribute_key_3 + option_key_0 + + + + + + + + + + attribute_key_0 + option_key_0 + + + + + + + + + + attribute_key_0 + option_key_0 + + + + + + + 1 + + 560 + 560 + + + + + 2 + + 100 + 200 + + + + + 900 + + + + 3 + + Yes + 100 + + + + + 1 + + 9 + 9 + + + + + 1 + + 10 + 10 + + + + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple/Price.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple/Price.xml new file mode 100644 index 0000000000000..8b700e37456f3 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple/Price.xml @@ -0,0 +1,46 @@ + + + + + + 100.00 + 100.00 + 130.00 + + + + 100.00 + 100.00 + 140.00 + + + + 100.00 + 90.00 + 100.00 + 90.00 + 120.00 + + + + 100.00 + 90.00 + 100.00 + 90.00 + 126.00 + + + + 100.00 + 90.00 + 100.00 + 90.00 + 90.00 + + + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual.xml index 2e2903a0cf352..818590b22319a 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual.xml @@ -9,7 +9,7 @@ - taxable_goods + taxable_goods Product online @@ -19,7 +19,7 @@ virtual-product%isolation% Catalog, Search - default + default Virtual product %isolation% sku_virtual_product_%isolation% @@ -29,10 +29,9 @@ 10 - - - order_default + virtual_order_default @@ -43,10 +42,9 @@ Yes 10 - - - taxable_goods + taxable_goods Main Website @@ -60,13 +58,12 @@ Yes 10 - - - default_subcategory + default_subcategory - taxable_goods + taxable_goods Main Website @@ -75,7 +72,7 @@ - taxable_goods + taxable_goods Product online @@ -85,7 +82,7 @@ virtual-product%isolation% Catalog, Search - default + default Virtual product %isolation% sku_virtual_product_%isolation% @@ -95,16 +92,15 @@ 10 - - - order_big_qty + virtual_order_big_qty - taxable_goods + taxable_goods Product online @@ -114,7 +110,7 @@ virtual-product%isolation% Catalog, Search - default + default Virtual product %isolation% sku_virtual_product_%isolation% @@ -124,10 +120,9 @@ 10 - - - order_custom_price + virtual_order_custom_price @@ -135,7 +130,7 @@ product_50_dollar %isolation% product_50_dollar_%isolation% - taxable_goods + taxable_goods Product online @@ -145,7 +140,7 @@ virtual-product%isolation% Catalog, Search - default + default 111 @@ -153,16 +148,15 @@ 50 - - - product_50_dollar + virtual_product_50_dollar - taxable_goods + taxable_goods Main Website @@ -180,10 +174,9 @@ 15 - - - order_default + virtual_order_default diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual/CheckoutData.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual/CheckoutData.xml new file mode 100644 index 0000000000000..7a9a25ede9979 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual/CheckoutData.xml @@ -0,0 +1,35 @@ + + + + + + 1 + + + + 900 + + + + 1 + + 50 + 1 + 50 + + + + + 3 + + Yes + 100 + + + + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Category.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Category.xml index 6f12c7c430577..e08fb4234aae8 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Category.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Category.xml @@ -7,6 +7,16 @@ --> + + Category%isolation% + category%isolation% + Yes + Yes + + default_category + + + Default Category 1 @@ -18,7 +28,7 @@ DefaultSubcategory%isolation% default-subcategory-%isolation% - default_category + default_category Yes Yes @@ -28,7 +38,7 @@ DefaultSubcategory%isolation% default-subcategory-%isolation% - default_category + default_category Yes Yes @@ -47,7 +57,7 @@ RootSubCategory%isolation% root-sub-category-%isolation% - root_category + root_category Yes Yes diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/CustomOptions.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/CustomOptions.xml new file mode 100644 index 0000000000000..a785e3bda5ed7 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/CustomOptions.xml @@ -0,0 +1,317 @@ + + + + + + + custom option drop down %isolation% + Yes + Select/Drop-down + + + 10 percent + 10 + Percent + sku_drop_down_row_1 + + + + + custom option drop down2 %isolation% + Yes + Select/Drop-down + + + 20 percent + 20 + Percent + sku_drop_down_row_2 + + + + + + + + custom option drop down %isolation% + Yes + Select/Drop-down + + + 10 percent + 10 + Percent + sku_drop_down_row_1 + + + 20 percent + 20 + Percent + sku_drop_down_row_2 + + + + + custom option field %isolation% + Yes + Text/Field + + + 10 + Fixed + sku_field_option_%isolation% + 1024 + + + + + + + + custom option drop down %isolation% + Yes + Select/Drop-down + + + 30 bucks + 30 + Fixed + sku_drop_down_row_1 + + + + + + + + custom option drop down %isolation% + Yes + Select/Drop-down + + + 40 Percent + 40 + Percent + sku_drop_down_row_1 + + + + + + + + Test1 option %isolation% + Yes + Text/Field + + + 120.03 + Fixed + sku1_%isolation% + 45 + + + + + Test2 option %isolation% + Yes + Text/Field + + + 120.03 + Fixed + sku1_%isolation% + 45 + + + + + Test3 option %isolation% + Yes + Select/Drop-down + + + Test3-1 %isolation% + 110.01 + Percent + Percent + + + Test3-2 %isolation% + 210.02 + Fixed + sku3_%isolation% + + + + + Test4 option %isolation% + Yes + Select/Drop-down + + + Test4-1 %isolation% + 10.01 + Percent + sku2_%isolation% + + + Test4-2 %isolation% + 20.02 + Fixed + sku3_%isolation% + + + + + + + + custom option field %isolation% + Yes + Text/Field + + + 10 + Fixed + sku_field_option_%isolation% + 1024 + + + + + custom option Area %isolation% + Yes + Text/Area + + + 10 + Fixed + sku_area_row_%isolation% + 100 + + + + + custom option File %isolation% + No + File/File + + + 10 + Fixed + sku_file_row_%isolation% + jpg + 100 + 100 + + + + + custom option drop down %isolation% + Yes + Select/Drop-down + + + 10 percent + 10 + Percent + sku_drop_down_row_1_%isolation% + + + 20 percent + 20 + Percent + sku_drop_down_row_2_%isolation% + + + 30 fixed + 30 + Fixed + sku_drop_down_row_3_%isolation% + + + + + custom option Radio Buttons %isolation% + Yes + Select/Radio Buttons + + + 20 fixed + 20 + Fixed + sku_radio_buttons_row%isolation% + + + + + custom option Checkbox %isolation% + Yes + Select/Checkbox + + + 20 fixed + 20 + Fixed + sku_checkbox_row%isolation% + + + + + custom option Multiple Select %isolation% + Yes + Select/Multiple Select + + + 20 fixed + 20 + Fixed + sku_multiple_select_row%isolation% + + + + + custom option Date %isolation% + Yes + Date/Date + + + 20 + Fixed + sku_date_row%isolation% + + + + + custom option Date & Time %isolation% + Yes + Date/Date & Time + + + 20 + Fixed + sku_date_and_time_row%isolation% + + + + + custom option Time %isolation% + Yes + Date/Time + + + 20 + Fixed + sku_time_row%isolation% + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/Fpt.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/Fpt.xml new file mode 100644 index 0000000000000..c942bb1d6517b --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/Fpt.xml @@ -0,0 +1,19 @@ + + + + + + + 10 + All Websites [USD] + United States + * + + + + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/GroupPriceOptions.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/GroupPriceOptions.xml new file mode 100644 index 0000000000000..c55de6d823b8c --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/GroupPriceOptions.xml @@ -0,0 +1,34 @@ + + + + + + + 20 + All Websites [USD] + NOT LOGGED IN + + + + + + 90 + All Websites [USD] + NOT LOGGED IN + + + + + + 90.99 + All Websites [USD] + General + + + + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/TierPrice.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/TierPrice.xml new file mode 100644 index 0000000000000..805c784847fed --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/TierPrice.xml @@ -0,0 +1,34 @@ + + + + + + + 15 + All Websites [USD] + 3 + ALL GROUPS + + + 24 + All Websites [USD] + 15 + ALL GROUPS + + + + + + 90 + All Websites [USD] + 2 + ALL GROUPS + + + + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/ProductAttribute.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/ProductAttribute.php deleted file mode 100644 index 5834f1f1d2d97..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/ProductAttribute.php +++ /dev/null @@ -1,49 +0,0 @@ -_data['default'] = [ - 'config' => $defaultConfig, - 'data' => $defaultData, - ]; - - $this->_data['configurable_attribute'] = $this->_data['default']; - - $this->_data['new_attribute'] = [ - 'config' => $defaultConfig, - 'data' => $this->buildNewAttributeData($defaultData), - ]; - } - - /** - * Build new attribute data set - * - * @param array $defaultData - * @return array - */ - protected function buildNewAttributeData(array $defaultData) - { - unset($defaultData['fields']['attribute_code']); - return $defaultData; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.xml index 83d80113af0ae..88a87a7dd63b4 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/CreateCategoryEntityTest.xml @@ -46,7 +46,7 @@ Create subcategory with required fields addSubcategory - default_category + default_category Subcategory%isolation% Subcategory%isolation% Yes @@ -59,7 +59,7 @@ Create not anchor subcategory with required fields addSubcategory - default_category + default_category Subcategory%isolation% Subcategory%isolation% Yes @@ -69,7 +69,7 @@ Yes Yes Yes - catalogProductSimple::default,catalogProductSimple::default + catalogProductSimple::default,catalogProductSimple::default @@ -78,7 +78,7 @@ Create anchor subcategory with all fields addSubcategory - default_category + default_category Subcategory%isolation% Subcategory%isolation% Yes @@ -86,7 +86,7 @@ Subcategory Page Title Yes Static block and products - default + default Yes No Position @@ -96,7 +96,7 @@ Price No 50 - catalogProductSimple::default,catalogProductSimple::default + catalogProductSimple::default,catalogProductSimple::default @@ -105,7 +105,7 @@ Create not active subcategory addSubcategory - default_category + default_category Subcategory%isolation% Subcategory%isolation% Yes @@ -120,7 +120,7 @@ Create not included in menu subcategory addSubcategory - default_category + default_category Subcategory%isolation% Subcategory%isolation% Yes @@ -132,7 +132,7 @@ MAGETWO-12513: Create Category from Category page with Required Fields Only addSubcategory - default_category + default_category Subcategory%isolation% Yes Yes @@ -144,11 +144,11 @@ MAGETWO-16351: Assign Products at the Category Level addSubcategory - default_category + default_category Subcategory%isolation% Yes Yes - catalogProductSimple::default, configurableProduct::default, bundleProduct::bundle_fixed_product + catalogProductSimple::default, configurableProduct::default, bundleProduct::bundle_fixed_product test_type:acceptance_test diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/DeleteCategoryEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/DeleteCategoryEntityTest.xml index 6e1a9b50d3b46..391a0df0752ac 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/DeleteCategoryEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/DeleteCategoryEntityTest.xml @@ -8,12 +8,12 @@ - root_category + root_category - root_subcategory + root_subcategory diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest.xml index ed7e2cdbd4394..438c23775e13d 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest.xml @@ -8,7 +8,7 @@ - default_category + default_category Name%isolation% Yes UrlKey%isolation% @@ -23,7 +23,7 @@ - default_category + default_category Name%isolation% Yes UrlKey%isolation% @@ -40,7 +40,7 @@ - default_category + default_category Name%isolation% No diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AbstractCompareProductsTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AbstractCompareProductsTest.php index 94ab4152c7bc5..5ce85e619809f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AbstractCompareProductsTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AbstractCompareProductsTest.php @@ -138,8 +138,8 @@ protected function createProducts($products) { $products = explode(',', $products); foreach ($products as $key => $product) { - list($fixture, $dataSet) = explode('::', $product); - $product = $this->fixtureFactory->createByCode($fixture, ['dataSet' => $dataSet]); + list($fixture, $dataset) = explode('::', $product); + $product = $this->fixtureFactory->createByCode($fixture, ['dataset' => $dataset]); $product->persist(); $products[$key] = $product; } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AbstractProductPromotedProductsTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AbstractProductPromotedProductsTest.php index a99ac0e951376..902e241e6e480 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AbstractProductPromotedProductsTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/AbstractProductPromotedProductsTest.php @@ -103,8 +103,8 @@ protected function createProducts($products) $list = array_map('trim', explode(',', $products)); foreach ($list as $item) { - list($productName, $fixtureCode, $dataSet) = array_map('trim', explode('::', $item)); - $product = $this->fixtureFactory->createByCode($fixtureCode, ['dataSet' => $dataSet]); + list($productName, $fixtureCode, $dataset) = array_map('trim', explode('::', $item)); + $product = $this->fixtureFactory->createByCode($fixtureCode, ['dataset' => $dataset]); $product->persist(); $this->products[$productName] = $product; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.xml index 364854e6870bb..190d4bf76e64f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.xml @@ -17,9 +17,9 @@ Simple Product description %isolation% 50 657 - drop_down_with_one_option_fixed_price - drop_down_with_one_option_fixed_price - drop_down_with_one_option_fixed_price + drop_down_with_one_option_fixed_price + simple_drop_down_with_one_option_fixed_price + drop_down_with_one_option_fixed_price @@ -36,9 +36,9 @@ Simple Product description %isolation% 51 658 - drop_down_with_one_option_percent_price - drop_down_with_one_option_percent_price - drop_down_with_one_option_percent_price + drop_down_with_one_option_percent_price + simple_drop_down_with_one_option_percent_price + drop_down_with_one_option_percent_price @@ -56,9 +56,9 @@ Simple Product description %isolation% 52 659 - drop_down_with_one_option_fixed_price - drop_down_with_one_option_fixed_price - MAGETWO-23029 + drop_down_with_one_option_fixed_price + simple_drop_down_with_one_option_fixed_price + MAGETWO-23029 @@ -76,9 +76,9 @@ Simple Product description %isolation% 53 660 - drop_down_with_one_option_percent_price - drop_down_with_one_option_percent_price - MAGETWO-23030 + drop_down_with_one_option_percent_price + simple_drop_down_with_one_option_percent_price + MAGETWO-23030 @@ -95,10 +95,10 @@ Simple Product description %isolation% 54 661 - drop_down_with_one_option_percent_price - drop_down_with_one_option_percent_price - MAGETWO-23030 - MAGETWO-23055 + drop_down_with_one_option_percent_price + simple_drop_down_with_one_option_percent_price + MAGETWO-23030 + not_logged_in_90 @@ -115,10 +115,10 @@ Simple Product description %isolation% 55 662 - drop_down_with_one_option_fixed_price - drop_down_with_one_option_fixed_price - MAGETWO-23029 - MAGETWO-23055 + drop_down_with_one_option_fixed_price + simple_drop_down_with_one_option_fixed_price + MAGETWO-23029 + not_logged_in_90 @@ -135,10 +135,10 @@ Simple Product description %isolation% 56 663 - drop_down_with_one_option_percent_price - drop_down_with_one_option_percent_price - MAGETWO-23030 - MAGETWO-23002 + drop_down_with_one_option_percent_price + simple_drop_down_with_one_option_percent_price + MAGETWO-23030 + MAGETWO-23002 @@ -155,10 +155,10 @@ Simple Product description %isolation% 57 664 - drop_down_with_one_option_fixed_price - drop_down_with_one_option_fixed_price - MAGETWO-23029 - MAGETWO-23002 + drop_down_with_one_option_fixed_price + simple_drop_down_with_one_option_fixed_price + MAGETWO-23029 + MAGETWO-23002 @@ -261,13 +261,13 @@ simple-product-%isolation% Simple Product %isolation% simple_sku_%isolation% - taxable_goods + taxable_goods 10014 Simple Product short_description %isolation% Simple Product description %isolation% 64 141 - default + not_logged_in_20 @@ -281,7 +281,7 @@ simple-product-%isolation% Simple Product %isolation% simple_sku_%isolation% - taxable_goods + taxable_goods 10015 Simple Product short_description %isolation% Simple Product description %isolation% @@ -300,13 +300,13 @@ simple-product-%isolation% Simple Product %isolation% simple_sku_%isolation% - None + None 10016 Simple Product short_description %isolation% Simple Product description %isolation% 66 143 - default + default @@ -325,8 +325,8 @@ Simple Product description %isolation% 67 144 - options-suite - options-suite + options_suite + simple_options_suite catalogProductSimple::with_two_custom_option,catalogProductSimple::with_all_custom_option @@ -347,7 +347,7 @@ 59 75 In Stock - catalogProductSimple::default, configurableProduct::default + catalogProductSimple::default, configurableProduct::default @@ -364,7 +364,7 @@ 59 75 In Stock - catalogProductSimple::default, configurableProduct::default + catalogProductSimple::default, configurableProduct::default @@ -381,7 +381,7 @@ 59 75 In Stock - catalogProductSimple::default, configurableProduct::default + catalogProductSimple::default, configurableProduct::default @@ -404,7 +404,7 @@ MAGETWO-13345: Create Simple Product with Creating New Category (Required Fields Only) yes - default_subcategory + default_subcategory simple%isolation% simple%isolation% simple%isolation% @@ -418,7 +418,7 @@ simple-product-%isolation% Simple Product %isolation% simple_sku_%isolation% - taxable_goods + taxable_goods 10 1 1000 @@ -433,12 +433,12 @@ simple-product-%isolation% Simple Product %isolation% simple_sku_%isolation% - taxable_goods + taxable_goods 10 1 1000 In Stock - drop_down_with_one_option_fixed_price + drop_down_with_one_option_fixed_price test_type:acceptance_test diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest.xml index 25aaa878701d8..f7123e3638125 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest.xml @@ -13,18 +13,7 @@ VirtualProduct %isolation% virtual_sku_%isolation% 10 - - - - Yes - - - - - - - - - - - - - - - - - - @@ -34,17 +23,13 @@ VirtualProduct %isolation% virtual_sku_%isolation% 10 - None + None 999 Yes category_%isolation% - - - - - MAGETWO-23002 + MAGETWO-23002 Yes In Stock - - - - Catalog, Search @@ -55,19 +40,12 @@ Create product with out of stock virtual-product-%isolation% VirtualProduct %isolation% - - 10 - taxable_goods + taxable_goods 999 Yes - - - - - MAGETWO-23030 - - - - + MAGETWO-23030 Out of Stock - - - - Search @@ -80,17 +58,9 @@ VirtualProduct %isolation% virtual_sku_%isolation% 10 - - - - Yes category_%isolation% - MAGETWO-23055 - - - - - - - - - - - - + not_logged_in_90 Catalog @@ -102,18 +72,10 @@ VirtualProduct %isolation% virtual_sku_%isolation% 9000 - - - - Yes - - - MAGETWO-23055 - - - - - - - - - options-suite + not_logged_in_90 + options_suite catalogProductSimple::with_two_custom_option,catalogProductSimple::with_all_custom_option - - @@ -126,18 +88,11 @@ VirtualProduct %isolation% virtual_sku_%isolation% 10 - - 999 Yes - - - - - MAGETWO-23030 - - + MAGETWO-23030 No In Stock - - - - - - @@ -149,18 +104,10 @@ VirtualProduct %isolation% virtual_sku_%isolation% 9000 - - 999 Yes - - - - - - - default - - + default Out of Stock - - - - - - @@ -172,18 +119,8 @@ VirtualProduct %isolation% virtual_sku_%isolation% 10 - - - - Yes category_%isolation% - - - - - - - - - - - - - - - - test_type:acceptance_test diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/DuplicateProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/DuplicateProductEntityTest.php index d9e73e456e618..bfa4e2cc5e2ab 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/DuplicateProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/DuplicateProductEntityTest.php @@ -111,11 +111,11 @@ public function test($productType) */ protected function createProduct($productType) { - list($fixture, $dataSet) = explode('::', $productType); + list($fixture, $dataset) = explode('::', $productType); $product = $this->fixtureFactory->createByCode( $fixture, [ - 'dataSet' => $dataSet, + 'dataset' => $dataset, 'data' => [ 'category_ids' => [ 'category' => $this->category, diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/MassProductUpdateTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/MassProductUpdateTest.xml index b00facf21e2b5..f51dde987341e 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/MassProductUpdateTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/MassProductUpdateTest.xml @@ -9,7 +9,7 @@ product_flat - simple_10_dollar + simple_10_dollar 1.99 diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php index 1cdff9dbf0ed1..051bbfc08d499 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php @@ -17,8 +17,8 @@ * Test Flow: * 1. Open backend * 2. Go to Products > Catalog - * 3. Start create product from preconditions (according dataSet) - * 4. Fill data from dataSet + * 3. Start create product from preconditions (according dataset) + * 4. Fill data from dataset * 5. Save * 6. Perform all assertions * @@ -83,8 +83,8 @@ public function test($createProduct, $product) // Steps $this->catalogProductIndex->open(); $this->catalogProductIndex->getGridPageActionBlock()->addProduct($createProduct); - list($fixture, $dataSet) = explode('::', $product); - $product = $this->fixtureFactory->createByCode($fixture, ['dataSet' => $dataSet]); + list($fixture, $dataset) = explode('::', $product); + $product = $this->fixtureFactory->createByCode($fixture, ['dataset' => $dataset]); $this->catalogProductNew->getProductForm()->fill($product); $this->catalogProductNew->getFormPageActions()->save($product); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnUpdateTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnUpdateTest.php index d856f2bdd684a..4904d72775c5c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnUpdateTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnUpdateTest.php @@ -19,14 +19,14 @@ * Test Flow: * * Preconditions: - * 1. Create product according to dataSet + * 1. Create product according to dataset * * Steps: * 1. Open backend * 2. Go to Products > Catalog * 3. Open created product in preconditions - * 4. Perform Actions from dataSet - * 5. Fill data from dataSet + * 4. Perform Actions from dataset + * 5. Fill data from dataset * 6. Save * 7. Perform all assertions * @@ -90,11 +90,11 @@ public function __inject( public function test($productOrigin, $product, $actionName) { // Preconditions - list($fixtureClass, $dataSet) = explode('::', $productOrigin); - $productOrigin = $this->fixtureFactory->createByCode(trim($fixtureClass), ['dataSet' => trim($dataSet)]); + list($fixtureClass, $dataset) = explode('::', $productOrigin); + $productOrigin = $this->fixtureFactory->createByCode(trim($fixtureClass), ['dataset' => trim($dataset)]); $productOrigin->persist(); - list($fixtureClass, $dataSet) = explode('::', $product); - $product = $this->fixtureFactory->createByCode(trim($fixtureClass), ['dataSet' => trim($dataSet)]); + list($fixtureClass, $dataset) = explode('::', $product); + $product = $this->fixtureFactory->createByCode(trim($fixtureClass), ['dataset' => trim($dataset)]); // Steps $this->catalogProductIndex->open(); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.xml index 4dde51eae09a3..8d5e0aa7c4c5a 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.xml @@ -9,7 +9,7 @@ Update visibility to Catalog, Search - product_with_category + simple_with_tier_price Test simple product %isolation% test_simple_product_%isolation% 245.00 @@ -25,7 +25,7 @@ Update visibility to Not Visible Individually - product_with_category + product_with_category Test simple product %isolation% test_simple_product_%isolation% 325.00 @@ -39,7 +39,7 @@ Update visibility to Catalog - product_with_category + product_with_category Test simple product %isolation% test_simple_product_%isolation% 325.01 @@ -56,7 +56,7 @@ Update visibility to Search - product_with_category + product_with_category Test simple product %isolation% test_simple_product_%isolation% 325.02 @@ -73,7 +73,7 @@ Update stock to Out of Stock - product_with_category + product_with_category Test simple product %isolation% test_simple_product_%isolation% 325.03 @@ -90,7 +90,7 @@ Update product status to offline - product_with_category + product_with_category Test simple product %isolation% test_simple_product_%isolation% 74.00 @@ -104,8 +104,8 @@ Update category - product_with_category - default + product_with_category + default Test simple product %isolation% test_simple_product_%isolation% 74.00 @@ -119,8 +119,8 @@ MAGETWO-12428: Edit Simple Product - product_with_category - default + product_with_category + default Test simple product %isolation% test_simple_product_%isolation% 133.00 @@ -130,8 +130,8 @@ MAGETWO-12417: Unassign Products from the Category - product_with_category - - + product_with_category + - test_type:acceptance_test @@ -139,12 +139,12 @@ Edit product with enabled flat product_flat - simple_10_dollar + simple_10_dollar Simple Product %isolation% sku_simple_product_%isolation% 1.99 - - - default + - + default diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateVirtualProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateVirtualProductEntityTest.php index 0868765d7b590..e45992c85e609 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateVirtualProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateVirtualProductEntityTest.php @@ -93,7 +93,7 @@ public function __inject( $this->product = $fixtureFactory->createByCode( 'catalogProductVirtual', [ - 'dataSet' => 'default', + 'dataset' => 'default', 'data' => [ 'category_ids' => [ 'category' => $category, diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateVirtualProductEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateVirtualProductEntityTest.xml index d6607d67fd40b..8ea588e36a329 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateVirtualProductEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateVirtualProductEntityTest.xml @@ -11,11 +11,11 @@ VirtualProduct %isolation% virtual_sku_%isolation% 99.99 - None + None 999 Yes - default_subcategory - MAGETWO-23002 + default_subcategory + MAGETWO-23002 In Stock Catalog virtual-product-%isolation% @@ -32,7 +32,7 @@ virtual_product_%isolation% virtual_sku_%isolation% 120.00 - taxable_goods + taxable_goods 999 Yes 45 @@ -52,11 +52,11 @@ VirtualProduct %isolation% virtual_sku_%isolation% 185.00 - None + None 999 Yes - default_subcategory - MAGETWO-23002 + default_subcategory + MAGETWO-23002 Out of Stock Catalog, Search virtual-product-%isolation% @@ -73,7 +73,7 @@ virtual_product_%isolation% virtual_sku_%isolation% 99.99 - taxable_goods + taxable_goods Yes Out of Stock Search @@ -89,7 +89,7 @@ VirtualProduct %isolation% virtual_sku_%isolation% 5.00 - None + None Yes Out of Stock Catalog @@ -105,12 +105,12 @@ virtual_product_%isolation% virtual_sku_%isolation% 145.00 - taxable_goods + taxable_goods 999 Yes - default_subcategory - MAGETWO-23055 - MAGETWO-23002 + default_subcategory + not_logged_in_90 + MAGETWO-23002 In Stock Catalog, Search virtual-product-%isolation% @@ -127,9 +127,9 @@ VirtualProduct %isolation% virtual_sku_%isolation% 99.99 - None + None Yes - default_subcategory + default_subcategory 45 Out of Stock Catalog, Search @@ -145,9 +145,9 @@ virtual_product_%isolation% virtual_sku_%isolation% 5.00 - taxable_goods + taxable_goods Yes - MAGETWO-23055 + not_logged_in_90 Out of Stock Search virtual-product-%isolation% @@ -162,12 +162,12 @@ VirtualProduct %isolation% virtual_sku_%isolation% 120.00 - None + None 999 Yes - default_subcategory + default_subcategory In Stock - options-suite + options_suite Search virtual-product-%isolation% @@ -182,9 +182,9 @@ VirtualProduct %isolation% virtual_sku_%isolation% 99.99 - taxable_goods + taxable_goods Yes - MAGETWO-23055 + not_logged_in_90 Out of Stock Catalog, Search virtual-product-%isolation% @@ -199,12 +199,12 @@ VirtualProduct %isolation% virtual_sku_%isolation% 99.99 - None + None 999 Yes - default_subcategory - MAGETWO-23055 - MAGETWO-23002 + default_subcategory + not_logged_in_90 + MAGETWO-23002 In Stock Catalog virtual-product-%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.xml index 320e99b58a4df..9b091cb1c393d 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.xml @@ -9,7 +9,7 @@ ProductTemplate%isolation% - default + default diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityFromProductPageTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityFromProductPageTest.php index 396d177f80c0f..d52ffac221086 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityFromProductPageTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityFromProductPageTest.php @@ -44,7 +44,7 @@ public function __prepare(FixtureFactory $fixtureFactory) { $product = $fixtureFactory->createByCode( 'catalogProductSimple', - ['dataSet' => 'product_with_category_with_anchor'] + ['dataset' => 'product_with_category_with_anchor'] ); $product->persist(); return ['product' => $product]; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityFromProductPageTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityFromProductPageTest.xml index 0236f7716289e..3f454e6d213b0 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityFromProductPageTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityFromProductPageTest.xml @@ -35,7 +35,7 @@ Dropdown_Admin_%isolation% Dropdown - two_options + two_options No attr_dropdown_%isolation% Global diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.xml index cd482fba45140..00014f1017d69 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.xml @@ -8,7 +8,7 @@ - custom_attribute_set + custom_attribute_set Text_Field_Admin_%isolation% Text Field No @@ -19,7 +19,7 @@ - custom_attribute_set + custom_attribute_set Text_Field_Admin_%isolation% Text Area Yes @@ -41,7 +41,7 @@ - custom_attribute_set + custom_attribute_set Date_Admin_%isolation% Date No @@ -62,7 +62,7 @@ - custom_attribute_set + custom_attribute_set Yes/No_Admin_%isolation% Yes/No Yes @@ -75,10 +75,10 @@ - custom_attribute_set + custom_attribute_set Multiple_Select_Admin_%isolation% Multiple Select - default + default No attr_multiselect_%isolation% Website @@ -103,10 +103,10 @@ - custom_attribute_set + custom_attribute_set Dropdown_Admin_%isolation% Dropdown - default + default Yes attr_dropdown_%isolation% Global @@ -136,7 +136,7 @@ - custom_attribute_set + custom_attribute_set Price_Admin_%isolation% Price No @@ -158,7 +158,7 @@ - custom_attribute_set + custom_attribute_set Fixed_Product_Tax_Admin_%isolation% Fixed Product Tax attr_fpt_code_%isolation% @@ -168,7 +168,7 @@ - custom_attribute_set + custom_attribute_set Text_Field_Admin_%isolation% Text Field Yes diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.xml index 23500c09d04bf..e143d97fa52fd 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.xml @@ -8,8 +8,8 @@ - custom_attribute_set - attribute_type_dropdown + custom_attribute_set + attribute_type_dropdown @@ -17,8 +17,8 @@ - default - attribute_type_text_field + default + attribute_type_text_field diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.php index 5e88db04c3ca1..c337d3e8c0536 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.php @@ -80,7 +80,7 @@ public function test(FixtureFactory $fixtureFactory, CatalogAttributeSet $produc $product = $fixtureFactory->createByCode( 'catalogProductSimple', [ - 'dataSet' => 'default', + 'dataset' => 'default', 'data' => [ 'attribute_set_id' => ['attribute_set' => $productTemplate], ], diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.xml index 9d56a856c52f4..ede699f625cb9 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.xml @@ -8,9 +8,9 @@ - custom_attribute_set - default - default + custom_attribute_set + default + default diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteProductAttributeEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteProductAttributeEntityTest.xml index fcd45cbf6b0fa..a2fca7dd7787a 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteProductAttributeEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteProductAttributeEntityTest.xml @@ -8,14 +8,14 @@ - attribute_type_text_field + attribute_type_text_field - attribute_type_dropdown + attribute_type_dropdown diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteUsedInConfigurableProductAttributeTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteUsedInConfigurableProductAttributeTest.xml index 0c7d65d6cd0aa..541aa92913346 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteUsedInConfigurableProductAttributeTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteUsedInConfigurableProductAttributeTest.xml @@ -8,7 +8,7 @@ - one_variation + one_variation diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.xml index 7597b2416ba02..4264283d45b38 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.xml @@ -10,8 +10,8 @@ ProductTemplateEdit1%isolation% Custom-group%isolation% - custom_attribute_set - attribute_type_text_field + custom_attribute_set + attribute_type_text_field diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.php index b9e8ed962b3f0..8429c349f0cfe 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.php @@ -13,10 +13,8 @@ use Magento\Mtf\TestCase\Injectable; /** - * Test Creation for UpdateProductAttributeEntity - * * Preconditions: - * Preset : AttributeOptions + * Dataset : AttributeOptions * 1. Attribute is created (Attribute) * 2. Attribute set is created (Product Template) * diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.xml index 0e74dfb542a73..c3bc9c6a2c27d 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.xml @@ -8,8 +8,8 @@ - custom_attribute_set - attribute_type_text_field + custom_attribute_set + attribute_type_text_field Text_Field_%isolation% Yes Global @@ -28,10 +28,10 @@ - custom_attribute_set - attribute_type_dropdown + custom_attribute_set + attribute_type_dropdown Dropdown_%isolation% - default + default Yes Global Yes diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddAttributeToProductTemplateStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddAttributeToProductTemplateStep.php index e7b7313d2e542..e022906b29b18 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddAttributeToProductTemplateStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddAttributeToProductTemplateStep.php @@ -84,7 +84,7 @@ public function run() $product = $this->fixtureFactory->createByCode( 'catalogProductSimple', [ - 'dataSet' => 'product_with_category_with_anchor', + 'dataset' => 'product_with_category_with_anchor', 'data' => [ 'attribute_set_id' => ['attribute_set' => $this->productTemplate], ], diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductStep.php index 28bc0fc4eb206..6b4fd6f1054bb 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductStep.php @@ -16,7 +16,7 @@ class CreateProductStep implements TestStepInterface { /** - * Product fixture from dataSet. + * Product fixture from dataset. * * @var string */ @@ -49,9 +49,9 @@ public function __construct(FixtureFactory $fixtureFactory, $product) */ public function run() { - list($fixtureClass, $dataSet) = explode('::', $this->product); + list($fixtureClass, $dataset) = explode('::', $this->product); /** @var FixtureInterface $product */ - $product = $this->fixtureFactory->createByCode(trim($fixtureClass), ['dataSet' => trim($dataSet)]); + $product = $this->fixtureFactory->createByCode(trim($fixtureClass), ['dataset' => trim($dataset)]); if ($product->hasData('id') === false) { $product->persist(); } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductsStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductsStep.php index 74adfb27e1075..5141fe99e5080 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductsStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductsStep.php @@ -64,12 +64,12 @@ public function run() foreach ($productsDataSets as $key => $productDataSet) { $productDataSet = explode('::', $productDataSet); $fixtureClass = $productDataSet[0]; - $dataSet = isset($productDataSet[1]) ? $productDataSet[1] : ''; + $dataset = isset($productDataSet[1]) ? $productDataSet[1] : ''; $data = isset($this->data[$key]) ? $this->data[$key] : []; /** @var FixtureInterface[] $products */ $products[$key] = $this->fixtureFactory->createByCode( trim($fixtureClass), - ['dataSet' => trim($dataSet), 'data' => $data] + ['dataset' => trim($dataset), 'data' => $data] ); if ($products[$key]->hasData('id') === false) { $products[$key]->persist(); diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.xml b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.xml index 88c2147c46a54..1c025f00d6eb5 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.xml @@ -6,61 +6,29 @@ */ --> - - - CatalogPriceRule %isolation% - Catalog Price Rule Description - Active - - Main Website - - - NOT LOGGED IN - - By Percentage of the Original Price - 50 - - - CatalogPriceRule %isolation% - - - Catalog Price Rule Description - - - Active - - - - Main Website - - - - - NOT LOGGED IN - - - - - - - - - - By Percentage of the Original Price - - - 50 - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Repository/CatalogRule.xml b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Repository/CatalogRule.xml index be8f327ca8f1e..1ac8d36c26bd7 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Repository/CatalogRule.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Repository/CatalogRule.xml @@ -7,6 +7,20 @@ --> + + CatalogPriceRule %isolation% + Catalog Price Rule Description + Active + + Main Website + + + NOT LOGGED IN + + By Percentage of the Original Price + 50 + + Active Catalog Rule Rule Description diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/ApplySeveralCatalogPriceRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/ApplySeveralCatalogPriceRuleEntityTest.php index 1ef4e30a3e542..f58522829371e 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/ApplySeveralCatalogPriceRuleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/ApplySeveralCatalogPriceRuleEntityTest.php @@ -12,7 +12,7 @@ * Preconditions: * 1. Execute before each variation: * - Delete all active catalog price rules - * - Create catalog price rule from dataSet using Curl + * - Create catalog price rule from dataset using Curl * * Steps: * 1. Apply all created rules. @@ -44,7 +44,7 @@ public function testApplySeveralCatalogPriceRules(array $catalogRulesOriginal) } $catalogRules[$key] = $this->fixtureFactory->createByCode( 'catalogRule', - ['dataSet' => $catalogPriceRule] + ['dataset' => $catalogPriceRule] ); $catalogRules[$key]->persist(); diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogRuleTest.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogRuleTest.php index e09819c8e64a3..d9d68e5bc3cc0 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogRuleTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogRuleTest.php @@ -46,7 +46,7 @@ public function testCreate( $product, Customer $customer = null ) { - $productSimple = $this->fixtureFactory->createByCode('catalogProductSimple', ['dataSet' => $product]); + $productSimple = $this->fixtureFactory->createByCode('catalogProductSimple', ['dataset' => $product]); // Prepare data $catalogPriceRule = $this->applyCustomerGroup($catalogPriceRule, $customer); $replace = [ diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogRuleTest.xml b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogRuleTest.xml index 91556d40fba7f..d7895aa827234 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogRuleTest.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/CreateCatalogRuleTest.xml @@ -29,7 +29,7 @@ MAGETWO-12908: Apply Catalog Price Rules to Specific Customer Group. - customer_with_new_customer_group + customer_with_new_customer_group simple_10_dollar rule_name%isolation% Active diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/DeleteCatalogPriceRuleEntityTest.xml b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/DeleteCatalogPriceRuleEntityTest.xml index f986ef83a139d..1567fcd1819a8 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/DeleteCatalogPriceRuleEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/DeleteCatalogPriceRuleEntityTest.xml @@ -8,7 +8,7 @@ - active_catalog_price_rule_with_conditions + active_catalog_price_rule_with_conditions diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.php index fd30614dd24ab..a7ee832dbdbd0 100755 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.php @@ -7,7 +7,7 @@ namespace Magento\CatalogRule\Test\TestCase; use Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Magento\Catalog\Test\Fixture\CatalogProductSimple\CategoryIds; +use Magento\Catalog\Test\Fixture\Product\CategoryIds; use Magento\CatalogRule\Test\Fixture\CatalogRule; /** @@ -18,7 +18,7 @@ * 1. Login to backend. * 2. Navigate to MARKETING > Catalog Price Rules. * 3. Click Catalog Price Rule from grid. - * 4. Edit test value(s) according to dataSet. + * 4. Edit test value(s) according to dataset. * 5. Click 'Save'/ 'Apply' button. * 6. Create simple product with category. * 7. Perform all asserts. @@ -53,7 +53,7 @@ public function testUpdateCatalogPriceRule( //Prepare data $productSimple = $this->fixtureFactory->createByCode( 'catalogProductSimple', - ['dataSet' => 'product_with_category'] + ['dataset' => 'product_with_category'] ); if ($saveAction == 'saveAndApply') { /** @var CategoryIds $sourceCategories */ diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.xml b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.xml index 8ca777197b957..1bb106df250b5 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestCase/UpdateCatalogPriceRuleEntityTest.xml @@ -8,7 +8,7 @@ - active_catalog_price_rule_with_conditions + active_catalog_price_rule_with_conditions New Catalog Price Rule Name %isolation% Inactive save @@ -19,7 +19,7 @@ - active_catalog_price_rule_with_conditions + active_catalog_price_rule_with_conditions New Catalog Price Rule Name %isolation% New Catalog Price Rule Description %isolation% Active diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestStep/CreateCatalogRuleStep.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestStep/CreateCatalogRuleStep.php index 82215f4f64f24..12412122501f2 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestStep/CreateCatalogRuleStep.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/TestStep/CreateCatalogRuleStep.php @@ -61,7 +61,7 @@ public function run() if ($this->catalogRule != '-') { $catalogRule = $this->fixtureFactory->createByCode( 'catalogRule', - ['dataSet' => $this->catalogRule] + ['dataset' => $this->catalogRule] ); $catalogRule->persist(); $result['catalogRule'] = $catalogRule; diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.xml b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.xml index 940729a21995e..348fd35048e3a 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.xml @@ -6,39 +6,24 @@ */ --> - - - - - - - - - 0 - - - 0 - - - - - - - - - 0 - - - - - - - - - 0 - - - - - + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery/QueryText.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery/QueryText.php index b2bf945cc675c..17b03aa1501a1 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery/QueryText.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery/QueryText.php @@ -6,8 +6,8 @@ namespace Magento\CatalogSearch\Test\Fixture\CatalogSearchQuery; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Fixture\InjectableFixture; /** @@ -15,9 +15,9 @@ * Possible templates: * - {value} * - {product}::{product_property_to_search} - * - {product}::{product_dataSet}::{product_property_to_search} + * - {product}::{product_dataset}::{product_property_to_search} */ -class QueryText implements FixtureInterface +class QueryText extends DataSource { /** * Entity to search. @@ -26,13 +26,6 @@ class QueryText implements FixtureInterface */ protected $product; - /** - * Resource data. - * - * @var string - */ - protected $data; - /** * @constructor * @param FixtureFactory $fixtureFactory @@ -45,9 +38,9 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array $explodeValue = explode('::', $data['value']); if (!empty($explodeValue) && count($explodeValue) > 1) { $fixtureCode = $explodeValue[0]; - $dataSet = isset($explodeValue[2]) ? $explodeValue[1] : ''; + $dataset = isset($explodeValue[2]) ? $explodeValue[1] : ''; $searchValue = isset($explodeValue[2]) ? $explodeValue[2] : $explodeValue[1]; - $this->product = $fixtureFactory->createByCode($fixtureCode, ['dataSet' => $dataSet]); + $this->product = $fixtureFactory->createByCode($fixtureCode, ['dataset' => $dataset]); if (!$this->product->hasData('id')) { $this->product->persist(); } @@ -62,39 +55,6 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array } } - /** - * Persist custom selections products. - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data. - * - * @param string|null $key - * @return string - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings. - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - /** * Get product fixture to search. * diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.php index 2bd73f161a802..740497bffb148 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.php @@ -45,14 +45,14 @@ public function __prepare(FixtureFactory $fixtureFactory) /** @var CatalogProductSimple $productSymbols */ $productSymbols = $fixtureFactory->createByCode( 'catalogProductSimple', - ['dataSet' => 'abc_dfj_simple_for_advancedsearch'] + ['dataset' => 'abc_dfj_simple_for_advancedsearch'] ); $productSymbols->persist(); /** @var CatalogProductSimple $productNumbers */ $productNumbers = $fixtureFactory->createByCode( 'catalogProductSimple', - ['dataSet' => 'adc_123_simple_for_advancedsearch'] + ['dataset' => 'adc_123_simple_for_advancedsearch'] ); $productNumbers->persist(); diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.xml b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.xml index d9306dd78afd0..204b9a57eb15c 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/AdvancedSearchEntityTest.xml @@ -13,10 +13,6 @@ - abc_dfj abc_dfj - - - - - - - - test_type:acceptance_test @@ -25,11 +21,6 @@ - Yes adc_123 - - - - - - - - - - @@ -37,94 +28,55 @@ Yes - abc - - - - - - - - - - Search product in advanced search by sku Yes - - - abc_dfj - - - - - - - - Search product in advanced search by partial sku Yes - - - abc - - - - - - - - Search product in advanced search by partial sku and description Yes - - - abc adc_full - - - - - - Search product in advanced search by description - Yes - - - - dfj_full - - - - - - Search product in advanced search by short description - - - - - - - - dfj_short - - - - Search product in advanced search by partial short description Yes - - - - - - - abc_short - - - - Search product in advanced search by price to Yes Yes - - - - - - - - - - 100 @@ -132,10 +84,6 @@ Search product in advanced search by price from and price to Yes - - - - - - - - - 50 50 diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/DeleteSearchTermEntityTest.xml b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/DeleteSearchTermEntityTest.xml index bab6e86c1809b..fe84b326dd4ba 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/DeleteSearchTermEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/DeleteSearchTermEntityTest.xml @@ -8,7 +8,7 @@ - default + default diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/MassDeleteSearchTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/MassDeleteSearchTermEntityTest.php index 4f35edd4150c5..393a9cdc0143c 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/MassDeleteSearchTermEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/TestCase/MassDeleteSearchTermEntityTest.php @@ -69,8 +69,8 @@ public function test($searchTerms, FixtureFactory $fixtureFactory) $deleteSearchTerms = []; $searchTerms = array_map('trim', explode(',', $searchTerms)); foreach ($searchTerms as $term) { - list($fixture, $dataSet) = explode('::', $term); - $term = $fixtureFactory->createByCode($fixture, ['dataSet' => $dataSet]); + list($fixture, $dataset) = explode('::', $term); + $term = $fixtureFactory->createByCode($fixture, ['dataset' => $dataset]); /** @var CatalogSearchQuery $term */ $term->persist(); $deleteSearchTerms[] = ['search_query' => $term->getQueryText()]; diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertCartItemsOptions.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertCartItemsOptions.php index f4d12c6d12531..67f6ee002ec4b 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertCartItemsOptions.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertCartItemsOptions.php @@ -30,7 +30,7 @@ class AssertCartItemsOptions extends AbstractAssertForm /** * Assert that cart item options for product(s) display with correct information block - * (custom options, variations, links, samples, bundle items etc) according to passed from dataSet. + * (custom options, variations, links, samples, bundle items etc) according to passed from dataset. * * @param CheckoutCart $checkoutCart * @param Cart $cart diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.xml b/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.xml index e83f70cc78018..f9cd65e098272 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.xml +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.xml @@ -5,165 +5,67 @@ * See COPYING.txt for license details. */ --> - - - - - - - 0 - - - CURRENT_TIMESTAMP - - - 0000-00-00 00:00:00 - - - - - - 1 - - - 0 - - - 0 - - - - 0 - - - 0.0000 - - - 0 - - - 0.0000 - - - 0.0000 - - - - - - - - - - - - 0.0000 - - - 0.0000 - - - - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - 0 - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart/Items.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart/Items.php index 6ca6c12cc218c..acca29590a3f2 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart/Items.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart/Items.php @@ -6,34 +6,20 @@ namespace Magento\Checkout\Test\Fixture\Cart; -use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\ObjectManager; +use Magento\Mtf\Fixture\DataSource; +use Magento\Mtf\Fixture\FixtureInterface; /** - * Class Item - * Data for verify cart item block on checkout page + * Data for verify cart item block on checkout page. * * Data keys: * - product (fixture data for verify) */ -class Items implements FixtureInterface +class Items extends DataSource { /** - * Data set configuration settings - * - * @var array - */ - protected $params; - - /** - * Prepared dataSet data - * - * @var array - */ - protected $data = []; - - /** - * List fixture products + * List fixture products. * * @var FixtureInterface[] */ @@ -58,7 +44,7 @@ public function __construct(array $params, array $data = []) } /** - * Get module name from fixture + * Get module name from fixture. * * @param FixtureInterface $product * @return string @@ -70,40 +56,7 @@ protected function getModuleName(FixtureInterface $product) } /** - * Persist fixture - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Get source products + * Get source products. * * @return array */ diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php index b3ae8fdbd934e..194b4a6c63ea2 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php @@ -18,7 +18,7 @@ * Test delete products from shopping cart * * Preconditions - * 1. Create product according to dataSet + * 1. Create product according to dataset * 2. Add products to cart * * Steps: diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php index f5d30d2f9bdc2..58e0cc4e0ccb4 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php @@ -16,14 +16,14 @@ * Test Flow: * * Preconditions: - * 1. Create product according to dataSet. + * 1. Create product according to dataset. * 2. Go to frontend. * 3. Add product to cart. * * Steps: * 1. Click on mini shopping cart icon. * 2. Click Edit. - * 3. Fill data from dataSet. + * 3. Fill data from dataset. * 4. Click Update. * 5. Perform all assertions. * diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.xml b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.xml index 20f26723f598d..7ed2ce49ad5ed 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.xml @@ -10,14 +10,14 @@ Update Simple catalogProductSimple::with_two_custom_option - forUpdateMiniShoppingCart + simple_update_mini_shopping_cart Update Configurable and verify previous product was updated to new one in shopping cart and mini shopping cart configurableProduct::default - forUpdateMiniShoppingCart + configurable_update_mini_shopping_cart @@ -26,7 +26,7 @@ Update Bundle and verify previous product was updated to new one in shopping cart and mini shopping cart bundleProduct::bundle_fixed_product - forUpdateMiniShoppingCart + bundle_update_mini_shopping_cart @@ -35,7 +35,7 @@ Update Downloadable and check previous link was updated to new one in shopping cart and mini shopping cart downloadableProduct::with_two_separately_links - forUpdateMiniShoppingCart + downloadable_update_mini_shopping_cart Bug: MAGETWO-24195 diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateShoppingCartTest.xml b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateShoppingCartTest.xml index 3796dbef8a544..71424d79dff0b 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateShoppingCartTest.xml +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateShoppingCartTest.xml @@ -8,7 +8,7 @@ - default + default 100 3 100 @@ -19,7 +19,7 @@ - with_two_custom_option + with_two_custom_option 50 11 65 diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermAbsentOnCheckout.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermAbsentOnCheckout.php index a7ed49c05f2b8..ddea6c7010e1d 100644 --- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermAbsentOnCheckout.php +++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermAbsentOnCheckout.php @@ -55,7 +55,7 @@ public function processAssert( ); $product = $createProductsStep->run(); - $billingAddress = $fixtureFactory->createByCode('address', ['dataSet' => 'default']); + $billingAddress = $fixtureFactory->createByCode('address', ['dataset' => 'default']); $browser->open($_ENV['app_frontend_url'] . $product['products'][0]->getUrlKey() . '.html'); $catalogProductView->getViewBlock()->clickAddToCartButton(); diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermOnCheckout.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermOnCheckout.php index 10ae2224ea7ce..79a2ed43251d2 100644 --- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermOnCheckout.php +++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermOnCheckout.php @@ -67,7 +67,7 @@ public function processAssert( ); $product = $createProductsStep->run(); - $billingAddress = $fixtureFactory->createByCode('address', ['dataSet' => 'default']); + $billingAddress = $fixtureFactory->createByCode('address', ['dataset' => 'default']); $browser->open($_ENV['app_frontend_url'] . $product['products'][0]->getUrlKey() . '.html'); $catalogProductView->getViewBlock()->clickAddToCartButton(); diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermRequireMessageOnMultishippingCheckout.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermRequireMessageOnMultishippingCheckout.php index 38be9a5f0cceb..c9cee02f75d3e 100644 --- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermRequireMessageOnMultishippingCheckout.php +++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermRequireMessageOnMultishippingCheckout.php @@ -42,7 +42,7 @@ public function processAssert( $payment, $shipping ) { - $customer = ['customer' => ['dataSet' => 'johndoe_with_multiple_addresses']]; + $customer = ['customer' => ['dataset' => 'johndoe_with_multiple_addresses']]; $customer = $stepFactory->create('\Magento\Customer\Test\TestStep\CreateCustomerStep', $customer)->run(); $product = $stepFactory->create('\Magento\Catalog\Test\TestStep\CreateProductsStep', ['products' => $product]) ->run(); diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.xml index d1f5018824ca4..d33227c98e187 100644 --- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.xml +++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.xml @@ -11,43 +11,13 @@ repository_class="Magento\CheckoutAgreements\Test\Repository\CheckoutAgreement" handler_interface="Magento\CheckoutAgreements\Test\Handler\CheckoutAgreement\CheckoutAgreementInterface" class="Magento\CheckoutAgreements\Test\Fixture\CheckoutAgreement"> - - DefaultName%isolation% - Enabled - Text - - default - - test_checkbox%isolation% - TestMessage%isolation% - - - - - - DefaultName%isolation% - - - TestMessage%isolation% - - - - - - test_checkbox%isolation% - - - Enabled - - - Text - - - - - default - - - + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement/Stores.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement/Stores.php index 38b0fb89d8ad4..7a95323ef6e14 100644 --- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement/Stores.php +++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement/Stores.php @@ -6,40 +6,24 @@ namespace Magento\CheckoutAgreements\Test\Fixture\CheckoutAgreement; +use Magento\Mtf\Fixture\DataSource; use Magento\Store\Test\Fixture\Store; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; /** - * Class Stores - * Prepare Stores + * Prepare Stores. */ -class Stores implements FixtureInterface +class Stores extends DataSource { /** - * Prepared dataSet data - * - * @var array - */ - protected $data; - - /** - * Data set configuration settings - * - * @var array - */ - protected $params; - - /** - * Store fixture + * Store fixture. * * @var Store[] */ public $stores; /** - * Constructor - * + * @constructor * @param FixtureFactory $fixtureFactory * @param array $data * @param array $params [optional] @@ -47,9 +31,9 @@ class Stores implements FixtureInterface public function __construct(FixtureFactory $fixtureFactory, array $data, array $params = []) { $this->params = $params; - if (isset($data['dataSet'])) { - foreach ($data['dataSet'] as $store) { - $store = $fixtureFactory->createByCode('store', ['dataSet' => $store]); + if (isset($data['dataset'])) { + foreach ($data['dataset'] as $store) { + $store = $fixtureFactory->createByCode('store', ['dataset' => $store]); /** @var Store $store */ if (!$store->getStoreId()) { $store->persist(); @@ -61,40 +45,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $data, array $ } /** - * Persist stores - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string|null $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Return array + * Return array. * * @return Store[] */ diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Repository/CheckoutAgreement.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Repository/CheckoutAgreement.xml index a320ff995cd67..d709248ee26e1 100644 --- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Repository/CheckoutAgreement.xml +++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Repository/CheckoutAgreement.xml @@ -7,12 +7,23 @@ --> + + DefaultName%isolation% + Enabled + Text + + default + + test_checkbox%isolation% + TestMessage%isolation% + + TermDisabledTextName%isolation% Disabled Text - + default @@ -26,7 +37,7 @@ Disabled HTML - + default @@ -40,7 +51,7 @@ Enabled Text - + default diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.php index c0abdce3aeda4..7d699f287fdde 100644 --- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.php @@ -19,7 +19,7 @@ * Steps: * 1. Open Backend Stores > Terms and Conditions * 2. Create new "Terms and Conditions" - * 3. Fill data from dataSet + * 3. Fill data from dataset * 4. Save * 5. Perform all assertions * diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.xml index d82cb340f1cb2..4779c05af5cde 100644 --- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.xml @@ -13,7 +13,7 @@ name%isolation% Enabled Text - default + default test_checkbox%isolation% TestMessage%isolation% Flat Rate @@ -29,7 +29,7 @@ name%isolation% Enabled HTML - default + default test_checkbox%isolation% <html> Flat Rate @@ -45,7 +45,7 @@ name%isolation% Enabled Text - default + default test_checkbox%isolation% TestMessage%isolation% Flat Rate @@ -61,7 +61,7 @@ name%isolation% Disabled Text - default + default test_checkbox%isolation% TestMessage%isolation% Flat Rate @@ -77,7 +77,7 @@ name%isolation% Enabled Text - default + default test_checkbox%isolation% TestMessage%isolation% Flat Rate diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.php index 3b20d91b19db8..f866638018411 100644 --- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.php @@ -15,7 +15,7 @@ /** * Preconditions: * 1. Enable "Terms and Conditions": Stores > Configuration > Sales > Checkout > Checkout Options. - * 2. Create term according to dataSet. + * 2. Create term according to dataset. * * Steps: * 1. Open Backend Stores > Terms and Conditions. diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.xml index 7fb6d83370663..e13ce03265cb5 100644 --- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.xml @@ -9,7 +9,7 @@ catalogProductSimple::default - term_enabled_text + term_enabled_text Flat Rate Fixed checkmo diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest.php index 50ef121fc1937..eba27746e7e3d 100644 --- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest.php @@ -15,12 +15,12 @@ /** * Preconditions: * 1. Enable "Terms and Conditions": Stores > Configuration > Sales > Checkout > Checkout Options - * 2. Create term according to dataSet + * 2. Create term according to dataset * * Steps: * 1. Open Backend Stores > Terms and Conditions * 2. Open created Term from preconditions - * 3. Fill data from dataSet + * 3. Fill data from dataset * 4. Save * 5. Perform all assertions * diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest.xml index c293d7996e2a3..e1818c9838943 100644 --- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest.xml @@ -9,11 +9,11 @@ catalogProductSimple::default - term_disabled_text + term_disabled_text name%isolation% Enabled HTML - default + default test_checkbox%isolation% TestMessage%isolation% Flat Rate @@ -25,11 +25,11 @@ catalogProductSimple::default - term_disabled_html + term_disabled_html name%isolation% Enabled Text - default + default test_checkbox%isolation% <html> Flat Rate @@ -41,11 +41,11 @@ catalogProductSimple::default - term_enabled_text + term_enabled_text name%isolation% Disabled HTML - default + default test_checkbox%isolation% TestMessage%isolation% Flat Rate diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Block/Adminhtml/Page/Edit/Tab/Content.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Block/Adminhtml/Page/Edit/Tab/Content.php index 5ac929cb93770..a07445f3eee83 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Block/Adminhtml/Page/Edit/Tab/Content.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Block/Adminhtml/Page/Edit/Tab/Content.php @@ -124,8 +124,8 @@ public function fillFormTab(array $fields, SimpleElement $element = null) if (isset($fields['content_heading']['value'])) { $element->find($this->contentHeading)->setValue($fields['content_heading']['value']); } - if (isset($fields['content']['value']['widget']['preset'])) { - foreach ($fields['content']['value']['widget']['preset'] as $widget) { + if (isset($fields['content']['value']['widget']['dataset'])) { + foreach ($fields['content']['value']['widget']['dataset'] as $widget) { $this->clickInsertWidget(); $this->getWidgetBlock()->addWidget($widget); } diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Constraint/AssertCmsBlockNotOnCategoryPage.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Constraint/AssertCmsBlockNotOnCategoryPage.php index 96eeb2aa0d04f..81f15956479ed 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Constraint/AssertCmsBlockNotOnCategoryPage.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Constraint/AssertCmsBlockNotOnCategoryPage.php @@ -36,7 +36,7 @@ public function processAssert( $category = $fixtureFactory->createByCode( 'category', [ - 'dataSet' => 'default_subcategory', + 'dataset' => 'default_subcategory', 'data' => [ 'display_mode' => 'Static block and products', 'landing_page' => $cmsBlock->getTitle(), diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Constraint/AssertCmsBlockOnCategoryPage.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Constraint/AssertCmsBlockOnCategoryPage.php index 2cc8650a1f924..4554fe161d4e9 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Constraint/AssertCmsBlockOnCategoryPage.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Constraint/AssertCmsBlockOnCategoryPage.php @@ -36,7 +36,7 @@ public function processAssert( $category = $fixtureFactory->createByCode( 'category', [ - 'dataSet' => 'default_subcategory', + 'dataset' => 'default_subcategory', 'data' => [ 'display_mode' => 'Static block and products', 'landing_page' => $cmsBlock->getTitle(), diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Constraint/AssertCmsPagePreview.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Constraint/AssertCmsPagePreview.php index 2f8203b640e6c..4f96145bc6a34 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Constraint/AssertCmsPagePreview.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Constraint/AssertCmsPagePreview.php @@ -51,7 +51,7 @@ public function processAssert( 'Wrong content is displayed.' ); if (isset($fixtureContent['widget'])) { - foreach ($fixtureContent['widget']['preset'] as $widget) { + foreach ($fixtureContent['widget']['dataset'] as $widget) { \PHPUnit_Framework_Assert::assertTrue( $frontCmsPage->getCmsPageBlock()->isWidgetVisible($widget['widget_type'], $widget['anchor_text']), 'Widget \'' . $widget['widget_type'] . '\' is not displayed.' diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsBlock.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsBlock.xml index 746165d67c89a..71e66d0998b0d 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsBlock.xml +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsBlock.xml @@ -6,44 +6,21 @@ */ --> - - - block_%isolation% - identifier_%isolation% - - All Store Views - - Enabled - description_%isolation% - - - - - - block_%isolation% - - - identifier_%isolation% - - - description_%isolation% - - - - - - - - - Enabled - - - - - All Store Views - - - + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsBlock/Stores.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsBlock/Stores.php index 4622537127e7f..2cd890cb55555 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsBlock/Stores.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsBlock/Stores.php @@ -6,24 +6,17 @@ namespace Magento\Cms\Test\Fixture\CmsBlock; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; /** * Data source for 'stores' field. * * Data keys: - * - dataSet + * - dataset */ -class Stores implements FixtureInterface +class Stores extends DataSource { - /** - * Array with store names. - * - * @var array - */ - protected $data = []; - /** * Array with store fixtures. * @@ -31,13 +24,6 @@ class Stores implements FixtureInterface */ protected $stores; - /** - * Data set configuration settings. - * - * @var array - */ - protected $params; - /** * Create custom Store if we have block with custom store view. * @@ -49,11 +35,11 @@ class Stores implements FixtureInterface public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = []) { $this->params = $params; - if (isset($data['dataSet'])) { - $dataSets = is_array($data['dataSet']) ? $data['dataSet'] : [$data['dataSet']]; - foreach ($dataSets as $dataSet) { + if (isset($data['dataset'])) { + $datasets = is_array($data['dataset']) ? $data['dataset'] : [$data['dataset']]; + foreach ($datasets as $dataset) { /** @var \Magento\Store\Test\Fixture\Store $store */ - $store = $fixtureFactory->createByCode('store', ['dataSet' => $dataSet]); + $store = $fixtureFactory->createByCode('store', ['dataset' => $dataset]); if (!$store->hasData('store_id')) { $store->persist(); } @@ -65,29 +51,6 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array } } - /** - * Persist custom selections store view. - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set. - * - * @param string|null $key [optional] - * @return array - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - /** * Return stores. * @@ -97,14 +60,4 @@ public function getStores() { return $this->stores; } - - /** - * Return data set configuration settings. - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } } diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage.xml index 071897f0c5b13..7cf7c822cf2b9 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage.xml +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage.xml @@ -6,74 +6,34 @@ */ --> - - - CMS Page%isolation% - identifier%isolation% - All Store Views - Enabled - - description_%isolation% - - - - - - - - - - Enabled - - - - - - - - - - - - identifier%isolation% - - - - - - - Text %isolation% - - - - - - - - - - 0 - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - 1 - - - All Store Views - + + diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage/Content.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage/Content.php index fc3d5f72bf9c2..b7c10f52cffea 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage/Content.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage/Content.php @@ -6,31 +6,18 @@ namespace Magento\Cms\Test\Fixture\CmsPage; -use Magento\Catalog\Test\Fixture\Category; -use Magento\Catalog\Test\Fixture\CatalogProductSimple; +use Magento\Mtf\Fixture\DataSource; use Magento\Cms\Test\Fixture\CmsBlock; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Catalog\Test\Fixture\Category; +use Magento\Mtf\Repository\RepositoryFactory; +use Magento\Catalog\Test\Fixture\CatalogProductSimple; /** * Prepare content for cms page. */ -class Content implements FixtureInterface +class Content extends DataSource { - /** - * Content data. - * - * @var array - */ - protected $data = []; - - /** - * Fixture params. - * - * @var array - */ - protected $params; - /** * Fixture factory. * @@ -40,31 +27,38 @@ class Content implements FixtureInterface /** * @constructor + * @param RepositoryFactory $repositoryFactory + * @param FixtureFactory $fixtureFactory * @param array $params * @param array $data - * @param FixtureFactory $fixtureFactory */ - public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = []) - { + public function __construct( + RepositoryFactory $repositoryFactory, + FixtureFactory $fixtureFactory, + array $params, + array $data = [] + ) { $this->fixtureFactory = $fixtureFactory; $this->params = $params; $this->data = $data; - if (isset($data['widget']['preset'])) { - $this->data['widget']['preset'] = $this->getPreset($data['widget']['preset']); - foreach ($this->data['widget']['preset'] as $key => $widget) { + if (isset($data['widget']['dataset']) && isset($this->params['repository'])) { + $this->data['widget']['dataset'] = $repositoryFactory->get($this->params['repository'])->get( + $data['widget']['dataset'] + ); + foreach ($this->data['widget']['dataset'] as $key => $widget) { if (isset($widget['chosen_option']['category_path']) && !isset($widget['chosen_option']['filter_sku']) ) { $category = $this->createCategory($widget); $categoryName = $category->getData('name'); - $this->data['widget']['preset'][$key]['chosen_option']['category_path'] = $categoryName; + $this->data['widget']['dataset'][$key]['chosen_option']['category_path'] = $categoryName; } if (isset($widget['chosen_option']['category_path']) && isset($widget['chosen_option']['filter_sku'])) { $product = $this->createProduct($widget); $categoryName = $product->getCategoryIds()[0]['name']; $productSku = $product->getData('sku'); - $this->data['widget']['preset'][$key]['chosen_option']['category_path'] = $categoryName; - $this->data['widget']['preset'][$key]['chosen_option']['filter_sku'] = $productSku; + $this->data['widget']['dataset'][$key]['chosen_option']['category_path'] = $categoryName; + $this->data['widget']['dataset'][$key]['chosen_option']['filter_sku'] = $productSku; } if ($widget['widget_type'] == 'Catalog New Products List') { $this->createProduct(); @@ -72,7 +66,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array if ($widget['widget_type'] == 'CMS Static Block') { $block = $this->createBlock($widget); $blockIdentifier = $block->getIdentifier(); - $this->data['widget']['preset'][$key]['chosen_option']['filter_identifier'] = $blockIdentifier; + $this->data['widget']['dataset'][$key]['chosen_option']['filter_identifier'] = $blockIdentifier; } } } @@ -89,7 +83,7 @@ protected function createCategory($widget) /** @var Category $category */ $category = $this->fixtureFactory->createByCode( 'category', - ['dataSet' => $widget['chosen_option']['category_path']] + ['dataset' => $widget['chosen_option']['category_path']] ); if (!$category->hasData('id')) { $category->persist(); @@ -106,9 +100,9 @@ protected function createCategory($widget) */ protected function createProduct($widget = null) { - $dataSet = $widget === null ? 'default' : $widget['chosen_option']['category_path']; + $dataset = $widget === null ? 'default' : $widget['chosen_option']['category_path']; /** @var CatalogProductSimple $product */ - $product = $this->fixtureFactory->createByCode('catalogProductSimple', ['dataSet' => $dataSet]); + $product = $this->fixtureFactory->createByCode('catalogProductSimple', ['dataset' => $dataset]); if (!$product->hasData('id')) { $product->persist(); } @@ -132,119 +126,4 @@ protected function createBlock($widget) return $block; } - - /** - * Persist attribute options. - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set. - * - * @param string|null $key - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings. - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Preset for Widgets. - * - * @param string $name - * @return array|null - */ - protected function getPreset($name) - { - $presets = [ - 'default' => [ - 'widget_1' => [ - 'widget_type' => 'CMS Page Link', - 'anchor_text' => 'CMS Page Link anchor_text_%isolation%', - 'title' => 'CMS Page Link anchor_title_%isolation%', - 'template' => 'CMS Page Link Block Template', - 'chosen_option' => [ - 'filter_url_key' => 'home', - ], - ], - ], - 'all_widgets' => [ - 'widget_1' => [ - 'widget_type' => 'CMS Page Link', - 'anchor_text' => 'CMS Page Link anchor_text_%isolation%', - 'title' => 'CMS Page Link anchor_title_%isolation%', - 'template' => 'CMS Page Link Block Template', - 'chosen_option' => [ - 'filter_url_key' => 'home', - ], - ], - 'widget_2' => [ - 'widget_type' => 'CMS Static Block', - 'template' => 'CMS Static Block Default Template', - 'chosen_option' => [ - 'filter_identifier' => 'cmsBlock', - ], - ], - 'widget_3' => [ - 'widget_type' => 'Catalog Category Link', - 'anchor_text' => 'Catalog Category Link anchor_text_%isolation%', - 'title' => 'Catalog Category Link anchor_title_%isolation%', - 'template' => 'Category Link Block Template', - 'chosen_option' => [ - 'category_path' => 'default_subcategory', - ], - ], - 'widget_4' => [ - 'widget_type' => 'Catalog New Products List', - 'display_type' => 'All products', - 'show_pager' => 'Yes', - 'products_count' => 10, - 'template' => 'New Products Grid Template', - 'cache_lifetime' => 86400, - ], - 'widget_5' => [ - 'widget_type' => 'Catalog Product Link', - 'anchor_text' => 'Catalog Product Link anchor_text_%isolation%', - 'title' => 'Catalog Product Link anchor_title_%isolation%', - 'template' => 'Product Link Block Template', - 'chosen_option' => [ - 'category_path' => 'product_with_category', - 'filter_sku' => 'product_with_category', - ], - ], - 'widget_6' => [ - 'widget_type' => 'Recently Compared Products', - 'page_size' => 10, - 'template' => 'Compared Products Grid Template', - ], - 'widget_7' => [ - 'widget_type' => 'Recently Viewed Products', - 'page_size' => 10, - 'template' => 'Viewed Products Grid Template', - ], - ], - ]; - if (!isset($presets[$name])) { - return null; - } - return $presets[$name]; - } } diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Repository/CmsBlock.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/Repository/CmsBlock.xml index 81f9f676fe986..3c025006873c9 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Repository/CmsBlock.xml +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Repository/CmsBlock.xml @@ -11,8 +11,8 @@ block_%isolation% identifier_%isolation% - - All Store Views + + all_store_views Enabled diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Repository/CmsPage/Content.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/Repository/CmsPage/Content.xml new file mode 100644 index 0000000000000..c0ba39affa9c1 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Repository/CmsPage/Content.xml @@ -0,0 +1,78 @@ + + + + + + + CMS Page Link + CMS Page Link anchor_text_%isolation% + CMS Page Link anchor_title_%isolation% + CMS Page Link Block Template + + home + + + + + + + CMS Page Link + CMS Page Link anchor_text_%isolation% + CMS Page Link anchor_title_%isolation% + CMS Page Link Block Template + + home + + + + CMS Static Block + CMS Static Block Default Template + + cmsBlock + + + + Catalog Category Link + Catalog Category Link anchor_text_%isolation% + Catalog Category Link anchor_title_%isolation% + Category Link Block Template + + default_subcategory + + + + Catalog New Products List + All products + Yes + 10 + New Products Grid Template + 86400 + + + Catalog Product Link + Catalog Product Link anchor_text_%isolation% + Catalog Product Link anchor_title_%isolation% + Product Link Block Template + + product_with_category + product_with_category + + + + Recently Compared Products + 10 + Compared Products Grid Template + + + Recently Viewed Products + 10 + Viewed Products Grid Template + + + + diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsBlockEntityTest.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsBlockEntityTest.xml index a6fb5bb045260..3527279c5c98d 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsBlockEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsBlockEntityTest.xml @@ -10,7 +10,7 @@ block_%isolation% identifier_%isolation% - All Store Views + All Store Views Enabled description_%isolation% @@ -20,7 +20,7 @@ block_%isolation% identifier_%isolation% - default + default Disabled description_%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsPageEntityTest.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsPageEntityTest.xml index a549ca390d668..fd63c140b0c91 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsPageEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/CreateCmsPageEntityTest.xml @@ -34,7 +34,7 @@ NewCmsPage%isolation% Main Website/Main Website Store/Default Store View cms_page_text_content%isolation% - default + default General Contact Name diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsPageEntityTest.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsPageEntityTest.xml index 78dd465ad2b65..b317224b3c164 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsPageEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsPageEntityTest.xml @@ -8,7 +8,7 @@ - default + default diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsPageUrlRewriteEntityTest.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsPageUrlRewriteEntityTest.xml index 86128fd3a6411..9ff1187200f24 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsPageUrlRewriteEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/DeleteCmsPageUrlRewriteEntityTest.xml @@ -8,19 +8,19 @@ - cms_default_no_redirect + cms_default_no_redirect - cms_default_permanent_redirect + cms_default_permanent_redirect - cms_default_temporary_redirect + cms_default_temporary_redirect diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsBlockEntityTest.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsBlockEntityTest.xml index 048ff19fc06e9..1aa116123698a 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsBlockEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsBlockEntityTest.xml @@ -10,7 +10,7 @@ block_updated_%isolation% identifier_updated_%isolation% - All Store Views + all_store_views Enabled description_updated_%isolation% @@ -20,7 +20,7 @@ block_updated_%isolation% identifier_updated_%isolation% - default + default Disabled description_updated_%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsPageRewriteEntityTest.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsPageRewriteEntityTest.xml index ebf6cc9116491..f03d64ae76aeb 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsPageRewriteEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/TestCase/UpdateCmsPageRewriteEntityTest.xml @@ -8,7 +8,7 @@ - cms_default_no_redirect + cms_default_no_redirect Main Website/Main Website Store/%default% request_path%isolation% No @@ -17,7 +17,7 @@ - cms_default_temporary_redirect + cms_default_temporary_redirect Main Website/Main Website Store/Default Store View request_path%isolation%.html Temporary (302) @@ -26,7 +26,7 @@ - cms_default_permanent_redirect + cms_default_permanent_redirect Main Website/Main Website Store/Default Store View request_path%isolation%.htm Permanent (301) diff --git a/dev/tests/functional/tests/app/Magento/Config/Test/Fixture/ConfigData.xml b/dev/tests/functional/tests/app/Magento/Config/Test/Fixture/ConfigData.xml index 564a0942002ee..d3f1fd8c407b0 100644 --- a/dev/tests/functional/tests/app/Magento/Config/Test/Fixture/ConfigData.xml +++ b/dev/tests/functional/tests/app/Magento/Config/Test/Fixture/ConfigData.xml @@ -15,20 +15,10 @@ handler_interface="Magento\Config\Test\Handler\ConfigData\ConfigDataInterface" class="Magento\Config\Test\Fixture\ConfigData"> - - - - - default - - - 0 - - - general - - - - + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Config/Test/TestStep/SetupConfigurationStep.php b/dev/tests/functional/tests/app/Magento/Config/Test/TestStep/SetupConfigurationStep.php index 81cd63e33bc18..4922dba6247df 100644 --- a/dev/tests/functional/tests/app/Magento/Config/Test/TestStep/SetupConfigurationStep.php +++ b/dev/tests/functional/tests/app/Magento/Config/Test/TestStep/SetupConfigurationStep.php @@ -66,7 +66,7 @@ public function run() $result = []; foreach ($configData as $configDataSet) { - $config = $this->fixtureFactory->createByCode('configData', ['dataSet' => $configDataSet . $prefix]); + $config = $this->fixtureFactory->createByCode('configData', ['dataset' => $configDataSet . $prefix]); if ($config->hasData('section')) { $config->persist(); $result[] = $config; diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/Cart/Item.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/Cart/Item.php index 1e6169606f5e1..546fdedabdd48 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/Cart/Item.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/Cart/Item.php @@ -10,8 +10,7 @@ use Magento\Mtf\Fixture\FixtureInterface; /** - * Class Item - * Data for verify cart item block on checkout page + * Data for verify cart item block on checkout page. * * Data keys: * - product (fixture data for verify) @@ -42,11 +41,11 @@ public function __construct(FixtureInterface $product) $checkoutConfigurableOptions[$key] = [ 'title' => isset($attributesData[$attribute]['label']) - ? $attributesData[$attribute]['label'] - : $attribute, + ? $attributesData[$attribute]['label'] + : $attribute, 'value' => isset($attributesData[$attribute]['options'][$option]['label']) - ? $attributesData[$attribute]['options'][$option]['label'] - : $option, + ? $attributesData[$attribute]['options'][$option]['label'] + : $option, ]; } @@ -55,37 +54,4 @@ public function __construct(FixtureInterface $product) : $checkoutConfigurableOptions; $this->data = $cartItem; } - - /** - * Persist fixture - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - // - } } diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct.xml index 6eb5ee6976ace..64d4c230aaf72 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct.xml +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct.xml @@ -6,226 +6,86 @@ */ --> - - - Configurable Product %isolation% - sku_configurable_product_%isolation% - configurable - configurable-product-%isolation% - - default - - - Main Website - - - 100.00 - - 1 - - In Stock - - - default - - - - configurable - - configurable - 4 - - product - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Configurable Product %isolation% - - - - - - - - - - - - - - - - - - - 100 - - - - - In Stock - - - - - - - - - - sku_configurable_product_%isolation% - - - - - - - - - - - - - - - - - - Product online - - - Taxable Goods - - - - - - - - - - - - - - - configurable-product-%isolation% - - - - - - Catalog, Search - - - 1 - - - - - configurable - - - - default - - - - - - - - default - - - - - Main Website - - - - - - - + + + configurable + + configurable + 4 + + product + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct/CheckoutData.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct/CheckoutData.php deleted file mode 100644 index 5321346a4cd4f..0000000000000 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct/CheckoutData.php +++ /dev/null @@ -1,218 +0,0 @@ - [ - 'options' => [ - 'configurable_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_0', - ], - [ - 'title' => 'attribute_key_1', - 'value' => 'option_key_1', - ], - ], - ], - 'qty' => 3, - 'cartItem' => [ - 'price' => 172, - 'qty' => 3, - 'subtotal' => 516, - ], - ], - 'forUpdateMiniShoppingCart' => [ - 'options' => [ - 'configurable_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_1', - ], - [ - 'title' => 'attribute_key_1', - 'value' => 'option_key_0', - ], - ], - ], - 'qty' => 1, - 'cartItem' => [ - 'price' => 172, - 'qty' => 1, - 'subtotal' => 172, - ], - ], - 'two_options' => [ - 'options' => [ - 'configurable_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_0', - ], - ], - ], - 'cartItem' => [ - 'price' => 101, - ], - ], - 'two_new_options' => [ - 'options' => [ - 'configurable_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_1', - ], - ], - ], - 'cartItem' => [ - 'price' => 102, - ], - ], - 'two_attributes' => [ - 'options' => [ - 'configurable_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_0', - ], - [ - 'title' => 'attribute_key_1', - 'value' => 'option_key_0', - ], - ], - ], - 'cartItem' => [ - 'price' => 112, - ], - ], - 'three_attributes' => [ - 'options' => [ - 'configurable_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_0', - ], - [ - 'title' => 'attribute_key_1', - 'value' => 'option_key_0', - ], - [ - 'title' => 'attribute_key_2', - 'value' => 'option_key_0', - ], - ], - ], - 'cartItem' => [ - 'price' => 112, - ], - ], - 'two_new_options_with_special_price' => [ - 'options' => [ - 'configurable_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_1', - ], - ], - ], - 'cartItem' => [ - 'price' => 12, - ], - ], - 'two_options_with_assigned_product' => [ - 'options' => [ - 'configurable_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_0', - ], - ], - ], - 'cartItem' => [ - 'price' => 101, - ], - ], - 'with_one_option' => [ - 'options' => [ - 'configurable_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_0', - ], - ], - ], - 'qty' => 1, - 'cartItem' => [ - 'price' => 11, - 'qty' => 1, - 'subtotal' => 11, - ], - ], - 'with_special_price' => [ - 'options' => [ - 'configurable_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_0', - ], - ], - ], - 'qty' => 1, - 'cartItem' => [ - 'price' => 10, - 'qty' => 1, - 'subtotal' => 10, - ], - ], - 'two_options_with_fixed_price' => [ - 'options' => [ - 'configurable_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_1', - ], - ], - ], - 'qty' => 1, - ], - 'two_options_by_one_dollar' => [ - 'options' => [ - 'configurable_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_0', - ], - ], - ], - 'cartItem' => [ - 'price' => 11, - ], - 'qty' => 1, - ] - ]; - return isset($presets[$name]) ? $presets[$name] : null; - } -} diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct/ConfigurableAttributesData.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct/ConfigurableAttributesData.php index 3b3b3108c99a3..31001b44eb5c2 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct/ConfigurableAttributesData.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct/ConfigurableAttributesData.php @@ -6,804 +6,76 @@ namespace Magento\ConfigurableProduct\Test\Fixture\ConfigurableProduct; -use Magento\Catalog\Test\Fixture\CatalogProductAttribute; -use Magento\Catalog\Test\Fixture\CatalogProductSimple; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Repository\RepositoryFactory; +use Magento\Catalog\Test\Fixture\CatalogProductSimple; +use Magento\Catalog\Test\Fixture\CatalogProductAttribute; /** - * Class ConfigurableAttributesData - * Source configurable attributes data of the configurable products + * Source configurable attributes data of the configurable products. */ -class ConfigurableAttributesData implements FixtureInterface +class ConfigurableAttributesData extends DataSource { /** - * Fixture factory + * Fixture factory. * * @var FixtureFactory */ protected $fixtureFactory; /** - * Data set configuration settings - * - * @var array - */ - protected $params; - - /** - * Prepared dataSet data - * - * @var array - */ - protected $data = []; - - /** - * Prepared attributes data + * Prepared attributes data. * * @var array */ protected $attributesData = []; /** - * Prepared variation matrix + * Prepared variation matrix. * * @var array */ protected $variationsMatrix = []; /** - * Prepared attributes + * Prepared attributes. * * @var array */ protected $attributes = []; /** - * Prepared products + * Prepared products. * * @var array */ protected $products = []; - /** - * Presets data - * - * @var array - */ - protected $presets = [ - 'default' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'options' => [ - 'option_key_0' => [ - 'pricing_value' => 12.00, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - 'option_key_1' => [ - 'pricing_value' => 20.00, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - 'option_key_2' => [ - 'pricing_value' => 18.00, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - ], - ], - 'attribute_key_1' => [ - 'options' => [ - 'option_key_0' => [ - 'pricing_value' => 42.00, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - 'option_key_1' => [ - 'pricing_value' => 40.00, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - 'option_key_2' => [ - 'pricing_value' => 48.00, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - ], - ], - ], - 'products' => [], - 'attributes' => [ - 'attribute_key_0' => 'catalogProductAttribute::attribute_type_dropdown', - 'attribute_key_1' => 'catalogProductAttribute::attribute_type_dropdown', - ], - 'matrix' => [ - 'attribute_key_0:option_key_0 attribute_key_1:option_key_0' => [ - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_0 attribute_key_1:option_key_1' => [ - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_0 attribute_key_1:option_key_2' => [ - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_1 attribute_key_1:option_key_0' => [ - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_1 attribute_key_1:option_key_1' => [ - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_1 attribute_key_1:option_key_2' => [ - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_2 attribute_key_1:option_key_0' => [ - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_2 attribute_key_1:option_key_1' => [ - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_2 attribute_key_1:option_key_2' => [ - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - ], - ], - - 'one_variation' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'options' => [ - 'option_key_0' => [ - 'pricing_value' => 12.00, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - ], - ], - ], - 'products' => [], - 'attributes' => [ - 'attribute_key_0' => 'catalogProductAttribute::attribute_type_dropdown_one_option', - ], - 'matrix' => [ - 'attribute_key_0:option_key_0' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - ], - ], - - 'one_variation_one_dollar' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'options' => [ - 'option_key_0' => [ - 'pricing_value' => 1.00, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - ], - ], - ], - 'products' => [], - 'attributes' => [ - 'attribute_key_0' => 'catalogProductAttribute::attribute_type_dropdown_one_option', - ], - 'matrix' => [ - 'attribute_key_0:option_key_0' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - ], - ], - - 'two_options' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'options' => [ - 'option_key_0' => [ - 'label' => 'option_key_1_%isolation%', - 'pricing_value' => 1, - 'is_percent' => 'Yes', - 'include' => 'Yes', - ], - 'option_key_1' => [ - 'label' => 'option_2_%isolation%', - 'pricing_value' => 2, - 'is_percent' => 'Yes', - 'include' => 'Yes', - ], - ], - ], - ], - 'attributes' => [ - 'attribute_key_0' => 'catalogProductAttribute::attribute_type_dropdown_two_options', - ], - 'products' => [], - 'matrix' => [ - 'attribute_key_0:option_key_0' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_1' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 20, - ], - 'weight' => 2, - ], - ], - ], - - 'filterable_two_options_with_zero_price' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'options' => [ - 'option_key_0' => [ - 'label' => 'option_key_1_%isolation%', - 'pricing_value' => 0, - 'is_percent' => 'No', - 'include' => 'Yes', - ], - 'option_key_1' => [ - 'label' => 'option_2_%isolation%', - 'pricing_value' => 0, - 'is_percent' => 'No', - 'include' => 'Yes', - ], - ], - ], - ], - 'attributes' => [ - 'attribute_key_0' => 'catalogProductAttribute::filterable_dropdown_two_options', - ], - 'products' => [], - 'matrix' => [ - 'attribute_key_0:option_key_0' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_1' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 20, - ], - 'weight' => 2, - ], - ], - ], - - 'two_new_options' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'frontend_label' => 'two_new_options_title_%isolation%', - 'frontend_input' => 'Dropdown', - 'label' => 'two_new_options_title_%isolation%', - 'is_required' => 'No', - 'options' => [ - 'option_key_0' => [ - 'label' => 'option_key_1_%isolation%', - 'pricing_value' => 1, - 'is_percent' => 'No', - 'include' => 'Yes', - ], - 'option_key_1' => [ - 'label' => 'option_key_2_%isolation%', - 'pricing_value' => 2, - 'is_percent' => 'No', - 'include' => 'Yes', - ], - ], - ], - ], - 'attributes' => [], - 'products' => [], - 'matrix' => [ - 'attribute_key_0:option_key_0' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_1' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 20, - ], - 'weight' => 2, - ], - ], - ], - - 'two_searchable_options' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'frontend_label' => 'two_searchable_options_%isolation%', - 'frontend_input' => 'Dropdown', - 'label' => 'two_searchable_options_%isolation%', - 'is_required' => 'No', - 'is_searchable' => 'Yes', - 'is_visible_in_advanced_search' => 'Yes', - 'is_filterable' => 'Filterable (with results)', - 'is_filterable_in_search' => 'Yes', - 'options' => [ - 'option_key_0' => [ - 'label' => 'option_key_1_%isolation%', - 'pricing_value' => 1, - 'is_percent' => 'No', - 'include' => 'Yes', - ], - 'option_key_1' => [ - 'label' => 'option_key_2_%isolation%', - 'pricing_value' => 2, - 'is_percent' => 'No', - 'include' => 'Yes', - ], - ], - ], - ], - 'attributes' => [], - 'products' => [], - 'matrix' => [ - 'attribute_key_0:option_key_0' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 100, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_1' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 100, - ], - 'weight' => 2, - ], - ], - ], - - 'one_new_options' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'options' => [ - 'option_key_0' => [ - 'label' => 'option_key_1_%isolation%', - 'pricing_value' => 1, - 'is_percent' => 'No', - 'include' => 'Yes', - ], - ], - ], - ], - 'attributes' => [], - 'products' => [], - 'matrix' => [], - ], - - 'two_new_options_with_zero_products' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'options' => [ - 'option_key_0' => [ - 'label' => 'option_key_1_%isolation%', - 'pricing_value' => 1, - 'is_percent' => 'No', - 'include' => 'Yes', - ], - ], - ], - ], - 'attributes' => [ - 'attribute_key_0' => 'catalogProductAttribute::attribute_type_dropdown_one_option', - ], - 'products' => [ - 'attribute_key_0:option_key_0' => 'catalogProductSimple::out_of_stock', - ], - 'matrix' => [], - ], - - 'two_options_with_assigned_product' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'options' => [ - 'option_key_0' => [ - 'label' => 'option_key_1_%isolation%', - 'pricing_value' => 1, - 'is_percent' => 'Yes', - 'include' => 'Yes', - ], - 'option_key_1' => [ - 'label' => 'option_key_2_%isolation%', - 'pricing_value' => 2, - 'is_percent' => 'Yes', - 'include' => 'Yes', - ], - ], - ], - ], - 'attributes' => [ - 'attribute_key_0' => 'catalogProductAttribute::attribute_type_dropdown_two_options', - ], - 'products' => [ - 'attribute_key_0:option_key_0' => 'catalogProductSimple::default', - 'attribute_key_0:option_key_1' => 'catalogProductSimple::default', - ], - 'matrix' => [ - 'attribute_key_0:option_key_0' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_1' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 20, - ], - 'weight' => 2, - ], - ], - ], - - 'color_and_size' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'options' => [ - 'option_key_0' => [ - 'pricing_value' => 0.00, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - 'option_key_1' => [ - 'pricing_value' => 0.00, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - ], - ], - 'attribute_key_1' => [ - 'options' => [ - 'option_key_0' => [ - 'pricing_value' => 5.00, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - 'option_key_1' => [ - 'pricing_value' => 10.00, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - ], - ], - ], - 'products' => [ - - ], - 'attributes' => [ - 'attribute_key_0' => 'catalogProductAttribute::color', - 'attribute_key_1' => 'catalogProductAttribute::size', - ], - 'matrix' => [ - 'attribute_key_0:option_key_0 attribute_key_1:option_key_0' => [ - 'quantity_and_stock_status' => [ - 'qty' => 100, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_0 attribute_key_1:option_key_1' => [ - 'quantity_and_stock_status' => [ - 'qty' => 100, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_1 attribute_key_1:option_key_0' => [ - 'quantity_and_stock_status' => [ - 'qty' => 100, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_1 attribute_key_1:option_key_1' => [ - 'quantity_and_stock_status' => [ - 'qty' => 100, - ], - 'weight' => 1, - ], - ], - ], - - 'size' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'options' => [ - 'option_key_0' => [ - 'pricing_value' => 0.00, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - 'option_key_1' => [ - 'pricing_value' => 0.00, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - ], - ], - ], - 'products' => [ - - ], - 'attributes' => [ - 'attribute_key_0' => 'catalogProductAttribute::size', - ], - 'matrix' => [ - 'attribute_key_0:option_key_0' => [ - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_1' => [ - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - ], - ], - - 'with_one_option' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'options' => [ - 'option_key_0' => [ - 'pricing_value' => 1, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - 'option_key_1' => [ - 'pricing_value' => 2, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - 'option_key_2' => [ - 'pricing_value' => 3, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - ], - ], - ], - 'products' => [], - 'attributes' => [ - 'attribute_key_0' => 'catalogProductAttribute::attribute_type_dropdown', - ], - 'matrix' => [ - 'attribute_key_0:option_key_0' => [ - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_1' => [ - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_2' => [ - 'quantity_and_stock_status' => [ - 'qty' => 10, - ], - 'weight' => 1, - ], - ], - ], - - 'with_out_of_stock_item' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'options' => [ - 'option_key_0' => [ - 'pricing_value' => 12.00, - 'include' => 'Yes', - 'is_percent' => 'No', - ], - ], - ], - ], - 'products' => [ - 'attribute_key_0:option_key_0' => 'catalogProductSimple::out_of_stock', - ], - 'attributes' => [ - 'attribute_key_0' => 'catalogProductAttribute::attribute_type_dropdown_one_option', - ], - 'matrix' => [], - ], - - 'two_options_with_fixed_price' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'options' => [ - 'option_key_0' => [ - 'label' => 'option_key_1_%isolation%', - 'pricing_value' => 11, - 'is_percent' => 'No', - 'include' => 'Yes', - ], - 'option_key_1' => [ - 'label' => 'option_2_%isolation%', - 'pricing_value' => 12, - 'is_percent' => 'No', - 'include' => 'Yes', - ], - ], - ], - ], - 'attributes' => [ - 'attribute_key_0' => 'catalogProductAttribute::attribute_type_dropdown_two_options', - ], - 'products' => [], - 'matrix' => [ - 'attribute_key_0:option_key_0' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 100, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_1' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 200, - ], - 'weight' => 1, - ], - ], - ], - - 'two_options_by_one_dollar' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'options' => [ - 'option_key_0' => [ - 'label' => 'option_key_1_%isolation%', - 'pricing_value' => 1, - 'is_percent' => 'No', - 'include' => 'Yes', - ], - 'option_key_1' => [ - 'label' => 'option_2_%isolation%', - 'pricing_value' => 1, - 'is_percent' => 'No', - 'include' => 'Yes', - ], - ], - ], - ], - 'attributes' => [ - 'attribute_key_0' => 'catalogProductAttribute::attribute_type_dropdown_two_options', - ], - 'products' => [], - 'matrix' => [ - 'attribute_key_0:option_key_0' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 100, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_1' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 200, - ], - 'weight' => 1, - ], - ], - ], - - 'two_variations_with_fixed_price' => [ - 'attributes_data' => [ - 'attribute_key_0' => [ - 'options' => [ - 'option_key_0' => [ - 'label' => 'option_key_1_%isolation%', - 'pricing_value' => 1, - 'is_percent' => 'No', - 'include' => 'Yes', - ], - 'option_key_1' => [ - 'label' => 'option_2_%isolation%', - 'pricing_value' => 2, - 'is_percent' => 'No', - 'include' => 'Yes', - ], - ], - ], - ], - 'attributes' => [ - 'attribute_key_0' => 'catalogProductAttribute::attribute_type_dropdown_two_options', - ], - 'products' => [ - 'attribute_key_0:option_key_0' => 'catalogProductSimple::product_without_category', - 'attribute_key_0:option_key_1' => 'catalogProductSimple::product_without_category', - ], - 'matrix' => [ - 'attribute_key_0:option_key_0' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 100, - ], - 'weight' => 1, - ], - 'attribute_key_0:option_key_1' => [ - 'display' => 'Yes', - 'quantity_and_stock_status' => [ - 'qty' => 200, - ], - 'weight' => 1, - ], - ], - ], - ]; - /** * @constructor + * @param RepositoryFactory $repositoryFactory * @param FixtureFactory $fixtureFactory * @param array $data * @param array $params [optional] */ - public function __construct(FixtureFactory $fixtureFactory, array $data, array $params = []) - { + public function __construct( + RepositoryFactory $repositoryFactory, + FixtureFactory $fixtureFactory, + array $data, + array $params = [] + ) { $this->fixtureFactory = $fixtureFactory; $this->params = $params; - $preset = []; - if (isset($data['preset'])) { - $preset = $this->getPreset($data['preset']); - unset($data['preset']); + $dataset = []; + if (isset($data['dataset']) && isset($this->params['repository'])) { + $dataset = $repositoryFactory->get($this->params['repository'])->get($data['dataset']); + unset($data['dataset']); } - $data = array_replace_recursive($data, $preset); + + $data = array_replace_recursive($data, $dataset); if (!empty($data)) { $this->prepareAttributes($data); @@ -815,32 +87,22 @@ public function __construct(FixtureFactory $fixtureFactory, array $data, array $ } /** - * Persist configurable attribute data - * - * @return void - */ - public function persist() - { - // - } - - /** - * Prepare attributes + * Prepare attributes. * * @param array $data * @return void */ protected function prepareAttributes(array $data) { - if (empty($data['attributes'])) { + if (isset($data['attributes'])) { return; } foreach ($data['attributes'] as $key => $attribute) { if (is_string($attribute)) { - list($fixture, $dataSet) = explode('::', $attribute); + list($fixture, $dataset) = explode('::', $attribute); /** @var InjectableFixture $attribute */ - $attribute = $this->fixtureFactory->createByCode($fixture, ['dataSet' => $dataSet]); + $attribute = $this->fixtureFactory->createByCode($fixture, ['dataset' => $dataset]); } if (!$attribute->hasData('attribute_id')) { $attribute->persist(); @@ -850,7 +112,7 @@ protected function prepareAttributes(array $data) } /** - * Prepare attributes data + * Prepare attributes data. * * @param array $data * @return void @@ -876,14 +138,14 @@ protected function prepareAttributesData(array $data) } /** - * Prepare products + * Prepare products. * * @param array $data * @return void */ protected function prepareProducts(array $data) { - if (empty($data['products'])) { + if (isset($data['products'])) { return; } @@ -894,7 +156,7 @@ protected function prepareProducts(array $data) foreach ($data['products'] as $key => $product) { if (is_string($product)) { - list($fixture, $dataSet) = explode('::', $product); + list($fixture, $dataset) = explode('::', $product); $attributeData = ['attributes' => $this->getProductAttributeData($key)]; $stock = []; @@ -908,7 +170,7 @@ protected function prepareProducts(array $data) $product = $this->fixtureFactory->createByCode( $fixture, [ - 'dataSet' => $dataSet, + 'dataset' => $dataset, 'data' => array_merge($attributeSetData, $attributeData, $stock) ] ); @@ -922,7 +184,7 @@ protected function prepareProducts(array $data) } /** - * Create attribute set + * Create attribute set. * * @return FixtureInterface */ @@ -931,7 +193,7 @@ protected function createAttributeSet() $attributeSet = $this->fixtureFactory->createByCode( 'catalogAttributeSet', [ - 'dataSet' => 'custom_attribute_set', + 'dataset' => 'custom_attribute_set', 'data' => [ 'assigned_attributes' => [ 'attributes' => array_values($this->attributes), @@ -944,7 +206,7 @@ protected function createAttributeSet() } /** - * Get prepared attribute data for persist product + * Get prepared attribute data for persist product. * * @param string $key * @return array @@ -967,7 +229,7 @@ protected function getProductAttributeData($key) } /** - * Get id of attribute option by composite key + * Get id of attribute option by composite key. * * @param string $compositeKey * @return int|null @@ -981,7 +243,7 @@ protected function getAttributeOptionId($compositeKey) } /** - * Prepare data for matrix + * Prepare data for matrix. * * @param array $data * @return void @@ -1036,7 +298,7 @@ protected function prepareVariationsMatrix(array $data) } /** - * Add matrix variation + * Add matrix variation. * * @param array $variationsMatrix * @param array $attribute @@ -1078,7 +340,7 @@ protected function addVariationMatrix(array $variationsMatrix, array $attribute, } /** - * Prepare data from source + * Prepare data from source. * * @return void */ @@ -1133,28 +395,7 @@ protected function prepareData() } /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Return prepared data set - * - * @param string|null $key - * @return array - */ - public function getData($key = null) - { - return isset($this->data[$key]) ? $this->data[$key] : $this->data; - } - - /** - * Get prepared attributes data + * Get prepared attributes data. * * @return array */ @@ -1164,7 +405,7 @@ public function getAttributesData() } /** - * Get prepared variations matrix + * Get prepared variations matrix. * * @return array */ @@ -1174,7 +415,7 @@ public function getVariationsMatrix() } /** - * Get prepared attributes + * Get prepared attributes. * * @return array */ @@ -1184,7 +425,7 @@ public function getAttributes() } /** - * Get prepared products + * Get prepared products. * * @return array */ @@ -1192,15 +433,4 @@ public function getProducts() { return $this->products; } - - /** - * Preset array - * - * @param string $name - * @return mixed|null - */ - protected function getPreset($name) - { - return isset($this->presets[$name]) ? $this->presets[$name] : null; - } } diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct.xml index fa36f1aef661a..d2a23302b7cb1 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct.xml +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct.xml @@ -17,11 +17,11 @@ Product online Catalog, Search - taxable_goods + taxable_goods configurable-product-%isolation% - default + default In Stock @@ -30,10 +30,10 @@ Main Website - default + default - default + configurable_default @@ -48,11 +48,11 @@ Product online Catalog, Search - taxable_goods + taxable_goods configurable-product-%isolation% - with_one_option + with_one_option In Stock @@ -61,10 +61,10 @@ Main Website - default + default - with_special_price + configurable_with_special_price @@ -78,11 +78,11 @@ Product online Catalog, Search - taxable_goods + taxable_goods configurable-product-%isolation% - size + size In Stock @@ -91,10 +91,10 @@ Main Website - default + default - default + configurable_default @@ -108,11 +108,11 @@ Product online Catalog, Search - taxable_goods + taxable_goods configurable-product-%isolation% - color_and_size + color_and_size In Stock @@ -121,10 +121,10 @@ Main Website - default + default - default + configurable_default @@ -138,11 +138,11 @@ Product online Catalog, Search - taxable_goods + taxable_goods test-configurable-product-%isolation% - one_variation + one_variation In Stock @@ -151,7 +151,7 @@ Main Website - default + default @@ -166,11 +166,11 @@ Product online Catalog, Search - taxable_goods + taxable_goods configurable-product-%isolation% - default + default In Stock @@ -179,10 +179,10 @@ Main Website - default + default - default + configurable_default @@ -196,11 +196,11 @@ Product online Catalog, Search - taxable_goods + taxable_goods configurable-product-%isolation% - with_one_option + with_one_option In Stock @@ -209,10 +209,10 @@ Main Website - default + default - with_one_option + configurable_one_option @@ -226,11 +226,11 @@ Product online Catalog, Search - taxable_goods + taxable_goods test-configurable-product-%isolation% - with_out_of_stock_item + with_out_of_stock_item In Stock @@ -239,7 +239,7 @@ Main Website - default + default @@ -251,7 +251,7 @@ 10 - taxable_goods + taxable_goods 1 @@ -259,19 +259,19 @@ In Stock - default_subcategory + default_subcategory Main Website - two_options_with_fixed_price + two_options_with_fixed_price - custom_attribute_set + custom_attribute_set - two_options_with_fixed_price + configurable_two_options_with_fixed_price @@ -283,20 +283,20 @@ 10 - taxable_goods + taxable_goods 1 Main Website - two_variations_with_fixed_price + two_variations_with_fixed_price - custom_attribute_set + custom_attribute_set - two_options_by_one_dollar + two_options_by_one_dollar @@ -310,11 +310,11 @@ Product online Catalog, Search - taxable_goods + taxable_goods configurable-product-%isolation% - filterable_two_options_with_zero_price + filterable_two_options_with_zero_price 1 @@ -324,7 +324,7 @@ Main Website - custom_attribute_set + custom_attribute_set @@ -336,7 +336,7 @@ 10 - taxable_goods + taxable_goods 1 @@ -344,19 +344,19 @@ In Stock - default_subcategory + default_subcategory Main Website - two_options_by_one_dollar + two_options_by_one_dollar - custom_attribute_set + custom_attribute_set - two_options_by_one_dollar + two_options_by_one_dollar diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/CheckoutData.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/CheckoutData.xml new file mode 100644 index 0000000000000..87f372d1d1c91 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/CheckoutData.xml @@ -0,0 +1,209 @@ + + + + + + + + + attribute_key_0 + option_key_0 + + + attribute_key_1 + option_key_1 + + + + 3 + + 172 + 3 + 516 + + + + + + + + attribute_key_0 + option_key_0 + + + attribute_key_1 + option_key_1 + + + + 1 + + 172 + 1 + 172 + + + + + + + + attribute_key_0 + option_key_0 + + + + + 101 + + + + + + + + attribute_key_0 + option_key_1 + + + + + 102 + + + + + + + + attribute_key_0 + option_key_0 + + + attribute_key_1 + option_key_0 + + + + + 112 + + + + + + + + attribute_key_0 + option_key_0 + + + attribute_key_1 + option_key_0 + + + attribute_key_2 + option_key_0 + + + + + 112 + + + + + + + + attribute_key_0 + option_key_1 + + + + + 12 + + + + + + + + attribute_key_0 + option_key_0 + + + + 1 + + 10 + 1 + 10 + + + + + + + + attribute_key_0 + option_key_0 + + + + + 101 + + + + + + + + attribute_key_0 + option_key_0 + + + + 1 + + 11 + 1 + 11 + + + + + + + + attribute_key_0 + option_key_1 + + + + 1 + + + + + + + attribute_key_0 + option_key_0 + + + + 1 + + 11 + + + + diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/ConfigurableAttributesData.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/ConfigurableAttributesData.xml new file mode 100644 index 0000000000000..bf2d9d0a85cdb --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/ConfigurableAttributesData.xml @@ -0,0 +1,700 @@ + + + + + + + + + + 12.00 + Yes + No + + + 20.00 + Yes + No + + + 18.00 + Yes + No + + + + + + + 42.00 + Yes + No + + + 40.00 + Yes + No + + + 48.00 + Yes + No + + + + + + catalogProductAttribute::attribute_type_dropdown + catalogProductAttribute::attribute_type_dropdown + + + + + 10 + + 1 + + + + 10 + + 1 + + + + 10 + + 1 + + + + 10 + + 1 + + + + 10 + + 1 + + + + 10 + + 1 + + + + 10 + + 1 + + + + 10 + + 1 + + + + 10 + + 1 + + + + + + + + + + 12.00 + Yes + No + + + + + + catalogProductAttribute::attribute_type_dropdown_one_option + + + + Yes + + 10 + + 1 + + + + + + + + + + 1.00 + Yes + No + + + + + + catalogProductAttribute::attribute_type_dropdown_one_option + + + + Yes + + 10 + + 1 + + + + + + + + + + option_key_1_%isolation% + 1 + Yes + Yes + + + option_key_2_%isolation% + 2 + Yes + Yes + + + + + + catalogProductAttribute::attribute_type_dropdown_two_options + + + + Yes + + 10 + + 1 + + + Yes + + 20 + + 2 + + + + + + + + + + option_key_1_%isolation% + 0 + Yes + No + + + option_key_2_%isolation% + 0 + Yes + No + + + + + + catalogProductAttribute::filterable_dropdown_two_options + + + + Yes + + 10 + + 1 + + + Yes + + 20 + + 2 + + + + + + + + two_new_options_title_%isolation% + Dropdown + two_new_options_title_%isolation% + No + + + option_key_1_%isolation% + 1 + Yes + No + + + option_key_2_%isolation% + 2 + Yes + No + + + + + + + Yes + + 10 + + 1 + + + Yes + + 20 + + 2 + + + + + + + + two_searchable_options_%isolation% + Dropdown + two_searchable_options_%isolation% + No + Yes + Yes + Filterable (with results) + Yes + + + option_key_1_%isolation% + 1 + Yes + No + + + option_key_2_%isolation% + 2 + Yes + No + + + + + + + Yes + + 100 + + 1 + + + Yes + + 100 + + 2 + + + + + + + + + + 1 + Yes + No + + + + + + + + + + + + option_key_1_%isolation% + 1 + Yes + No + + + + + + catalogProductAttribute::attribute_type_dropdown_one_option + + + catalogProductSimple::out_of_stock + + + + + + + + + option_key_1_%isolation% + 1 + Yes + Yes + + + option_key_2_%isolation% + 2 + Yes + Yes + + + + + + catalogProductAttribute::attribute_type_dropdown_two_options + + + catalogProductSimple::default + catalogProductSimple::default + + + + Yes + + 10 + + 1 + + + Yes + + 20 + + 2 + + + + + + + + + + 0.00 + No + Yes + + + 0.00 + No + Yes + + + + + + + 5.00 + No + Yes + + + 10.00 + No + Yes + + + + + + catalogProductAttribute::color + catalogProductAttribute::size + + + + + 100 + + 1 + + + + 100 + + 1 + + + + 100 + + 1 + + + + 100 + + 1 + + + + + + + + + + 0.00 + Yes + No + + + 0.00 + Yes + No + + + + + + catalogProductAttribute::size + + + + + 10 + + 1 + + + + 10 + + 1 + + + + + + + + + + 1 + Yes + No + + + 2 + Yes + No + + + 3 + Yes + No + + + + + + catalogProductAttribute::attribute_type_dropdown + + + + + 10 + + 1 + + + + 10 + + 1 + + + + 10 + + 1 + + + + + + + + + + 12.00 + Yes + No + + + + + + catalogProductSimple::out_of_stock + + + catalogProductAttribute::attribute_type_dropdown_one_option + + + + + + + + + option_key_1_%isolation% + 11 + Yes + No + + + option_2_%isolation% + 12 + Yes + No + + + + + + catalogProductAttribute::attribute_type_dropdown_two_options + + + + Yes + + 100 + + 1 + + + Yes + + 200 + + 1 + + + + + + + + + + option_key_1_%isolation% + 1 + Yes + No + + + option_2_%isolation% + 1 + Yes + No + + + + + + catalogProductAttribute::attribute_type_dropdown_two_options + + + + Yes + + 100 + + 1 + + + Yes + + 200 + + 1 + + + + + + + + + + option_key_1_%isolation% + 1 + Yes + No + + + option_2_%isolation% + 2 + Yes + No + + + + + + catalogProductAttribute::attribute_type_dropdown_two_options + + + catalogProductSimple::product_without_category + catalogProductSimple::product_without_category + + + + Yes + + 100 + + 1 + + + Yes + + 200 + + 1 + + + + + diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.php index 653e734008116..77acc9ecbb265 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.php @@ -27,9 +27,9 @@ * 3. Click on narrow near "Add Product" button * 4. Select Configurable Product * 5. Fill in data according to data sets - * 5.1 If field "attributeNew/dataSet" is not empty - search created attribute by putting it's name + * 5.1 If field "attributeNew/dataset" is not empty - search created attribute by putting it's name * to variation Search field. - * 5.2 If "attribute/dataSet" is not empty- create new Variation Set + * 5.2 If "attribute/dataset" is not empty- create new Variation Set * 6. Save product * 7. Perform all assertions * diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.xml index c90775e494c64..043f4b63cba9f 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.xml @@ -11,12 +11,12 @@ Create product with category and two new options configurable-product-%isolation% - two_new_options - two_new_options + two_new_options + configurable_two_options Configurable Product %isolation% configurable_sku_%isolation% 100 - default_subcategory + default_subcategory Configurable short description Configurable Product description %isolation% 2 @@ -35,8 +35,8 @@ Create product with two options configurable-product-%isolation% - two_options - two_options + two_options + configurable_two_options Configurable Product %isolation% configurable_sku_%isolation% 100 @@ -56,8 +56,8 @@ Create product with special price configurable-product-%isolation% - two_new_options - two_new_options_with_special_price + two_new_options + configurable_two_new_options_with_special_price Configurable Product %isolation% configurable_sku_%isolation% 100 @@ -80,8 +80,8 @@ Bug: MAGETWO-34791 Create product with assigned products to options configurable-product-%isolation% - two_options_with_assigned_product - two_options_with_assigned_product + two_options_with_assigned_product + configurable_two_options_with_assigned_product Configurable Product %isolation% configurable_sku_%isolation% 100 @@ -100,12 +100,12 @@ MAGETWO-12620: Create Configurable Product and Assign it to Category configurable-product-%isolation% - two_options_with_fixed_price + two_options_with_fixed_price Configurable Product %isolation% configurable_sku_%isolation% Taxable Goods 10 - default_subcategory + default_subcategory 1 custom_attribute_set_%isolation% @@ -115,11 +115,11 @@ MAGETWO-13361: Create Configurable Product with Creating New Category and New Attribute (Required Fields Only) - two_searchable_options + two_searchable_options Configurable Product %isolation% 100 no - default_subcategory + default_subcategory configurable-product-%isolation% custom_attribute_set_%isolation% test_type:acceptance_test diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.php index 7aade5f419fff..63c8de2d3e43e 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.php @@ -21,7 +21,7 @@ * 1. Log in to backend. * 2. Open Products -> Catalog. * 3. Search and open configurable product from preconditions. - * 4. Fill in data according to dataSet. + * 4. Fill in data according to dataset. * 5. Save product. * 6. Perform all assertions. * diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.xml index 02d24b92e564b..c093b465be30e 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.xml @@ -12,13 +12,13 @@ addOptions configurableProduct::default configurable-product-%isolation% - one_new_options - two_attributes + one_new_options + configurable_two_attributes 153 Configurable Product %isolation% configurable_sku_%isolation% 99 - default_subcategory + default_subcategory Configurable short description Configurable Product description %isolation% 3 @@ -37,8 +37,8 @@ Add new variations configurableProduct::default configurable-product-%isolation% - two_new_options - three_attributes + two_new_options + configurable_three_attributes 154 Configurable Product %isolation% configurable_sku_%isolation% @@ -60,13 +60,13 @@ deleteLast configurableProduct::default configurable-product-%isolation% - two_new_options - two_attributes + two_new_options + configurable_two_attributes 112 Configurable Product %isolation% configurable_sku_%isolation% 99 - default_subcategory + default_subcategory Configurable short description Configurable Product description %isolation% 3 @@ -85,8 +85,8 @@ deleteAll configurableProduct::default configurable-product-%isolation% - two_new_options_with_zero_products - two_attributes + two_new_options_with_zero_products + configurable_two_attributes Configurable Product %isolation% configurable_sku_%isolation% 99 @@ -105,7 +105,7 @@ addOptions configurableProduct::two_options_with_fixed_price configurable-product-%isolation% - one_new_options + one_new_options Configurable Product %isolation% configurable_sku_%isolation% 99 diff --git a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Fixture/CurrencySymbolEntity.xml b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Fixture/CurrencySymbolEntity.xml index 9b37f90342b5b..fd28c1bea9a9a 100644 --- a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Fixture/CurrencySymbolEntity.xml +++ b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Fixture/CurrencySymbolEntity.xml @@ -6,29 +6,20 @@ */ --> - - - Yes - - - - - - default - - - 0 - - - general - - - - - - Yes - - - - + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Repository/CurrencySymbolEntity.xml b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Repository/CurrencySymbolEntity.xml index 38a879960a771..36b144079a035 100644 --- a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Repository/CurrencySymbolEntity.xml +++ b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Repository/CurrencySymbolEntity.xml @@ -7,6 +7,10 @@ --> + + Yes + + custom diff --git a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/TestCase/AbstractCurrencySymbolEntityTest.php b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/TestCase/AbstractCurrencySymbolEntityTest.php index 5be6ff8e8e5da..acc4e79d62648 100644 --- a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/TestCase/AbstractCurrencySymbolEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/TestCase/AbstractCurrencySymbolEntityTest.php @@ -56,7 +56,7 @@ public function __inject( $this->fixtureFactory = $fixtureFactory; $product = $this->fixtureFactory->createByCode( 'catalogProductSimple', - ['dataSet' => 'product_with_category'] + ['dataset' => 'product_with_category'] ); $product->persist(); diff --git a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/TestCase/ResetCurrencySymbolEntityTest.xml b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/TestCase/ResetCurrencySymbolEntityTest.xml index 4a68b882263ee..f66c1df25289b 100644 --- a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/TestCase/ResetCurrencySymbolEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/TestCase/ResetCurrencySymbolEntityTest.xml @@ -9,7 +9,7 @@ config_currency_symbols_usd_and_uah - currency_symbols_uah + currency_symbols_uah UAH Yes diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupOnCustomerForm.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupOnCustomerForm.php index b06fc4feddb1f..d0f38165dea70 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupOnCustomerForm.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerGroupOnCustomerForm.php @@ -37,7 +37,7 @@ public function processAssert( $customer = $fixtureFactory->createByCode( 'customer', [ - 'dataSet' => 'defaultBackend', + 'dataset' => 'defaultBackend', 'data' => ['group_id' => ['customerGroup' => $customerGroup]] ] ); diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerPasswordChanged.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerPasswordChanged.php index 690b437961fdd..059ca378bc37a 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerPasswordChanged.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerPasswordChanged.php @@ -38,7 +38,7 @@ public function processAssert( $customer = $fixtureFactory->createByCode( 'customer', [ - 'dataSet' => 'default', + 'dataset' => 'default', 'data' => [ 'email' => $initialCustomer->getEmail(), 'password' => $customer->getPassword(), diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Address.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Address.xml index 09e93bbf76968..2493ece8b7467 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Address.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Address.xml @@ -6,84 +6,35 @@ */ --> - - - John - Doe - John.Doe%isolation%@example.com - Magento %isolation% - 6161 West Centinela Avenue - Culver City - California - 90230 - United States - 555-55-555-55 - - - Culver City - - - - - - - - - Magento %isolation% - - - United States - - - - - - John - - - Doe - - - John.Doe%isolation%@example.com - - - - - - 90230 - - - - - - - - - California - - - 6161 West Centinela Avenue - - - - - - 555-55-555-55 - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer.xml index fe4bdb7814a70..143efd72a580f 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer.xml @@ -6,92 +6,42 @@ */ --> - - - John - Doe - - General - - John.Doe%isolation%@example.com - 123123q - 123123q - - - - - - - - - - - - - - - - - - - - - - - - - - John.Doe%isolation%@example.com - - - John - - - - - - - - - Doe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 123123q - - - 123123q - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer/Address.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer/Address.php index b381e4d910818..32ba4b160a5d6 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer/Address.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer/Address.php @@ -6,30 +6,15 @@ namespace Magento\Customer\Test\Fixture\Customer; -use Magento\Customer\Test\Fixture\Address as AddressFixture; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Customer\Test\Fixture\Address as AddressFixture; /** - * Class Address - * Addresses source for customer fixture + * Addresses source for customer fixture. */ -class Address implements FixtureInterface +class Address extends DataSource { - /** - * Source data - * - * @var array - */ - protected $data = []; - - /** - * Source parameters - * - * @var array - */ - protected $params; - /** * Customer addresses fixture * @@ -38,8 +23,7 @@ class Address implements FixtureInterface protected $addressesFixture; /** - * Source constructor - * + * @constructor * @param FixtureFactory $fixtureFactory * @param array $params * @param array $data @@ -48,15 +32,15 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array { $this->params = $params; - if (isset($data['presets'])) { - $data['presets'] = array_map('trim', explode(',', $data['presets'])); - foreach ($data['presets'] as $value) { + if (isset($data['dataset'])) { + $data['dataset'] = array_map('trim', explode(',', $data['dataset'])); + foreach ($data['dataset'] as $value) { /** @var AddressFixture $address*/ - $address = $fixtureFactory->createByCode('address', ['dataSet' => $value]); + $address = $fixtureFactory->createByCode('address', ['dataset' => $value]); $this->data[] = $address->getData(); $this->addressesFixture[] = $address; } - } elseif (empty($data['presets']) && !empty($data['addresses'])) { + } elseif (empty($data['dataset']) && !empty($data['addresses'])) { foreach ($data['addresses'] as $address) { /** @var AddressFixture $address */ $this->data[] = $address->getData(); @@ -66,38 +50,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array } /** - * Persists prepared data into application - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param int|null $key [optional] - * @return array - */ - public function getData($key = null) - { - return isset($this->data[$key]) ? $this->data[$key] : $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Getting addresses fixture + * Getting addresses fixture. * * @return array */ diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer/GroupId.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer/GroupId.php index 592fe020ec132..f7f0b89646990 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer/GroupId.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/Customer/GroupId.php @@ -6,40 +6,24 @@ namespace Magento\Customer\Test\Fixture\Customer; -use Magento\Customer\Test\Fixture\CustomerGroup; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Customer\Test\Fixture\CustomerGroup; /** - * Class GroupId - * Addresses source for customer fixture + * Addresses source for customer fixture. */ -class GroupId implements FixtureInterface +class GroupId extends DataSource { /** - * Source data - * - * @var array - */ - protected $data = []; - - /** - * Source parameters - * - * @var array - */ - protected $params; - - /** - * Customer Group fixture + * Customer Group fixture. * * @var array */ protected $customerGroupFixture; /** - * Source constructor - * + * @constructor * @param FixtureFactory $fixtureFactory * @param array $params * @param array $data @@ -47,9 +31,9 @@ class GroupId implements FixtureInterface public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = []) { $this->params = $params; - if (isset($data['dataSet'])) { + if (isset($data['dataset'])) { /** @var CustomerGroup $customerGroup */ - $customerGroup = $fixtureFactory->createByCode('customerGroup', ['dataSet' => $data['dataSet']]); + $customerGroup = $fixtureFactory->createByCode('customerGroup', ['dataset' => $data['dataset']]); if (!$customerGroup->hasData('customer_group_id')) { $customerGroup->persist(); } @@ -66,39 +50,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array } /** - * Persists prepared data into application - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param int|null $key [optional] - * @return array - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Getting customerGroup fixture + * Getting customer group fixture. * * @return array */ diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroup.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroup.xml index 46083535c8cde..bd0e52cf844d8 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroup.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroup.xml @@ -6,21 +6,16 @@ */ --> - - - customer_code_%isolation% - - customer_tax_class - - - - customer_code_%isolation% - - - - customer_tax_class - - + + + diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroup/TaxClassIds.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroup/TaxClassIds.php index db297d43bb3bb..347c238fc3726 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroup/TaxClassIds.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroup/TaxClassIds.php @@ -6,25 +6,18 @@ namespace Magento\Customer\Test\Fixture\CustomerGroup; +use Magento\Mtf\Fixture\DataSource; use Magento\Tax\Test\Fixture\TaxClass; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; /** * Class TaxClassIds * * Data keys: - * - dataSet + * - dataset */ -class TaxClassIds implements FixtureInterface +class TaxClassIds extends DataSource { - /** - * Tax class name - * - * @var string - */ - protected $data; - /** * TaxClass fixture * @@ -33,6 +26,7 @@ class TaxClassIds implements FixtureInterface protected $taxClass; /** + * @constructor * @param FixtureFactory $fixtureFactory * @param array $params * @param array $data @@ -43,10 +37,10 @@ public function __construct( array $data ) { $this->params = $params; - if (isset($data['dataSet']) && $data['dataSet'] !== '-') { - $dataSet = $data['dataSet']; + if (isset($data['dataset'])) { + $dataset = $data['dataset']; /** @var \Magento\Tax\Test\Fixture\TaxClass $taxClass */ - $taxClass = $fixtureFactory->createByCode('taxClass', ['dataSet' => $dataSet]); + $taxClass = $fixtureFactory->createByCode('taxClass', ['dataset' => $dataset]); if (!$taxClass->hasData('id')) { $taxClass->persist(); } @@ -55,29 +49,6 @@ public function __construct( } } - /** - * Persist custom selections products - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - /** * Return TaxClass fixture * @@ -87,14 +58,4 @@ public function getTaxClass() { return $this->taxClass; } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - return $this->params; - } } diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Address.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Address.xml index b39490b24c48a..3b5723bab0785 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Address.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Address.xml @@ -7,6 +7,19 @@ --> + + John + Doe + John.Doe%isolation%@example.com + Magento %isolation% + 6161 West Centinela Avenue + Culver City + California + 90230 + United States + 555-55-555-55 + + John Doe diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Customer.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Customer.xml index 2dc95ab415c6d..15df2b81f2518 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Customer.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Customer.xml @@ -11,7 +11,7 @@ John Doe - General + General JohnDoe_%isolation%@example.com 123123q @@ -22,7 +22,7 @@ John Doe - customer_group_retail_customer + customer_group_retail_customer JohnDoe_%isolation%@example.com 123123q @@ -38,7 +38,7 @@ 01/01/1990 Male - General + General @@ -46,7 +46,7 @@ John Doe - Retailer + Retailer JohnDoe_%isolation%@example.com 123123q @@ -66,13 +66,13 @@ John Doe - General + General JohnDoe_%isolation%@example.com 123123q 123123q - US_address + US_address @@ -80,13 +80,13 @@ John Doe%isolation% - General + General JohnDoe_%isolation%@example.com 123123q 123123q - US_address_NY + US_address_NY @@ -94,13 +94,13 @@ John Doe%isolation% - General + General JohnDoe_%isolation%@example.com 123123q 123123q - US_address_TX + US_address_TX @@ -108,13 +108,13 @@ John Doe%isolation% - General + General JohnDoe_%isolation%@example.com 123123q 123123q - US_address_NY, US_address + US_address_NY, US_address @@ -122,13 +122,13 @@ John Doe%isolation% - General + General John.Doe%isolation%@example.com 123123q 123123q - US_address_1 + US_address_1 @@ -136,13 +136,13 @@ John Doe%isolation% - Retailer + Retailer John.Doe%isolation%@example.com 123123q 123123q - US_address_1 + US_address_1 @@ -153,7 +153,7 @@ 123123q 123123q - US_address_1 + US_address_1 @@ -164,7 +164,7 @@ 123123q 123123q - UK_address_default_billing + UK_address_default_billing @@ -175,7 +175,7 @@ 123123q 123123q - UK_address_with_VAT + UK_address_with_VAT diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerGroup.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerGroup.xml index 6f495c88b95e7..dd472330ed3f0 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerGroup.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerGroup.xml @@ -7,11 +7,18 @@ --> + + customer_code_%isolation% + + customer_tax_class + + + 1 General - retail_customer + retail_customer @@ -19,7 +26,7 @@ 3 Retailer - retail_customer + retail_customer @@ -27,7 +34,7 @@ 2 Wholesale - retail_customer + retail_customer @@ -40,42 +47,42 @@ 0 NOT LOGGED IN - retail_customer + retail_customer Customer_group_%isolation% - retail_customer + retail_customer Valid VAT ID Domestic %isolation% - retail_customer + retail_customer Valid VAT ID Intra %isolation% - retail_customer + retail_customer Invalid VAT ID %isolation% - retail_customer + retail_customer Error VAT ID %isolation% - retail_customer + retail_customer diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/AbstractApplyVatIdTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/AbstractApplyVatIdTest.php index 4389e18c61643..23030f07c0819 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/AbstractApplyVatIdTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/AbstractApplyVatIdTest.php @@ -67,9 +67,9 @@ public function __prepare(FixtureFactory $fixtureFactory) { $this->fixtureFactory = $fixtureFactory; - foreach ($this->vatGroupDataSets as $group => $dataSet) { + foreach ($this->vatGroupDataSets as $group => $dataset) { /** @var CustomerGroup $groupFixture */ - $groupFixture = $this->fixtureFactory->createByCode('customerGroup', ['dataSet' => $dataSet]); + $groupFixture = $this->fixtureFactory->createByCode('customerGroup', ['dataset' => $dataset]); $groupFixture->persist(); $this->vatGroups[$group] = $groupFixture; } diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ApplyVatIdTest.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ApplyVatIdTest.xml index e381864c2850e..255ac6f90738e 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ApplyVatIdTest.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ApplyVatIdTest.xml @@ -9,9 +9,9 @@ MAGETWO-12447: Enable Automatic Assignment of Customers to Appropriate VAT Group (valid Intra-Union group). - enable_VAT_on_frontend + enable_VAT_on_frontend store_information_DE_with_VAT, enable_VAT_on_frontend - customer_UK_1_default_billing_address + customer_UK_1_default_billing_address 584451913 valid_intra_union_group test_type:3rd_party_test @@ -20,9 +20,9 @@ MAGETWO-12447: Enable Automatic Assignment of Customers to Appropriate VAT Group (invalid VAT ID group). - enable_VAT_on_frontend + enable_VAT_on_frontend store_information_DE_with_VAT, enable_VAT_on_frontend - customer_UK_1_default_billing_address + customer_UK_1_default_billing_address 123456789 invalid_group test_type:3rd_party_test diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ChangeCustomerPasswordTest.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ChangeCustomerPasswordTest.xml index d60ae37768213..2d3334dfd508a 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ChangeCustomerPasswordTest.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ChangeCustomerPasswordTest.xml @@ -8,7 +8,7 @@ - default + default 123123q 123123a 123123a @@ -16,14 +16,14 @@ - default + default 123123 123123a 123123a - default + default 123123q 123123a 123123 diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.xml index cce2180d084f3..1b511d97d5c33 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerBackendEntityTest.xml @@ -11,7 +11,7 @@ General customer without address save Main Website - General + General - John%isolation% - @@ -37,7 +37,7 @@ Customer with prefix save Admin - Wholesale + Wholesale M John%isolation% Jack @@ -63,7 +63,7 @@ General customer from USA save Main Website - General + General - John%isolation% - @@ -89,7 +89,7 @@ Retailer customer without address save Main Website - Retailer + Retailer - John%isolation% - @@ -113,7 +113,7 @@ General customer from Poland save Main Website - General + General - Thomas%isolation% - @@ -139,7 +139,7 @@ MAGETWO-12516: Create New Customer on Backend saveAndContinue Main Website - General + General - John%isolation% - diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerGroupEntityTest.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerGroupEntityTest.xml index a939641976d0a..acb4844ba124c 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerGroupEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/CreateCustomerGroupEntityTest.xml @@ -8,19 +8,19 @@ - retail_customer + retail_customer GroupName%isolation% - retail_customer + retail_customer General - customer_tax_class + customer_tax_class GroupName%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerAddressTest.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerAddressTest.xml index d4c96eef41e1c..f71ac07a13422 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerAddressTest.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerAddressTest.xml @@ -8,8 +8,8 @@ - default - US_address_default_billing,US_address_NY_default_no + default + US_address_default_billing,US_address_NY_default_no diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerBackendEntityTest.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerBackendEntityTest.xml index a3389e3767717..efabd7c64bd78 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerBackendEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/DeleteCustomerBackendEntityTest.xml @@ -8,7 +8,7 @@ - default + default diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ForgotPasswordOnFrontendTest.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ForgotPasswordOnFrontendTest.xml index 42e10059a897b..32ef81cc1e2a8 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ForgotPasswordOnFrontendTest.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ForgotPasswordOnFrontendTest.xml @@ -8,7 +8,7 @@ - customer_US + customer_US diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassAssignCustomerGroupTest.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassAssignCustomerGroupTest.xml index 336c0a5d7d0ec..414eae3135f92 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassAssignCustomerGroupTest.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassAssignCustomerGroupTest.xml @@ -8,7 +8,7 @@ - default + default diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassDeleteCustomerBackendEntityTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassDeleteCustomerBackendEntityTest.php index ef596fbdfa071..b68c1850d0c5f 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassDeleteCustomerBackendEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassDeleteCustomerBackendEntityTest.php @@ -108,7 +108,7 @@ protected function createCustomers($customersQty) { $customers = []; for ($i = 0; $i < $customersQty; $i++) { - $customer = $this->fixtureFactory->createByCode('customer', ['dataSet' => 'default']); + $customer = $this->fixtureFactory->createByCode('customer', ['dataset' => 'default']); $customer->persist(); $customers[] = $customer; } diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassDeleteCustomerBackendEntityTest.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassDeleteCustomerBackendEntityTest.xml index 8a97e9471b18e..a0de3c12b525f 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassDeleteCustomerBackendEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/MassDeleteCustomerBackendEntityTest.xml @@ -8,7 +8,7 @@ - default + default 3 2 diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerBackendEntityTest.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerBackendEntityTest.xml index 57257d4659d3d..acff1c874d93c 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerBackendEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerBackendEntityTest.xml @@ -8,8 +8,8 @@ - default - Wholesale + default + Wholesale %isolation%Prefix_ John_%isolation% Middle Name %isolation% @@ -39,8 +39,8 @@ - default - - + default + - - - - @@ -70,8 +70,8 @@ - default - Retailer + default + Retailer %isolation%Prefix_ Jane_%isolation% Jane Middle Name %isolation% diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerGroupEntityTest.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerGroupEntityTest.xml index 84b8c3279a6c2..ca4632fbb4a23 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerGroupEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/UpdateCustomerGroupEntityTest.xml @@ -9,7 +9,7 @@ stable:no - retail_customer + retail_customer GroupName%isolation% @@ -17,12 +17,12 @@ - - + - General - customer_tax_class + customer_tax_class Group Name %isolation% @@ -30,7 +30,7 @@ - customer_tax_class + customer_tax_class Group#Name%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Dhl/Test/TestCase/OnePageCheckoutTest.xml b/dev/tests/functional/tests/app/Magento/Dhl/Test/TestCase/OnePageCheckoutTest.xml index 6b6a97b9d49e6..1d49ae31a34ba 100644 --- a/dev/tests/functional/tests/app/Magento/Dhl/Test/TestCase/OnePageCheckoutTest.xml +++ b/dev/tests/functional/tests/app/Magento/Dhl/Test/TestCase/OnePageCheckoutTest.xml @@ -11,9 +11,9 @@ MAGETWO-12850 – Use DHL International (EU) Online Shipping Carrier on Checkout as a Registered Customer catalogProductSimple::default, configurableProduct::default, bundleProduct::bundle_fixed_product login - customer_DE - customer_DE - customer_DE + customer_DE + customer_DE + customer_DE DHL Express worldwide Express worldwide diff --git a/dev/tests/functional/tests/app/Magento/Directory/Test/Fixture/CurrencyRate.xml b/dev/tests/functional/tests/app/Magento/Directory/Test/Fixture/CurrencyRate.xml index 70fcf15c96298..8e9a51f944a7d 100644 --- a/dev/tests/functional/tests/app/Magento/Directory/Test/Fixture/CurrencyRate.xml +++ b/dev/tests/functional/tests/app/Magento/Directory/Test/Fixture/CurrencyRate.xml @@ -6,13 +6,15 @@ */ --> - - - USD - EUR - 0.8 - - + diff --git a/dev/tests/functional/tests/app/Magento/Directory/Test/Repository/CurrencyRate.xml b/dev/tests/functional/tests/app/Magento/Directory/Test/Repository/CurrencyRate.xml index c1b6dc96e3cbb..b2cfab8039412 100644 --- a/dev/tests/functional/tests/app/Magento/Directory/Test/Repository/CurrencyRate.xml +++ b/dev/tests/functional/tests/app/Magento/Directory/Test/Repository/CurrencyRate.xml @@ -7,6 +7,12 @@ --> + + USD + EUR + 0.8 + + USD CHF diff --git a/dev/tests/functional/tests/app/Magento/Directory/Test/TestCase/CreateCurrencyRateTest.php b/dev/tests/functional/tests/app/Magento/Directory/Test/TestCase/CreateCurrencyRateTest.php index 22b8d54518de9..5ca238d28ba06 100644 --- a/dev/tests/functional/tests/app/Magento/Directory/Test/TestCase/CreateCurrencyRateTest.php +++ b/dev/tests/functional/tests/app/Magento/Directory/Test/TestCase/CreateCurrencyRateTest.php @@ -20,7 +20,7 @@ * Steps: * 1. Login to backend. * 2. Go to Stores > Currency > Currency Rates. - * 3. Fill currency rate according to dataSet. + * 3. Fill currency rate according to dataset. * 4. Click on 'Save Currency Rates' button. * 5. Perform assertions. * diff --git a/dev/tests/functional/tests/app/Magento/Directory/Test/TestCase/CreateCurrencyRateTest.xml b/dev/tests/functional/tests/app/Magento/Directory/Test/TestCase/CreateCurrencyRateTest.xml index 561f9307ff07f..294132c493afe 100644 --- a/dev/tests/functional/tests/app/Magento/Directory/Test/TestCase/CreateCurrencyRateTest.xml +++ b/dev/tests/functional/tests/app/Magento/Directory/Test/TestCase/CreateCurrencyRateTest.xml @@ -11,9 +11,9 @@ USD EUR 0.8 - currency_symbols_eur - simple_10_dollar - config_currency_symbols_usd_and_eur + currency_symbols_eur + simple_10_dollar + config_currency_symbols_usd_and_eur $10.00 €8.00 test_type:acceptance_test diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php index 76c76772f8f8b..ee17be252c588 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php @@ -10,8 +10,7 @@ use Magento\Mtf\Fixture\FixtureInterface; /** - * Class Item - * Data for verify cart item block on checkout page + * Data for verify cart item block on checkout page. * * Data keys: * - product (fixture data for verify) diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.xml index 7c7caf2f5c249..294d89c5622ee 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.xml +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.xml @@ -6,236 +6,91 @@ */ --> - - - DownloadableProduct_%isolation% - DownloadableProduct_%isolation% - downloadableproduct_%isolation% - - 100.00 - - - taxable_goods - - This is description for downloadable product - This is short description for downloadable product - - 1.000 - In Stock - - Yes - - default - - - - downloadable - - downloadable - 4 - - product - - - - - - - - - - - - - - - - - - - - - - - - This is description for downloadable product - - - - - - - - - - - - - - - - - - - - - 2 - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - 4 - - - DownloadableProduct_%isolation% - - - - - - - - - - - - container2 - - - - - - - 100 - - - - - - 1 - In Stock - - - - - - - - - - - - - - - - This is short description for downloadable product - - - - - default - - - - dafault - - - DownloadableProduct_%isolation% - - - - - - - - - - - - 10 - - - - - - 1 - - - - taxable_goods - - - - - - - - - - default - - - - - - - - - - - - downloadableproduct_%isolation% - - - - - - 4 - - - - - - default - - - - Yes - - - - Main Website - - - - - - - + + + downloadable + + downloadable + 4 + + product + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/CheckoutData.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/CheckoutData.php deleted file mode 100644 index e620a4ca4ac6a..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/CheckoutData.php +++ /dev/null @@ -1,126 +0,0 @@ - [ - 'options' => [ - 'links' => [ - [ - 'label' => 'link_0', - 'value' => 'Yes', - ], - ], - ], - 'cartItem' => [ - 'price' => 23, - 'subtotal' => 23, - ], - ], - 'with_two_bought_links' => [ - 'options' => [ - 'links' => [ - [ - 'label' => 'link_0', - 'value' => 'Yes', - ], - [ - 'label' => 'link_1', - 'value' => 'Yes' - ], - ], - 'cartItem' => [ - 'price' => 23, - 'subtotal' => 23, - ], - ], - ], - 'forUpdateMiniShoppingCart' => [ - 'options' => [ - 'links' => [ - [ - 'label' => 'link_0', - 'value' => 'Yes', - ], - ], - ], - 'cartItem' => [ - 'price' => 23, - 'subtotal' => 22.43, - ], - ], - 'default' => [ - 'options' => [ - 'links' => [ - [ - 'label' => 'link_0', - 'value' => 'Yes', - ], - ], - ], - ], - - 'one_custom_option_and_downloadable_link' => [ - 'options' => [ - 'custom_options' => [ - [ - 'title' => 'attribute_key_0', - 'value' => 'option_key_0' - ], - ], - 'links' => [ - [ - 'label' => 'link_0', - 'value' => 'Yes' - ] - ], - ] - ], - - 'one_dollar_product_with_separated_link' => [ - 'options' => [ - 'links' => [ - [ - 'label' => 'link_0', - 'value' => 'Yes' - ] - ], - ], - 'cartItem' => [ - 'price' => 3, - 'subtotal' => 3, - ], - ], - - 'one_dollar_product_with_no_separated_link' => [ - 'cartItem' => [ - 'price' => 1, - 'subtotal' => 1, - ], - ], - ]; - return isset($presets[$name]) ? $presets[$name] : []; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/GroupPriceOptions.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/GroupPriceOptions.php deleted file mode 100644 index 552f201300fe3..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/GroupPriceOptions.php +++ /dev/null @@ -1,43 +0,0 @@ - [ - [ - 'price' => 20, - 'website' => 'All Websites [USD]', - 'customer_group' => 'NOT LOGGED IN', - ], - ], - 'downloadable_with_tax' => [ - [ - 'price' => 20.00, - 'website' => 'All Websites [USD]', - 'customer_group' => 'General', - ], - ], - ]; - if (!isset($presets[$name])) { - return null; - } - return $presets[$name]; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/Links.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/Links.php deleted file mode 100644 index 3dd27e94ec34b..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/Links.php +++ /dev/null @@ -1,250 +0,0 @@ -params = $params; - $this->data = isset($data['preset']) ? $this->getPreset($data['preset']) : $data; - } - - /** - * Persist group price - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Preset array for downloadable links - * - * @param string $name - * @return array|null - */ - protected function getPreset($name) - { - $presets = [ - 'default' => [ - 'title' => 'Links%isolation%', - 'links_purchased_separately' => 'Yes', - 'downloadable' => [ - 'link' => [ - [ - 'title' => 'link1%isolation%', - 'price' => 2.43, - 'number_of_downloads' => 2, - 'sample' => [ - 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example.com', - ], - 'file_type_url' => 'Yes', - 'file_link_url' => 'http://example.com', - 'is_shareable' => 'No', - 'sort_order' => 1, - ], - [ - 'title' => 'link2%isolation%', - 'price' => 3, - 'number_of_downloads' => 3, - 'sample' => [ - 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example.net', - ], - 'file_type_url' => 'Yes', - 'file_link_url' => 'http://example.net', - 'is_shareable' => 'Yes', - 'sort_order' => 0 - ], - ], - ], - ], - 'one_separately_link' => [ - 'title' => 'Links%isolation%', - 'links_purchased_separately' => 'Yes', - 'downloadable' => [ - 'link' => [ - [ - 'title' => 'link1%isolation%', - 'price' => 2, - 'number_of_downloads' => 2, - 'is_shareable' => 'Use config', - 'sort_order' => 1, - 'sample' => [ - 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example.com', - ], - 'file_type_url' => 'Yes', - 'file_link_url' => 'http://example.com', - ], - ], - ], - ], - 'one_no_separately_link' => [ - 'title' => 'Links%isolation%', - 'links_purchased_separately' => 'No', - 'downloadable' => [ - 'link' => [ - [ - 'title' => 'link1%isolation%', - 'price' => 2, - 'number_of_downloads' => 2, - 'is_shareable' => 'Use config', - 'sort_order' => 1, - 'sample' => [ - 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example.com', - ], - 'file_type_url' => 'Yes', - 'file_link_url' => 'http://example.com', - ], - ], - ], - ], - 'with_two_separately_links' => [ - 'title' => 'Links%isolation%', - 'links_purchased_separately' => 'Yes', - 'downloadable' => [ - 'link' => [ - [ - 'title' => 'link1%isolation%', - 'price' => 2.43, - 'number_of_downloads' => 2, - 'is_shareable' => 'No', - 'sample' => [ - 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example.com/sample', - ], - 'file_type_url' => 'Yes', - 'file_link_url' => 'http://example.com', - 'sort_order' => 0, - ], - [ - 'title' => 'link2%isolation%', - 'price' => 3, - 'number_of_downloads' => 3, - 'is_shareable' => 'Yes', - 'sample' => [ - 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example.net/sample2', - ], - 'file_type_url' => 'Yes', - 'file_link_url' => 'http://example.net/', - 'sort_order' => 1 - ], - ], - ], - ], - 'with_three_links' => [ - 'title' => 'Links%isolation%', - 'links_purchased_separately' => 'Yes', - 'downloadable' => [ - 'link' => [ - [ - 'title' => 'link1%isolation%', - 'price' => 2.43, - 'number_of_downloads' => 2, - 'sample' => [ - 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example.com', - ], - 'file_type_url' => 'Yes', - 'file_link_url' => 'http://example.com', - 'is_shareable' => 'No', - 'sort_order' => 0, - ], - [ - 'title' => 'link2%isolation%', - 'price' => 3, - 'number_of_downloads' => 3, - 'sample' => [ - 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example.net', - ], - 'file_type_url' => 'Yes', - 'file_link_url' => 'http://example.net', - 'is_shareable' => 'Yes', - 'sort_order' => 1 - ], - [ - 'title' => 'link3%isolation%', - 'price' => 5.43, - 'number_of_downloads' => 5, - 'sample' => [ - 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example.net', - ], - 'file_type_url' => 'Yes', - 'file_link_url' => 'http://example.net', - 'is_shareable' => 'Yes', - 'sort_order' => 2 - ], - ], - ], - ], - ]; - if (!isset($presets[$name])) { - return null; - } - return $presets[$name]; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/Samples.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/Samples.php deleted file mode 100644 index 5399800e8a67c..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct/Samples.php +++ /dev/null @@ -1,137 +0,0 @@ -params = $params; - $this->data = isset($data['preset']) ? $this->getPreset($data['preset']) : $data; - } - - /** - * Persist fixture - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Preset array for downloadable samples - * - * @param string $name - * @return array|null - */ - protected function getPreset($name) - { - $presets = [ - 'default' => [ - 'title' => 'Samples%isolation%', - 'downloadable' => [ - 'sample' => [ - [ - 'title' => 'sample1%isolation%', - 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example.com', - 'sort_order' => 0, - ], - [ - 'title' => 'sample2%isolation%', - 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example2.com', - 'sort_order' => 1 - ], - ], - ], - ], - 'with_three_samples' => [ - 'title' => 'Samples%isolation%', - 'downloadable' => [ - 'sample' => [ - [ - 'title' => 'sample1%isolation%', - 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example.com', - 'sort_order' => 0, - ], - [ - 'title' => 'sample2%isolation%', - 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example2.com', - 'sort_order' => 1 - ], - [ - 'title' => 'sample3%isolation%', - 'sample_type_url' => 'Yes', - 'sample_url' => 'http://example3.com', - 'sort_order' => 2 - ], - ], - ], - ], - ]; - - if (!isset($presets[$name])) { - return null; - } - - return $presets[$name]; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct.xml index 13314c0ec5bd9..8d84025eee8b4 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct.xml +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct.xml @@ -12,11 +12,11 @@ sku_test_downloadable_product_%isolation% 280 - - + - downloadable - taxable_goods + taxable_goods 90 @@ -27,13 +27,13 @@ test-downloadable-product-%isolation% Yes - default + with_two_separately_links Main Website - default + downloadable_default @@ -45,7 +45,7 @@ 20 - taxable_goods + taxable_goods 1111 @@ -58,10 +58,10 @@ Main Website - with_two_separately_links + with_two_separately_links - with_two_separately_links + downloadable_with_two_separately_links @@ -73,7 +73,7 @@ 20 - taxable_goods + taxable_goods 1111 @@ -86,10 +86,10 @@ Main Website - with_two_separately_links + with_two_separately_links - with_two_bought_links + downloadable_with_two_bought_links @@ -102,7 +102,7 @@ 20 - taxable_goods + taxable_goods 1111 @@ -110,7 +110,7 @@ Product online - default_subcategory + default_subcategory Catalog, Search Yes @@ -118,10 +118,10 @@ Main Website - with_two_separately_links + with_two_separately_links - with_two_bought_links + downloadable_with_two_bought_links @@ -133,10 +133,10 @@ 30 - downloadable_with_tax + general_90_99 - taxable_goods + taxable_goods 1111 @@ -144,7 +144,7 @@ Product online - default_subcategory + default_subcategory Catalog, Search Yes @@ -152,10 +152,10 @@ Main Website - with_two_separately_links + with_two_separately_links - with_two_bought_links + downloadable_with_two_bought_links @@ -167,7 +167,7 @@ 20 - taxable_goods + taxable_goods 1111 @@ -175,7 +175,7 @@ Product online - default_subcategory + default_subcategory Catalog, Search Yes @@ -183,13 +183,13 @@ Main Website - with_two_separately_links + with_two_separately_links - drop_down_with_one_option_percent_price + drop_down_with_one_option_percent_price - one_custom_option_and_downloadable_link + downloadable_one_custom_option_and_downloadable_link @@ -202,23 +202,23 @@ 1 - default_subcategory + default_subcategory - one_no_separately_link + one_no_separately_link 10 In Stock - taxable_goods + taxable_goods Main Website - one_dollar_product_with_no_separated_link + downloadable_one_dollar_product_with_no_separated_link diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/CheckoutData.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/CheckoutData.xml new file mode 100644 index 0000000000000..eb793f9338972 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/CheckoutData.xml @@ -0,0 +1,109 @@ + + + + + + + + + link_0 + Yes + + + + + + + + 3 + 3 + + + + + + + + link_0 + Yes + + + + + 23 + 23 + + + + + + + + link_0 + Yes + + + link_1 + Yes + + + + + 23 + 23 + + + + + + + + link_0 + Yes + + + + + 23 + 22.43 + + + + + + + + attribute_key_0 + option_key_0 + + + + + link_0 + Yes + + + + + + + + + + link_0 + Yes + + + + + 3 + 3 + + + + diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/Links.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/Links.xml new file mode 100644 index 0000000000000..cd939014a1bb5 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/Links.xml @@ -0,0 +1,137 @@ + + + + + + Links%isolation% + Yes + + + + link1%isolation% + 2 + Use config + 2 + 1 + + Yes + http://example.com + + Yes + http://example.com + + + + + + + Links%isolation% + No + + + + link1%isolation% + 2 + Use config + 2 + 1 + + Yes + http://example.com + + Yes + http://example.com + + + + + + + Links%isolation% + Yes + + + + link1%isolation% + 2.43 + 2 + + Yes + http://example.com + + Yes + http://example.com + No + 1 + + + link2%isolation% + 3 + 3 + + Yes + http://example.com + + Yes + http://example.com + Yes + 0 + + + + + + + Links%isolation% + Yes + + + + link1%isolation% + 2.43 + 2 + + Yes + http://example.com + + Yes + http://example.com + No + 0 + + + link2%isolation% + 3 + 3 + + Yes + http://example.com + + Yes + http://example.com + Yes + 1 + + + link3%isolation% + 5.43 + 5 + + Yes + http://example.com + + Yes + http://example.com + Yes + 2 + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/Samples.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/Samples.xml new file mode 100644 index 0000000000000..65bf205651d1d --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/Samples.xml @@ -0,0 +1,56 @@ + + + + + + Samples%isolation% + + + + sample1%isolation% + Yes + http://example.com + 0 + + + sample2%isolation% + Yes + http://example.com + 1 + + + + + + + Samples%isolation% + + + + sample1%isolation% + Yes + http://example.com + 0 + + + sample2%isolation% + Yes + http://example.com + 1 + + + sample3%isolation% + Yes + http://example.com + 2 + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest.xml index c54301de79898..b02763d9f5fab 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest.xml @@ -13,8 +13,8 @@ DownloadableProduct_%isolation% 1 category %isolation% - one_separately_link - one_dollar_product_with_separated_link + one_separately_link + downloadable_one_dollar_product_with_separated_link downloadableproduct-%isolation% test_type:acceptance_test @@ -27,12 +27,12 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 100 - taxable_goods + taxable_goods 1 In Stock Yes Default Category - default + with_two_separately_links downloadableproduct-%isolation% @@ -46,13 +46,13 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 1 - taxable_goods + taxable_goods 10 In Stock Yes category %isolation% - default - default + with_two_samples + with_two_separately_links downloadableproduct-%isolation% @@ -66,13 +66,13 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 33 - taxable_goods + taxable_goods 10 In Stock Yes category %isolation% - default - default + with_two_separately_links + default downloadableproduct-%isolation% @@ -86,13 +86,13 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 55 - taxable_goods + taxable_goods 10 In Stock Yes - with_three_samples - with_three_links - two_options + with_three_samples + with_three_links + two_options downloadableproduct-%isolation% @@ -109,12 +109,12 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 100 - taxable_goods + taxable_goods 50 Out of Stock Yes Default Category - default + with_two_separately_links downloadableproduct-%isolation% @@ -127,14 +127,14 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 9999 - taxable_goods + taxable_goods Yes Default Category Yes 123 No 123 - default + with_two_separately_links downloadableproduct-%isolation% @@ -146,13 +146,13 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 98 - None + None 5 In Stock Yes Default Category This is description for downloadable product - default + with_two_separately_links downloadableproduct-%isolation% @@ -165,15 +165,15 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 57 - taxable_goods + taxable_goods 10 In Stock Yes category %isolation% This is short description for downloadable product - default - with_three_links - default + with_two_samples + with_three_links + default catalogProductSimple::with_two_custom_option,catalogProductSimple::with_all_custom_option downloadableproduct-%isolation% @@ -189,16 +189,16 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 65 - taxable_goods + taxable_goods 11 In Stock Yes category %isolation% This is description for downloadable product This is short description for downloadable product - default - with_three_links - default + with_two_samples + with_three_links + default downloadableproduct-%isolation% @@ -213,14 +213,14 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 65 - taxable_goods + taxable_goods 11 In Stock Yes category %isolation% - default - with_three_links - default + with_two_samples + with_three_links + default downloadableproduct-%isolation% @@ -234,10 +234,10 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 100 - taxable_goods + taxable_goods Yes Default Category - default + with_two_separately_links downloadableproduct-%isolation% @@ -249,12 +249,12 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 10 - taxable_goods + taxable_goods 10 In Stock Yes category %isolation% - default + with_two_separately_links 5 downloadableproduct-%isolation% @@ -268,13 +268,13 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 365 - taxable_goods + taxable_goods 23 In Stock Yes category %isolation% - default - default + with_two_separately_links + not_logged_in_20 downloadableproduct-%isolation% @@ -287,13 +287,13 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 250 - taxable_goods + taxable_goods 65 In Stock Yes category %isolation% - default - default + with_two_separately_links + default downloadableproduct-%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest.php index 7fd60c8a21085..30bb9409bce62 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest.php @@ -90,7 +90,7 @@ public function __inject( ) { $this->product = $fixtureFactory->createByCode( 'downloadableProduct', - ['dataSet' => 'default'] + ['dataset' => 'default'] ); $this->product->persist(); $this->catalogProductIndex = $catalogProductIndexNewPage; diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest.xml index 10ba00e4d5db1..e0de074a41c10 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest.xml @@ -11,13 +11,13 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 55 - taxable_goods + taxable_goods 10 In Stock Yes - with_three_samples - with_three_links - two_options + with_three_samples + with_three_links + two_options No downloadableproduct-%isolation% @@ -33,12 +33,12 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 100 - taxable_goods + taxable_goods 50 Out of Stock Yes Default Category - default + with_two_separately_links No downloadableproduct-%isolation% @@ -50,7 +50,7 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 9999 - taxable_goods + taxable_goods 123 Yes Default Category @@ -68,13 +68,13 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 48 - None + None 5 In Stock Yes Default Category This is description for downloadable product - default + with_two_separately_links No downloadableproduct-%isolation% @@ -86,15 +86,15 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 54 - taxable_goods + taxable_goods 10 In Stock Yes category %isolation% This is short description for downloadable product - default - with_three_links - default + with_two_samples + with_three_links + default Yes downloadableproduct-%isolation% @@ -110,7 +110,7 @@ DownloadableProduct_%isolation% DownloadableProduct_%isolation% 43 - taxable_goods + taxable_goods 10 In Stock Yes diff --git a/dev/tests/functional/tests/app/Magento/Fedex/Test/TestCase/OnePageCheckoutTest.xml b/dev/tests/functional/tests/app/Magento/Fedex/Test/TestCase/OnePageCheckoutTest.xml index add7f25196463..826ce7a8500a2 100644 --- a/dev/tests/functional/tests/app/Magento/Fedex/Test/TestCase/OnePageCheckoutTest.xml +++ b/dev/tests/functional/tests/app/Magento/Fedex/Test/TestCase/OnePageCheckoutTest.xml @@ -11,9 +11,9 @@ Checkout as guest using FedEx with US shipping origin and UK customer catalogProductSimple::default, configurableProduct::default, bundleProduct::bundle_fixed_product guest - default - UK_address - UK_address + default + UK_address + UK_address Federal Express International Economy International Economy @@ -27,9 +27,9 @@ MAGETWO-12849 – Use FedEx Online Shipping Carrier on Checkout as a Registered Customer catalogProductSimple::default, configurableProduct::default, bundleProduct::bundle_fixed_product login - customer_DE - customer_DE - customer_DE + customer_DE + customer_DE + customer_DE Federal Express Ground Ground diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInBackendOrder.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInBackendOrder.php index 9d4546439a5f9..cdb42c767135d 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInBackendOrder.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInBackendOrder.php @@ -13,7 +13,7 @@ /** * Class AssertGiftMessageInBackendOrder - * Assert that message from dataSet is displayed on order(s) view page on backend. + * Assert that message from dataset is displayed on order(s) view page on backend. */ class AssertGiftMessageInBackendOrder extends AbstractAssertForm { @@ -30,7 +30,7 @@ class AssertGiftMessageInBackendOrder extends AbstractAssertForm ]; /** - * Assert that message from dataSet is displayed on order(s) view page on backend. + * Assert that message from dataset is displayed on order(s) view page on backend. * * @param GiftMessage $giftMessage * @param SalesOrderView $salesOrderView @@ -72,6 +72,6 @@ public function processAssert( */ public function toString() { - return 'Backend gift message form data is equal to data passed from dataSet.'; + return 'Backend gift message form data is equal to data passed from dataset.'; } } diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrder.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrder.php index 4fcfbc2afb80e..d7a16e4e7e2fb 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrder.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrder.php @@ -14,12 +14,12 @@ use Magento\Mtf\Constraint\AbstractConstraint; /** - * Assert that message from dataSet is displayed on order(s) view page on frontend. + * Assert that message from dataset is displayed on order(s) view page on frontend. */ class AssertGiftMessageInFrontendOrder extends AbstractConstraint { /** - * Assert that message from dataSet is displayed on order(s) view page on frontend. + * Assert that message from dataset is displayed on order(s) view page on frontend. * * @param GiftMessage $giftMessage * @param Customer $customer diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrderItems.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrderItems.php index a9a17c123c4c1..a3b09057589ff 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrderItems.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrderItems.php @@ -15,12 +15,12 @@ /** * Class AssertGiftMessageInFrontendOrderItems - * Assert that message from dataSet is displayed for each items on order(s) view page on frontend + * Assert that message from dataset is displayed for each items on order(s) view page on frontend */ class AssertGiftMessageInFrontendOrderItems extends AbstractConstraint { /** - * Assert that message from dataSet is displayed for each items on order(s) view page on frontend + * Assert that message from dataset is displayed for each items on order(s) view page on frontend * * @param GiftMessage $giftMessage * @param Customer $customer diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.xml b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.xml index d11995d1e7dc6..17844e49b69b1 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.xml +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.xml @@ -6,36 +6,22 @@ */ --> - - - Yes - Yes - John Doe - Jane Doe - text_%isolation% - - - - - - 0 - - - John Doe - - - Jane Doe - - - text_%isolation% - - - Yes - - - Yes - - - - + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage/Items.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage/Items.php index d53cc71937440..995f35bb57255 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage/Items.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage/Items.php @@ -6,32 +6,16 @@ namespace Magento\GiftMessage\Test\Fixture\GiftMessage; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; /** - * Class Items - * Prepare Items for GiftMessage + * Prepare Items for GiftMessage. */ -class Items implements FixtureInterface +class Items extends DataSource { /** - * Prepared dataSet data - * - * @var array - */ - protected $data; - - /** - * Data set configuration settings - * - * @var array - */ - protected $params; - - /** - * Constructor - * + * @constructor * @param FixtureFactory $fixtureFactory * @param array $params * @param array $data [optional] @@ -39,46 +23,13 @@ class Items implements FixtureInterface public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = []) { $this->params = $params; - if (isset($data['dataSets'])) { - $dataSets = explode(',', $data['dataSets']); - foreach ($dataSets as $dataSet) { - $this->data[] = $fixtureFactory->createByCode('giftMessage', ['dataSet' => trim($dataSet)]); + if (isset($data['datasets'])) { + $datasets = explode(',', $data['datasets']); + foreach ($datasets as $dataset) { + $this->data[] = $fixtureFactory->createByCode('giftMessage', ['dataset' => trim($dataset)]); } } else { $this->data = $data; } } - - /** - * Persist attribute options - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string|null $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } } diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestCase/CheckoutWithGiftMessagesTest.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestCase/CheckoutWithGiftMessagesTest.php index 18a366d47dfda..9a53ceb731423 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestCase/CheckoutWithGiftMessagesTest.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestCase/CheckoutWithGiftMessagesTest.php @@ -13,7 +13,7 @@ * * Preconditions: * 1. Enable Gift Messages (Order/Items level) - * 2. Create Product according dataSet + * 2. Create Product according dataset * * Steps: * 1. Login as registered customer diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestCase/CheckoutWithGiftMessagesTest.xml b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestCase/CheckoutWithGiftMessagesTest.xml index b6433e7ad8ed1..bdc1fbbd1aee9 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestCase/CheckoutWithGiftMessagesTest.xml +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/TestCase/CheckoutWithGiftMessagesTest.xml @@ -9,8 +9,8 @@ catalogProductSimple::default, catalogProductVirtual::default - default - US_address_1 + default + US_address_1 login Flat Rate Fixed @@ -26,8 +26,8 @@ catalogProductSimple::default, catalogProductVirtual::default - default - US_address_1 + default + US_address_1 login Flat Rate Fixed diff --git a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Constraint/AssertProductAttributeAbsenceForAttributeMapping.php b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Constraint/AssertProductAttributeAbsenceForAttributeMapping.php index 2a48988f1d106..51cd87a021c70 100644 --- a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Constraint/AssertProductAttributeAbsenceForAttributeMapping.php +++ b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Constraint/AssertProductAttributeAbsenceForAttributeMapping.php @@ -40,7 +40,7 @@ public function processAssert( $shoppingAttributes = $fixtureFactory->createByCode( 'googleShoppingAttribute', [ - 'dataSet' => 'default', + 'dataset' => 'default', 'data' => [ 'attribute_set_id' => ['attribute_set' => $productTemplate], ], diff --git a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.xml b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.xml index b33b9b5cc9eb6..bd87d676c2516 100644 --- a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.xml +++ b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.xml @@ -6,27 +6,17 @@ */ --> - - - United States - - default - - Apparel & Accessories - - - - - - - default - - - - United States - - - Apparel & Accessories - - + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute/AttributeSetId.php b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute/AttributeSetId.php index cfaf1d46249e0..0de5da2e41923 100644 --- a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute/AttributeSetId.php +++ b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute/AttributeSetId.php @@ -6,34 +6,19 @@ namespace Magento\GoogleShopping\Test\Fixture\GoogleShoppingAttribute; -use Magento\Catalog\Test\Fixture\CatalogAttributeSet; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Catalog\Test\Fixture\CatalogAttributeSet; /** - * Class AttributeSetId * Prepare Attribute Set * * Data keys: - * - dataSet + * - dataset * - attribute_set */ -class AttributeSetId implements FixtureInterface +class AttributeSetId extends DataSource { - /** - * Data set configuration settings - * - * @var array - */ - protected $params = []; - - /** - * Attribute Set name - * - * @var string - */ - protected $data; - /** * Attribute Set fixture * @@ -42,6 +27,7 @@ class AttributeSetId implements FixtureInterface protected $attributeSet; /** + * @constructor * @param FixtureFactory $fixtureFactory * @param array $params * @param array $data @@ -49,9 +35,9 @@ class AttributeSetId implements FixtureInterface public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = []) { $this->params = $params; - if (isset($data['dataSet'])) { + if (isset($data['dataset'])) { /** @var CatalogAttributeSet $attributeSet */ - $attributeSet = $fixtureFactory->createByCode('catalogAttributeSet', ['dataSet' => $data['dataSet']]); + $attributeSet = $fixtureFactory->createByCode('catalogAttributeSet', ['dataset' => $data['dataset']]); $this->prepareData($attributeSet); } @@ -61,7 +47,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array } /** - * Prepare Catalog Attribute Set data + * Prepare Catalog Attribute Set data. * * @param CatalogAttributeSet $attributeSet * @return void @@ -77,30 +63,7 @@ protected function prepareData(CatalogAttributeSet $attributeSet) } /** - * Persist attribute options - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string|null $key - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return Attribute Set fixture + * Return Attribute Set fixture. * * @return CatalogAttributeSet */ @@ -108,14 +71,4 @@ public function getAttributeSet() { return $this->attributeSet; } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } } diff --git a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Repository/GoogleShoppingAttribute.xml b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Repository/GoogleShoppingAttribute.xml index 043715982e275..38bcf05e8a00e 100644 --- a/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Repository/GoogleShoppingAttribute.xml +++ b/dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Repository/GoogleShoppingAttribute.xml @@ -10,7 +10,7 @@ United States - default + default Apparel & Accessories diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductForm.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductForm.php index fe78ef841ca38..dd4743f943618 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductForm.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductForm.php @@ -44,7 +44,7 @@ public function processAssert( } /** - * Prepare Grouped Options array from preset + * Prepare Grouped Options array from dataset * * @param array $fields * @return array diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/Cart/Item.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/Cart/Item.php index bd6f991bce9ee..c06591804d57c 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/Cart/Item.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/Cart/Item.php @@ -10,8 +10,7 @@ use Magento\Mtf\Fixture\FixtureInterface; /** - * Class Item - * Data for verify cart item block on checkout page + * Data for verify cart item block on checkout page. * * Data keys: * - product (fixture data for verify) @@ -53,37 +52,4 @@ public function __construct(FixtureInterface $product) $this->data = $cartItem; } - - /** - * Persist fixture - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - // - } } diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml index 5fc47bd6a0c65..2653e830bbca7 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml @@ -6,166 +6,73 @@ */ --> - - - GroupedProduct_%isolation% - GroupedProduct_%isolation% - Taxable Goods - This is description for grouped product - This is short description for grouped product - - 1 - In Stock - - - - grouped - - grouped - 4 - - product - - - - - - - - - - - - - - - - - - - - - - - - - This is description for grouped product - - - - - - - - - - - - - - - - - - 2 - - - - - - - - - - - - - - - GroupedProduct_%isolation% - - - - - - - - - - - - container2 - - - - - - - 1 - In Stock - - - - - - - - - - - - - - This is short description for grouped product - - - GroupedProduct_%isolation% - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - - - 4 - - - - - - - Main Website - - - - - - taxable_goods - - + + + grouped + + grouped + 4 + + product + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct/Associated.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct/Associated.php index 427bc6c11cd4e..9bc1dc13d3ac5 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct/Associated.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct/Associated.php @@ -6,45 +6,36 @@ namespace Magento\GroupedProduct\Test\Fixture\GroupedProduct; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Fixture\InjectableFixture; +use Magento\Mtf\Repository\RepositoryFactory; /** - * Class Associated - * Grouped selections preset - * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * Grouped selections sources. */ -class Associated implements FixtureInterface +class Associated extends DataSource { /** - * Prepared dataSet data - * - * @var array - */ - protected $data; - - /** - * Data set configuration settings - * - * @var array - */ - protected $params; - - /** - * Constructor - * + * @constructor + * @param RepositoryFactory $repositoryFactory * @param FixtureFactory $fixtureFactory * @param array $data * @param array $params [optional] * * @SuppressWarnings(PHPMD.NPathComplexity) */ - public function __construct(FixtureFactory $fixtureFactory, array $data, array $params = []) - { + public function __construct( + RepositoryFactory $repositoryFactory, + FixtureFactory $fixtureFactory, + array $data, + array $params = [] + ) { $this->params = $params; - $this->data = isset($data['preset']) ? $this->getPreset($data['preset']) : $data; + $this->data = isset($data['dataset']) + ? $repositoryFactory->get($this->params['repository'])->get($data['dataset']) + : $data; $this->data['products'] = (isset($data['products']) && !is_array($data['products'])) ? explode(',', $data['products']) @@ -52,9 +43,9 @@ public function __construct(FixtureFactory $fixtureFactory, array $data, array $ foreach ($this->data['products'] as $key => $product) { if (!($product instanceof FixtureInterface)) { - list($fixture, $dataSet) = explode('::', $product); + list($fixture, $dataset) = explode('::', $product); /** @var $productFixture InjectableFixture */ - $product = $fixtureFactory->createByCode($fixture, ['dataSet' => $dataSet]); + $product = $fixtureFactory->createByCode($fixture, ['dataset' => $dataset]); } if (!$product->hasData('id')) { $product->persist(); @@ -62,190 +53,11 @@ public function __construct(FixtureFactory $fixtureFactory, array $data, array $ $this->data['products'][$key] = $product; } - $assignedProducts = & $this->data['assigned_products']; + $assignedProducts = &$this->data['assigned_products']; foreach (array_keys($assignedProducts) as $key) { $assignedProducts[$key]['name'] = $this->data['products'][$key]->getName(); $assignedProducts[$key]['id'] = $this->data['products'][$key]->getId(); $assignedProducts[$key]['position'] = $key + 1; } } - - /** - * Persists prepared data into application - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string|null $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return string - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Preset array - * - * @param string $name - * @return mixed|null - */ - protected function getPreset($name) - { - $presets = [ - 'defaultSimpleProduct' => [ - 'assigned_products' => [ - [ - 'id' => '%id%', - 'name' => '%item1_simple::getProductName%', - 'position' => '%position%', - 'qty' => 1, - ], - [ - 'id' => '%id%', - 'name' => '%item1_simple::getProductName%', - 'position' => '%position%', - 'qty' => 2, - ], - ], - 'products' => [ - 'catalogProductSimple::default', - 'catalogProductSimple::product_100_dollar', - ], - ], - 'defaultSimpleProduct_without_qty' => [ - 'assigned_products' => [ - [ - 'id' => '%id%', - 'name' => '%item1_simple::getProductName%', - 'position' => '%position%', - 'qty' => 0, - ], - [ - 'id' => '%id%', - 'name' => '%item1_simple::getProductName%', - 'position' => '%position%', - 'qty' => 0, - ], - ], - 'products' => [ - 'catalogProductSimple::default', - 'catalogProductSimple::product_100_dollar', - ], - ], - 'defaultSimpleProduct_with_specialPrice' => [ - 'assigned_products' => [ - [ - 'id' => '%id%', - 'name' => '%item1_simple::getProductName%', - 'position' => '%position%', - 'qty' => 1, - ], - [ - 'id' => '%id%', - 'name' => '%item1_simple::getProductName%', - 'position' => '%position%', - 'qty' => 2, - ], - ], - 'products' => [ - 'catalogProductSimple::withSpecialPrice', - 'catalogProductSimple::withSpecialPrice', - ], - ], - 'defaultVirtualProduct' => [ - 'assigned_products' => [ - [ - 'id' => '%id%', - 'name' => '%item1_virtual::getProductName%', - 'position' => '%position%', - 'qty' => 1, - ], - [ - 'id' => '%id%', - 'name' => '%item1_virtual::getProductName%', - 'position' => '%position%', - 'qty' => 2, - ], - ], - 'products' => [ - 'catalogProductVirtual::default', - 'catalogProductVirtual::product_50_dollar', - ], - ], - 'three_simple_products' => [ - 'assigned_products' => [ - [ - 'id' => '%id%', - 'name' => '%item1_simple::getProductName%', - 'position' => '%position%', - 'qty' => 3, - ], - [ - 'id' => '%id%', - 'name' => '%item1_simple::getProductName%', - 'position' => '%position%', - 'qty' => 1, - ], - [ - 'id' => '%id%', - 'name' => '%item1_simple::getProductName%', - 'position' => '%position%', - 'qty' => 2, - ], - ], - 'products' => [ - 'catalogProductSimple::default', - 'catalogProductSimple::product_40_dollar', - 'catalogProductSimple::product_100_dollar', - ], - ], - 'simple_downloadable_virtual' => [ - 'assigned_products' => [ - [ - 'id' => '%id%', - 'name' => '%item1_simple::getProductName%', - 'position' => '%position%', - 'qty' => 3, - ], - [ - 'id' => '%id%', - 'name' => '%item2_downloadable::getProductName%', - 'position' => '%position%', - 'qty' => 7, - ], - [ - 'id' => '%id%', - 'name' => '%item3_virtual::getProductName%', - 'position' => '%position%', - 'qty' => 11, - ], - ], - 'products' => [], - ], - ]; - if (!isset($presets[$name])) { - return null; - } - return $presets[$name]; - } } diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct/CheckoutData.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct/CheckoutData.php deleted file mode 100644 index 2871ec912db01..0000000000000 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct/CheckoutData.php +++ /dev/null @@ -1,63 +0,0 @@ - [ - 'options' => [ - [ - 'name' => 'product_key_0', - 'qty' => 3, - ], - [ - 'name' => 'product_key_1', - 'qty' => 1 - ], - [ - 'name' => 'product_key_2', - 'qty' => 2 - ], - ], - 'cartItem' => [ - 'price' => [ - 'product_key_0' => 560, - 'product_key_1' => 40, - 'product_key_2' => 100, - ], - 'qty' => [ - 'product_key_0' => 3, - 'product_key_1' => 1, - 'product_key_2' => 2, - ], - 'subtotal' => [ - 'product_key_0' => 1680, - 'product_key_1' => 40, - 'product_key_2' => 200, - ], - ], - ], - ]; - return isset($presets[$name]) ? $presets[$name] : null; - } -} diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct/Price.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct/Price.php deleted file mode 100644 index 2204d6abae2e0..0000000000000 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct/Price.php +++ /dev/null @@ -1,45 +0,0 @@ - [ - 'compare_price' => [ - 'price_starting' => '100.00', - ], - ], - 'starting-560' => [ - 'compare_price' => [ - 'price_starting' => '560.00', - ], - ], - ]; - if (!isset($presets[$this->currentPreset])) { - return null; - } - return $presets[$this->currentPreset]; - } -} diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct.xml index cd0bc02b3df4c..5a6c373042664 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct.xml +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct.xml @@ -11,15 +11,15 @@ Test grouped product %isolation% sku_test_grouped_product_%isolation% - default + default - defaultSimpleProduct + defaultSimpleProduct Product online Catalog, Search - taxable_goods + taxable_goods test-grouped-product-%isolation% @@ -29,7 +29,7 @@ Main Website - default + default @@ -37,15 +37,15 @@ Test grouped product %isolation% sku_test_grouped_product_%isolation% - default + default - defaultSimpleProduct + defaultSimpleProduct Product online Catalog, Search - taxable_goods + taxable_goods test-grouped-product-%isolation% @@ -55,7 +55,7 @@ Main Website - default + default @@ -64,18 +64,18 @@ sku_test_grouped_product_%isolation% - - starting-100 + starting-100 - default + default - defaultSimpleProduct + defaultSimpleProduct Product online Catalog, Search - taxable_goods + taxable_goods test-grouped-product-%isolation% @@ -85,7 +85,7 @@ Main Website - default + default @@ -93,15 +93,15 @@ Grouped product %isolation% grouped_product_%isolation% - default + default - three_simple_products + three_simple_products Product online Catalog, Search - taxable_goods + taxable_goods test-grouped-product-%isolation% @@ -111,10 +111,10 @@ Main Website - default + default - three_simple_products + grouped_three_simple_products diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct/Associated.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct/Associated.xml new file mode 100644 index 0000000000000..80647ef060751 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct/Associated.xml @@ -0,0 +1,150 @@ + + + + + + + + %id% + %item1_simple::getProductName% + %position% + 1 + + + %id% + %item1_simple::getProductName% + %position% + 2 + + + + catalogProductSimple::default + catalogProductSimple::product_100_dollar + + + + + + + %id% + %item1_simple::getProductName% + %position% + 0 + + + %id% + %item1_simple::getProductName% + %position% + 0 + + + + catalogProductSimple::default + catalogProductSimple::product_100_dollar + + + + + + + %id% + %item1_simple::getProductName% + %position% + 1 + + + %id% + %item1_simple::getProductName% + %position% + 2 + + + + catalogProductSimple::withSpecialPrice + catalogProductSimple::withSpecialPrice + + + + + + + %id% + %item1_virtual::getProductName% + %position% + 1 + + + %id% + %item1_virtual::getProductName% + %position% + 2 + + + + catalogProductVirtual::default + catalogProductVirtual::product_50_dollar + + + + + + + %id% + %item1_simple::getProductName% + %position% + 3 + + + %id% + %item1_simple::getProductName% + %position% + 1 + + + %id% + %item1_simple::getProductName% + %position% + 2 + + + + catalogProductSimple::default + catalogProductSimple::product_40_dollar + catalogProductSimple::product_100_dollar + + + + + + + %id% + %item1_simple::getProductName% + %position% + 3 + + + %id% + %item2_downloadable::getProductName% + %position% + 7 + + + %id% + %item3_virtual::getProductName% + %position% + 11 + + + + catalogProductSimple::default + catalogProductSimple::product_40_dollar + catalogProductSimple::product_100_dollar + + + + diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct/CheckoutData.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct/CheckoutData.xml new file mode 100644 index 0000000000000..f7347bf02add1 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct/CheckoutData.xml @@ -0,0 +1,44 @@ + + + + + + + + product_key_0 + 3 + + + product_key_1 + 1 + + + product_key_2 + 2 + + + + + 560 + 40 + 100 + + + 3 + 1 + 2 + + + 1680 + 40 + 200 + + + + + diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct/Price.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct/Price.xml new file mode 100644 index 0000000000000..d08f7b4cd25c3 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct/Price.xml @@ -0,0 +1,22 @@ + + + + + + + 100.00 + + + + + + 560.00 + + + + diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedProductEntityTest.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedProductEntityTest.xml index d7e287983b276..5bf7aed2f1f12 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedProductEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/CreateGroupedProductEntityTest.xml @@ -6,147 +6,127 @@ */ --> - - - MAGETWO-13610: Create Grouped Product and Assign It to the Category - test-grouped-product-%isolation% - GroupedProduct %isolation% - GroupedProduct_sku%isolation% - - - category_%isolation% - - - catalogProductSimple::simple_big_qty,downloadableProduct::one_dollar_product_with_no_separated_link,catalogProductVirtual::required_fields_with_category - simple_downloadable_virtual - - - - - test_type:acceptance_test - - - - - - Create with required products and description - test-grouped-product-%isolation% - GroupedProduct %isolation% - GroupedProduct_sku%isolation% - In Stock - category_%isolation% - This is description for grouped product - catalogProductSimple::simple_for_composite_products,catalogProductSimple::simple_for_composite_products - defaultSimpleProduct - This is short description for grouped product - Yes - - - - - Create product without category - test-grouped-product-%isolation% - GroupedProduct %isolation% - - - In Stock - - - - - catalogProductSimple::simple_for_composite_products,catalogProductSimple::simple_for_composite_products - defaultSimpleProduct - - - No - - - - - - Create product out of stock - test-grouped-product-%isolation% - GroupedProduct %isolation% - GroupedProduct_sku%isolation% - Out of Stock - category_%isolation% - - - catalogProductSimple::simple_for_composite_products,catalogProductSimple::simple_for_composite_products - defaultSimpleProduct - - - No - - - - Create with no required products - test-grouped-product-%isolation% - GroupedProduct %isolation% - GroupedProduct_sku%isolation% - In Stock - category_%isolation% - - - catalogProductSimple::simple_for_composite_products,catalogProductSimple::simple_for_composite_products - defaultSimpleProduct - - - No - - - - - - Create with special price products - test-grouped-product-%isolation% - GroupedProduct %isolation% - GroupedProduct_sku%isolation% - In Stock - category_%isolation% - - - catalogProductSimple::withSpecialPrice,catalogProductSimple::withSpecialPrice - defaultSimpleProduct - - - No - - - - - - Create with group price products - test-grouped-product-%isolation% - GroupedProduct %isolation% - GroupedProduct_sku%isolation% - In Stock - category_%isolation% - - - catalogProductSimple::simple_with_group_price,catalogProductSimple::simple_with_group_price - defaultSimpleProduct - - - No - - - - - - Create with virtual products - test-grouped-product-%isolation% - GroupedProduct %isolation% - GroupedProduct_sku%isolation% - In Stock - category_%isolation% - - - catalogProductVirtual::virtual_product,catalogProductVirtual::virtual_product - defaultVirtualProduct - - - Yes - - - - - Create with tier price products - test-grouped-product-%isolation% - GroupedProduct %isolation% - GroupedProduct_sku%isolation% - In Stock - category_%isolation% - - - catalogProductSimple::simple_with_tier_price,catalogProductSimple::simple_with_tier_price - defaultSimpleProduct - - - No - - - - - + + + MAGETWO-13610: Create Grouped Product and Assign It to the Category + test-grouped-product-%isolation% + GroupedProduct %isolation% + GroupedProduct_sku%isolation% + category_%isolation% + catalogProductSimple::simple_big_qty,downloadableProduct::one_dollar_product_with_no_separated_link,catalogProductVirtual::required_fields_with_category + simple_downloadable_virtual + test_type:acceptance_test + + + + + + Create with required products and description + test-grouped-product-%isolation% + GroupedProduct %isolation% + GroupedProduct_sku%isolation% + In Stock + category_%isolation% + This is description for grouped product + catalogProductSimple::simple_for_composite_products,catalogProductSimple::simple_for_composite_products + defaultSimpleProduct + This is short description for grouped product + Yes + + + + + Create product without category + test-grouped-product-%isolation% + GroupedProduct %isolation% + In Stock + catalogProductSimple::simple_for_composite_products,catalogProductSimple::simple_for_composite_products + defaultSimpleProduct + No + + + + + + Create product out of stock + test-grouped-product-%isolation% + GroupedProduct %isolation% + GroupedProduct_sku%isolation% + Out of Stock + category_%isolation% + catalogProductSimple::simple_for_composite_products,catalogProductSimple::simple_for_composite_products + defaultSimpleProduct + No + + + + Create with no required products + test-grouped-product-%isolation% + GroupedProduct %isolation% + GroupedProduct_sku%isolation% + In Stock + category_%isolation% + catalogProductSimple::simple_for_composite_products,catalogProductSimple::simple_for_composite_products + defaultSimpleProduct + No + + + + + + Create with special price products + test-grouped-product-%isolation% + GroupedProduct %isolation% + GroupedProduct_sku%isolation% + In Stock + category_%isolation% + catalogProductSimple::withSpecialPrice,catalogProductSimple::withSpecialPrice + defaultSimpleProduct + No + + + + + + Create with group price products + test-grouped-product-%isolation% + GroupedProduct %isolation% + GroupedProduct_sku%isolation% + In Stock + category_%isolation% + catalogProductSimple::simple_with_group_price,catalogProductSimple::simple_with_group_price + defaultSimpleProduct + No + + + + + + Create with virtual products + test-grouped-product-%isolation% + GroupedProduct %isolation% + GroupedProduct_sku%isolation% + In Stock + category_%isolation% + catalogProductVirtual::virtual_product,catalogProductVirtual::virtual_product + defaultVirtualProduct + Yes + + + + + Create with tier price products + test-grouped-product-%isolation% + GroupedProduct %isolation% + GroupedProduct_sku%isolation% + In Stock + category_%isolation% + catalogProductSimple::simple_with_tier_price,catalogProductSimple::simple_with_tier_price + defaultSimpleProduct + No + + + + + diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/UpdateGroupedProductEntityTest.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/UpdateGroupedProductEntityTest.xml index cc918d24c96e6..207cb0711a829 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/UpdateGroupedProductEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/TestCase/UpdateGroupedProductEntityTest.xml @@ -8,11 +8,11 @@ - grouped_product_out_of_stock + grouped_product_out_of_stock GroupedProduct_edited %isolation% GroupedProduct_sku_edited %isolation% In Stock - category_%isolation% + category_%isolation% This is edited description for grouped product This is edited short description for grouped product updated-grouped-product-%isolation% @@ -21,38 +21,38 @@ - default + default GroupedProduct_edited %isolation% GroupedProduct_sku_edited %isolation% catalogProductVirtual::default,catalogProductVirtual::product_50_dollar - defaultVirtualProduct + defaultVirtualProduct updated-grouped-product-%isolation% - default + default GroupedProduct_edited %isolation% GroupedProduct_sku_edited %isolation% catalogProductSimple::simple_for_composite_products,catalogProductSimple::default - defaultSimpleProduct_without_qty + defaultSimpleProduct_without_qty updated-grouped-product-%isolation% - default + default GroupedProduct_edited %isolation% GroupedProduct_sku_edited %isolation% catalogProductSimple::withSpecialPrice,catalogProductSimple::withSpecialPrice - defaultSimpleProduct_with_specialPrice + defaultSimpleProduct_with_specialPrice updated-grouped-product-%isolation% - default + default GroupedProduct_edited %isolation% GroupedProduct_sku_edited %isolation% Out of Stock diff --git a/dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.xml b/dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.xml index ac1253f96a0c0..3386350d698c1 100644 --- a/dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.xml +++ b/dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.xml @@ -6,22 +6,15 @@ */ --> - - - Products - CSV - - - - - - Products - - - CSV - - - - + + + + + diff --git a/dev/tests/functional/tests/app/Magento/ImportExport/Test/Repository/ImportExport.xml b/dev/tests/functional/tests/app/Magento/ImportExport/Test/Repository/ImportExport.xml new file mode 100644 index 0000000000000..483a9341489fe --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/ImportExport/Test/Repository/ImportExport.xml @@ -0,0 +1,15 @@ + + + + + + Products + CSV + + + diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.xml b/dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.xml index 2d83153459204..10a8fdae3d894 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.xml +++ b/dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.xml @@ -6,7 +6,13 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.xml b/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.xml index ff6ba2d1f1d7c..5eb2c388a74a0 100644 --- a/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.xml +++ b/dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.xml @@ -9,20 +9,20 @@ Install with default values. - default + default Install with custom admin path. - default + default custom Install with custom encryption key and changed currency and locale. - default + default Yes 123123qa German (Germany) @@ -37,7 +37,7 @@ Install with table prefix. - default + default prefix1_ Chinese (China) @@ -45,7 +45,7 @@ Install with enabled url rewrites. - default + default Yes @@ -53,7 +53,7 @@ Install with enabled secure urls. - default + default Yes Yes diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.xml b/dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.xml index 30c8310ea5534..f2ed1bfc1e24d 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.xml +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.xml @@ -6,86 +6,40 @@ */ --> - - - default_integration_%isolation% - test_%isolation%@example.com - All - - - - - - default_integration_%isolation% - - - test_%isolation%@example.com - - - - - - - - - - - - CURRENT_TIMESTAMP - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - 0 - - - - - - - - - - - - All - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/Repository/Integration.xml b/dev/tests/functional/tests/app/Magento/Integration/Test/Repository/Integration.xml index 4fe24f70c1da6..c4a76d5b60ffd 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/Repository/Integration.xml +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/Repository/Integration.xml @@ -7,6 +7,12 @@ --> + + default_integration_%isolation% + test_%isolation%@example.com + All + + default_integration_%isolation% test_%isolation%@example.com diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ActivateIntegrationEntityTest.xml b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ActivateIntegrationEntityTest.xml index b77b66906a0c8..b369ae1c3b3c2 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ActivateIntegrationEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ActivateIntegrationEntityTest.xml @@ -8,7 +8,7 @@ - default_with_all_resources + default_with_all_resources 1 diff --git a/dev/tests/functional/tests/app/Magento/LayeredNavigation/Test/TestCase/FilterProductListTest.xml b/dev/tests/functional/tests/app/Magento/LayeredNavigation/Test/TestCase/FilterProductListTest.xml index 4cfbc8d6397ff..8c65b126821d4 100644 --- a/dev/tests/functional/tests/app/Magento/LayeredNavigation/Test/TestCase/FilterProductListTest.xml +++ b/dev/tests/functional/tests/app/Magento/LayeredNavigation/Test/TestCase/FilterProductListTest.xml @@ -9,8 +9,8 @@ layered_navigation_manual_range_10 - default_anchor_subcategory - catalogProductSimple::product_20_dollar, configurableProduct::filterable_two_options_with_zero_price + default_anchor_subcategory + catalogProductSimple::product_20_dollar, configurableProduct::filterable_two_options_with_zero_price diff --git a/dev/tests/functional/tests/app/Magento/Msrp/Test/Repository/CatalogProductSimple.xml b/dev/tests/functional/tests/app/Magento/Msrp/Test/Repository/CatalogProductSimple.xml index b0a4b9350abbd..4553883e0c2a7 100644 --- a/dev/tests/functional/tests/app/Magento/Msrp/Test/Repository/CatalogProductSimple.xml +++ b/dev/tests/functional/tests/app/Magento/Msrp/Test/Repository/CatalogProductSimple.xml @@ -9,7 +9,7 @@ - default + default Simple Product with msrp %isolation% sku_simple_product_with_msrp_%isolation% @@ -20,17 +20,17 @@ 560 - - + - - taxable_goods + taxable_goods Main Website Catalog, Search - order_default + simple_order_default 600 Before Order Confirmation @@ -47,13 +47,13 @@ 10 - - + - - default_subcategory + default_subcategory - taxable_goods + taxable_goods Main Website diff --git a/dev/tests/functional/tests/app/Magento/Msrp/Test/Repository/ConfigurableProduct.xml b/dev/tests/functional/tests/app/Magento/Msrp/Test/Repository/ConfigurableProduct.xml index ba737437dc71b..32e6d1cf28fce 100644 --- a/dev/tests/functional/tests/app/Magento/Msrp/Test/Repository/ConfigurableProduct.xml +++ b/dev/tests/functional/tests/app/Magento/Msrp/Test/Repository/ConfigurableProduct.xml @@ -15,27 +15,27 @@ 30 - taxable_goods + taxable_goods test-configurable-product-%isolation% - default_subcategory + default_subcategory 1 In Stock - one_variation_one_dollar + one_variation_one_dollar Main Website - custom_attribute_set + custom_attribute_set - with_one_option + configurable_one_option 15 On Gesture diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.xml b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.xml index 6311e64c6602a..38155dfa637f6 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.xml +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.xml @@ -6,49 +6,26 @@ */ --> - - - TemplateName%isolation% - TemplateSubject%isolation% - SenderName%isolation% - SenderName%isolation%@example.com - Some text %isolation% - - - - - - TemplateName%isolation% - - - Some text %isolation% - - - - - - - - - - - - TemplateSubject%isolation% - - - SenderName%isolation% - - - SenderName%isolation%@example.com - - - 1 - - - - - - - - + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/ActionNewsletterTemplateEntityTest.php b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/ActionNewsletterTemplateEntityTest.php index 1bffdfc6e1ae3..ff1fec3232d34 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/ActionNewsletterTemplateEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/ActionNewsletterTemplateEntityTest.php @@ -21,7 +21,7 @@ * 1. Open Backend * 2. Go to Marketing > Newsletter Template * 3. Find created template in grid - * 4. Select action in action dropdown for created template according to dataSet + * 4. Select action in action dropdown for created template according to dataset * 5. Perform all assertions * * @group Newsletters_(MX) diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/ActionNewsletterTemplateEntityTest.xml b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/ActionNewsletterTemplateEntityTest.xml index f00372d3f7564..53f8aa6c0869a 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/ActionNewsletterTemplateEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/TestCase/ActionNewsletterTemplateEntityTest.xml @@ -8,12 +8,12 @@ - default + default Preview - default + default Queue Newsletter diff --git a/dev/tests/functional/tests/app/Magento/Payment/Test/Fixture/CreditCard.xml b/dev/tests/functional/tests/app/Magento/Payment/Test/Fixture/CreditCard.xml index b77e94c4b0245..cbc6eadb0c65f 100644 --- a/dev/tests/functional/tests/app/Magento/Payment/Test/Fixture/CreditCard.xml +++ b/dev/tests/functional/tests/app/Magento/Payment/Test/Fixture/CreditCard.xml @@ -6,7 +6,12 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertBestsellerReportResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertBestsellerReportResult.php index 30e3f10dd6247..182b567985b6e 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertBestsellerReportResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertBestsellerReportResult.php @@ -51,6 +51,6 @@ public function processAssert(Bestsellers $bestsellers, OrderInjectable $order, */ public function toString() { - return 'Bestseller total result is equals to data from dataSet.'; + return 'Bestseller total result is equals to data from dataset.'; } } diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertNewAccountsReportTotalResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertNewAccountsReportTotalResult.php index b453dc730f2f4..eada24c44870c 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertNewAccountsReportTotalResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertNewAccountsReportTotalResult.php @@ -11,12 +11,12 @@ /** * Class AssertNewAccountsReportTotalResult - * Assert that new account total result is equals to data from dataSet + * Assert that new account total result is equals to data from dataset */ class AssertNewAccountsReportTotalResult extends AbstractConstraint { /** - * Assert that new account total result is equals to data from dataSet + * Assert that new account total result is equals to data from dataset * * @param CustomerAccounts $customerAccounts * @param string $total @@ -35,6 +35,6 @@ public function processAssert(CustomerAccounts $customerAccounts, $total) */ public function toString() { - return 'New account total result is equals to data from dataSet.'; + return 'New account total result is equals to data from dataset.'; } } diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductViewsReportTotalResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductViewsReportTotalResult.php index 7218c72efa61a..bd9f6e9ddaefe 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductViewsReportTotalResult.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertProductViewsReportTotalResult.php @@ -37,6 +37,6 @@ public function processAssert(ProductReportView $productReportView, $total, arra */ public function toString() { - return 'Products view total result is equals to data from dataSet.'; + return 'Products view total result is equals to data from dataset.'; } } diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertSearchTermReportForm.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertSearchTermReportForm.php index d82d59837b6d0..d7956d8e69235 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertSearchTermReportForm.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertSearchTermReportForm.php @@ -12,12 +12,12 @@ /** * Class AssertSearchTermReportForm - * Assert that Search Term Report form data equals to passed from dataSet + * Assert that Search Term Report form data equals to passed from dataset */ class AssertSearchTermReportForm extends AbstractAssertForm { /** - * Assert that Search Term Report form data equals to passed from dataSet + * Assert that Search Term Report form data equals to passed from dataset * * @param CatalogSearchEdit $catalogSearchEdit * @param SearchIndex $searchIndex @@ -53,6 +53,6 @@ public function processAssert( */ public function toString() { - return 'Search Term Report form data equals to passed from dataSet.'; + return 'Search Term Report form data equals to passed from dataset.'; } } diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.xml b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.xml index c035d7e9c326e..21bce61e60d33 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.xml @@ -9,13 +9,13 @@ add product to cart as registered user and check product in Report - default + default catalogProductSimple::product_100_dollar add two products to cart as registered user and check product in Report - default + default catalogProductSimple::product_100_dollar,catalogProductSimple::product_100_dollar diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomerReviewReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomerReviewReportEntityTest.php index 37e7727e7299c..ad89adee0371b 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomerReviewReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomerReviewReportEntityTest.php @@ -88,7 +88,7 @@ class CustomerReviewReportEntityTest extends Injectable */ public function __prepare(FixtureFactory $fixtureFactory) { - $customer = $fixtureFactory->createByCode('customer', ['dataSet' => 'johndoe_unique']); + $customer = $fixtureFactory->createByCode('customer', ['dataset' => 'johndoe_unique']); $customer->persist(); return ['customer' => $customer]; diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomerReviewReportEntityTest.xml b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomerReviewReportEntityTest.xml index 26430b8ea9c72..1ccaf332596e0 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomerReviewReportEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomerReviewReportEntityTest.xml @@ -9,7 +9,7 @@ Yes - default + default Customer name_upd_%isolation% title_upd_%isolation% @@ -20,7 +20,7 @@ Yes - default + default Customer name_upd_%isolation% title_upd_%isolation% @@ -31,7 +31,7 @@ No - default + default name_upd_%isolation% title_upd_%isolation% review_upd_%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/LowStockProductsReportEntityTest.xml b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/LowStockProductsReportEntityTest.xml index 449a25fd9192d..1e0d204cf5657 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/LowStockProductsReportEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/LowStockProductsReportEntityTest.xml @@ -8,7 +8,7 @@ - low_stock_product + low_stock_product diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/NewAccountsReportEntityTest.xml b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/NewAccountsReportEntityTest.xml index 9d23f499e401e..5fdce0f825622 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/NewAccountsReportEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/NewAccountsReportEntityTest.xml @@ -8,7 +8,7 @@ - default + default 1 m/d/Y m/d/Y @@ -16,7 +16,7 @@ - default + default 1 m/d/Y m/d/Y @@ -24,7 +24,7 @@ - default + default 1 m/d/Y m/d/Y @@ -32,7 +32,7 @@ - default + default 0 m/d/Y 12:00 a+1 day m/d/Y 12:00 a+1 day diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductReviewReportEntityTest.xml b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductReviewReportEntityTest.xml index c9c25cc407a1c..776be4490f393 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductReviewReportEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductReviewReportEntityTest.xml @@ -8,7 +8,7 @@ - frontend_review + frontend_review diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntityTest.xml b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntityTest.xml index c2b2cfec986de..4be8a7343647a 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ProductsInCartReportEntityTest.xml @@ -8,13 +8,13 @@ - default + default 1 0 - default + default 2 1 diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SearchTermsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SearchTermsReportEntityTest.php index eba901312b796..ab9cde1d837eb 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SearchTermsReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SearchTermsReportEntityTest.php @@ -102,7 +102,7 @@ protected function createProducts($product, $countProduct) for ($i = 0; $i < $countProduct; $i++) { $productFixture = $this->fixtureFactory->createByCode( 'catalogProductSimple', - ['dataSet' => $product, 'data' => ['name' => $name]] + ['dataset' => $product, 'data' => ['name' => $name]] ); $productFixture->persist(); } diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.php index fe6ddf9400e7e..06f24a188832c 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.php @@ -122,7 +122,7 @@ protected function prepareProducts($productList) $products = []; foreach ($productsData as $productConfig) { $product = explode('::', $productConfig); - $productFixture = $this->fixtureFactory->createByCode($product[0], ['dataSet' => $product[1]]); + $productFixture = $this->fixtureFactory->createByCode($product[0], ['dataset' => $product[1]]); $productFixture->persist(); $products[] = $productFixture; } diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.xml b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.xml index d551947d8c420..4eb0c4f5dd9b2 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.xml +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.xml @@ -6,30 +6,21 @@ */ --> - - - Rating %isolation% - Main Website/Main Website Store/Default Store View - Yes - - - - - - 0 - - - Rating %isolation% - - - 0 - - - Yes - - - Main Website/Main Website Store/Default Store View - - - + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.xml b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.xml index a118552b4f5c6..41d99fc38a70e 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.xml +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.xml @@ -6,76 +6,26 @@ */ --> - - - Approved - - Main Website/Main Website Store/Default Store View - - Guest customer %isolation% - Summary review %isolation% - Text review %isolation% - - - visibleOnDefaultWebsite - 4 - - - - catalogProductSimple::default - - Administrator - - - 0 - - - CURRENT_TIMESTAMP - - - - catalogProductSimple::default - - - - 0 - - - Approved - - - - - - 0 - - - Summary review %isolation% - - - Text review %isolation% - - - Guest customer %isolation% - - - - - - - Main Website/Main Website Store/Default Store View - - - - - - visibleOnDefaultWebsite - 4 - - - - - Administrator - - + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review/EntityId.php b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review/EntityId.php index 6dd94f98ea905..9b1d81495afbd 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review/EntityId.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review/EntityId.php @@ -6,32 +6,17 @@ namespace Magento\Review\Test\Fixture\Review; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; use Magento\Mtf\Fixture\FixtureInterface; -use Magento\Mtf\Fixture\InjectableFixture; /** - * Class EntityId - * Source for entity id fixture + * Source for entity id fixture. */ -class EntityId extends InjectableFixture +class EntityId extends DataSource { /** - * Configuration settings - * - * @var array - */ - protected $params; - - /** - * Id of the created entity - * - * @var int - */ - protected $data = null; - - /** - * The created entity + * The created entity. * * @var FixtureInterface */ @@ -47,9 +32,9 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array { $this->params = $params; - if (isset($data['dataSet'])) { - list($typeFixture, $dataSet) = explode('::', $data['dataSet']); - $fixture = $fixtureFactory->createByCode($typeFixture, ['dataSet' => $dataSet]); + if (isset($data['dataset'])) { + list($typeFixture, $dataset) = explode('::', $data['dataset']); + $fixture = $fixtureFactory->createByCode($typeFixture, ['dataset' => $dataset]); if (!$fixture->hasData('id')) { $fixture->persist(); } @@ -60,40 +45,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array } /** - * Persist data - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return id of the created entity - * - * @param string|null $key [optional] - * @return int - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Get entity + * Get entity. * * @return FixtureInterface|null */ diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review/Ratings.php b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review/Ratings.php index c19487164c895..122894c6c7fc4 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review/Ratings.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review/Ratings.php @@ -6,32 +6,17 @@ namespace Magento\Review\Test\Fixture\Review; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; use Magento\Review\Test\Fixture\Rating; /** - * Class Ratings - * Source for product ratings fixture + * Source for product ratings fixture. */ -class Ratings implements FixtureInterface +class Ratings extends DataSource { /** - * Configuration settings of fixture - * - * @var array - */ - protected $params; - - /** - * Data of the created ratings - * - * @var array - */ - protected $data = []; - - /** - * List of the created ratings + * List of the created ratings. * * @var array */ @@ -50,8 +35,8 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array $fixtureRating = null; foreach ($data as $rating) { - if (isset($rating['dataSet'])) { - $fixtureRating = $fixtureFactory->createByCode('rating', ['dataSet' => $rating['dataSet']]); + if (isset($rating['dataset'])) { + $fixtureRating = $fixtureFactory->createByCode('rating', ['dataset' => $rating['dataset']]); if (!$fixtureRating->hasData('rating_id')) { $fixtureRating->persist(); } @@ -70,40 +55,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array } /** - * Persist data - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string|null $key [optional] - * @return array - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Get ratings + * Get ratings. * * @return array */ diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Repository/Review.php b/dev/tests/functional/tests/app/Magento/Review/Test/Repository/Review.php index 537245718b649..5b3ae814f05f3 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Repository/Review.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Repository/Review.php @@ -32,11 +32,11 @@ public function __construct(array $defaultConfig = [], array $defaultData = []) 'detail' => 'review_detail_%isolation%', 'ratings' => [ [ - 'dataSet' => 'visibleOnDefaultWebsite', + 'dataset' => 'visibleOnDefaultWebsite', 'rating' => mt_rand(1, 5) ] ], - 'entity_id' => ['dataSet' => 'catalogProductSimple::default'] + 'entity_id' => ['dataset' => 'catalogProductSimple::default'] ]; $this->_data['frontend_review'] = [ @@ -45,7 +45,7 @@ public function __construct(array $defaultConfig = [], array $defaultData = []) 'nickname' => 'nickname_%isolation%', 'title' => 'title_%isolation%', 'detail' => 'review_detail_%isolation%', - 'entity_id' => ['dataSet' => 'catalogProductSimple::default'] + 'entity_id' => ['dataset' => 'catalogProductSimple::default'] ]; } } diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/Repository/Review.xml b/dev/tests/functional/tests/app/Magento/Review/Test/Repository/Review.xml index 3b9bf8f267818..d4b841bdd2c21 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/Repository/Review.xml +++ b/dev/tests/functional/tests/app/Magento/Review/Test/Repository/Review.xml @@ -7,6 +7,26 @@ --> + + Approved + + Main Website/Main Website Store/Default Store View + + Guest customer %isolation% + Summary review %isolation% + Text review %isolation% + + + visibleOnDefaultWebsite + 4 + + + + catalogProductSimple::default + + Administrator + + Approved @@ -17,12 +37,12 @@ review_detail_%isolation% - visibleOnDefaultWebsite + visibleOnDefaultWebsite 5 - catalogProductSimple::default + catalogProductSimple::default @@ -35,7 +55,7 @@ title_%isolation% review_detail_%isolation% - catalogProductSimple::default + catalogProductSimple::default diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductRatingEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductRatingEntityTest.php index aff4c995ddb80..c1e5de868dfbd 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductRatingEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductRatingEntityTest.php @@ -67,7 +67,7 @@ class CreateProductRatingEntityTest extends Injectable */ public function __prepare(FixtureFactory $fixtureFactory) { - $product = $fixtureFactory->createByCode('catalogProductSimple', ['dataSet' => 'default']); + $product = $fixtureFactory->createByCode('catalogProductSimple', ['dataset' => 'default']); $product->persist(); return ['product' => $product]; diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewBackendEntityTest.xml b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewBackendEntityTest.xml index ee97d7bb21495..476353bb9203e 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewBackendEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewBackendEntityTest.xml @@ -8,10 +8,10 @@ - catalogProductSimple::default + catalogProductSimple::default Approved Main Website/Main Website Store/Default Store View - visibleOnDefaultWebsite + visibleOnDefaultWebsite 3 John title %isolation% @@ -21,10 +21,10 @@ - catalogProductSimple::default + catalogProductSimple::default Pending Main Website/Main Website Store/Default Store View - visibleOnDefaultWebsite + visibleOnDefaultWebsite 4 Britney title %isolation% @@ -34,10 +34,10 @@ - catalogProductSimple::default + catalogProductSimple::default Not Approved Main Website/Main Website Store/Default Store View - visibleOnDefaultWebsite + visibleOnDefaultWebsite 5 Michael title %isolation% diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewFrontendEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewFrontendEntityTest.php index 4345551308dc9..31963f958f15e 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewFrontendEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewFrontendEntityTest.php @@ -25,7 +25,7 @@ * 1. Open frontend. * 2. Go to product page. * 3. Click "Be the first to review this product". - * 4. Fill data according to dataSet. + * 4. Fill data according to dataset. * 5. click "Submit review". * 6. Perform all assertions. * diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewFrontendEntityTest.xml b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewFrontendEntityTest.xml index ee9096bce936c..04bbcfef97c57 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewFrontendEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/CreateProductReviewFrontendEntityTest.xml @@ -13,9 +13,9 @@ name_%isolation% title_%isolation% review_%isolation% - visibleOnDefaultWebsite + visibleOnDefaultWebsite 4 - catalogProductSimple::default + catalogProductSimple::default @@ -27,7 +27,7 @@ name_%isolation% title_%isolation% review_%isolation% - catalogProductSimple::default + catalogProductSimple::default test_type:acceptance_test diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/DeleteProductRatingEntityTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/DeleteProductRatingEntityTest.php index 129b383ffe285..0706a383cdf9f 100755 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/DeleteProductRatingEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/DeleteProductRatingEntityTest.php @@ -56,7 +56,7 @@ class DeleteProductRatingEntityTest extends Injectable */ public function __prepare(FixtureFactory $fixtureFactory) { - $product = $fixtureFactory->createByCode('catalogProductSimple', ['dataSet' => 'default']); + $product = $fixtureFactory->createByCode('catalogProductSimple', ['dataset' => 'default']); $product->persist(); return ['product' => $product]; diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/DeleteProductRatingEntityTest.xml b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/DeleteProductRatingEntityTest.xml index e9e63c56232ca..3c134bab6d150 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/DeleteProductRatingEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/DeleteProductRatingEntityTest.xml @@ -8,7 +8,7 @@ - default + default diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ModerateProductReviewEntityTest.xml b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ModerateProductReviewEntityTest.xml index 0efdc08ef19dc..309624db2a3b6 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ModerateProductReviewEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ModerateProductReviewEntityTest.xml @@ -8,7 +8,7 @@ - frontend_review + frontend_review Approved Nick%isolation% Title %isolation% @@ -18,7 +18,7 @@ - frontend_review + frontend_review Not Approved Nick%isolation% Title %isolation% diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php index 28dff5a865f37..b5ff135352ebe 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityOnProductPageTest.php @@ -28,7 +28,7 @@ * 2. Search and open product from preconditions * 3. Open Review tab * 4. Search and open review created in preconditions - * 5. Fill data according to dataSet + * 5. Fill data according to dataset * 6. Save changes * 7. Perform all assertions * @@ -95,7 +95,7 @@ public function __prepare(FixtureFactory $fixtureFactory) { $this->reviewInitial = $fixtureFactory->createByCode( 'review', - ['dataSet' => 'review_for_simple_product_with_rating'] + ['dataset' => 'review_for_simple_product_with_rating'] ); $this->reviewInitial->persist(); $this->fixtureFactory = $fixtureFactory; diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityTest.xml b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityTest.xml index 684b093219193..12a7623476b4f 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Review/Test/TestCase/UpdateProductReviewEntityTest.xml @@ -8,7 +8,7 @@ - review_for_simple_product_with_rating + review_for_simple_product_with_rating name_upd_%isolation% title_upd_%isolation% review_upd_%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderButtonsUnavailable.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderButtonsUnavailable.php index 445ff602c8a82..1c16624c4290e 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderButtonsUnavailable.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertOrderButtonsUnavailable.php @@ -12,12 +12,12 @@ use Magento\Mtf\Constraint\AbstractConstraint; /** - * Assert that buttons from dataSet are not present on page + * Assert that buttons from dataset are not present on page */ class AssertOrderButtonsUnavailable extends AbstractConstraint { /** - * Assert that buttons from dataSet are not present on page + * Assert that buttons from dataset are not present on page * * @param OrderIndex $orderIndex * @param SalesOrderView $salesOrderView @@ -54,6 +54,6 @@ public function processAssert( */ public function toString() { - return 'Buttons from dataSet are not present on order page.'; + return 'Buttons from dataset are not present on order page.'; } } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable.xml index e5e9d7d6f475e..d65cebe5a9456 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable.xml @@ -6,613 +6,205 @@ */ --> - - - - default - - false - USD - flatrate_flatrate - - checkmo - - - free - - - US_address - - - catalogProductSimple::default - - - default_store_view - - - - - catalogProductSimple::default - - - - - - - - - - - - - - - - - - - - - - - default_store_view - - - - - default - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - US_address - - - - - - - - - - - - - - - - - checkmo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - free - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - USD - - - - - - - - - - - - - - - - - - - - - flatrate_flatrate - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/BillingAddressId.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/BillingAddressId.php index 8aaa2b0cc381d..ec8e9857e5150 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/BillingAddressId.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/BillingAddressId.php @@ -15,13 +15,6 @@ */ class BillingAddressId extends DataSource { - /** - * Current preset. - * - * @var string - */ - protected $currentPreset; - /** * @constructor * @param FixtureFactory $fixtureFactory @@ -35,8 +28,8 @@ public function __construct(FixtureFactory $fixtureFactory, array $data, array $ $this->data = $data['value']; return; } - if (isset($data['dataSet'])) { - $addresses = $fixtureFactory->createByCode('address', ['dataSet' => $data['dataSet']]); + if (isset($data['dataset'])) { + $addresses = $fixtureFactory->createByCode('address', ['dataset' => $data['dataset']]); $this->data = $addresses->getData(); $this->data['street'] = [$this->data['street']]; } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/CouponCode.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/CouponCode.php index 0a28aff4f63e9..25017987e5fc7 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/CouponCode.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/CouponCode.php @@ -28,8 +28,8 @@ public function __construct(FixtureFactory $fixtureFactory, array $data, array $ $this->data = $data['value']; return; } - if (isset($data['dataSet'])) { - $salesRule = $fixtureFactory->createByCode('salesRule', ['dataSet' => $data['dataSet']]); + if (isset($data['dataset'])) { + $salesRule = $fixtureFactory->createByCode('salesRule', ['dataset' => $data['dataset']]); $salesRule->persist(); $this->data = $salesRule; } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/CustomerId.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/CustomerId.php index b970afcd0d1ab..30233046c6bf6 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/CustomerId.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/CustomerId.php @@ -28,8 +28,8 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array $this->data = $data['customer']; return; } - if (isset($data['dataSet'])) { - $customer = $fixtureFactory->createByCode('customer', ['dataSet' => $data['dataSet']]); + if (isset($data['dataset'])) { + $customer = $fixtureFactory->createByCode('customer', ['dataset' => $data['dataset']]); if ($customer->hasData('id') === false) { $customer->persist(); } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/EntityId.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/EntityId.php index 7b99bad4281b9..cf25a0130f886 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/EntityId.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/EntityId.php @@ -14,13 +14,6 @@ */ class EntityId extends DataSource { - /** - * Current preset. - * - * @var string - */ - protected $currentPreset; - /** * @constructor * @param FixtureFactory $fixtureFactory @@ -42,8 +35,8 @@ public function __construct(FixtureFactory $fixtureFactory, array $data, array $ if (is_string($data['products'])) { $products = explode(',', $data['products']); foreach ($products as $product) { - list($fixture, $dataSet) = explode('::', trim($product)); - $product = $fixtureFactory->createByCode($fixture, ['dataSet' => $dataSet]); + list($fixture, $dataset) = explode('::', trim($product)); + $product = $fixtureFactory->createByCode($fixture, ['dataset' => $dataset]); $product->persist(); $this->data['products'][] = $product; } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/Price.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/Price.php deleted file mode 100644 index 0de14ee47f836..0000000000000 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/Price.php +++ /dev/null @@ -1,74 +0,0 @@ -params = $params; - if (isset($data['preset'])) { - $this->currentPreset = $data['preset']; - $this->data = $this->getPreset(); - } - } - - /** - * Get preset array - * - * @return array|null - */ - public function getPreset() - { - $presets = [ - 'default_with_discount' => [ - 'subtotal' => 560, - 'discount' => 280, - ], - 'full_invoice' => [ - [ - 'grand_order_total' => 565, - 'grand_invoice_total' => 565, - ], - ], - 'partial_invoice' => [ - [ - 'grand_order_total' => 210, - 'grand_invoice_total' => 110, - ], - ], - 'full_refund' => [ - [ - 'grand_creditmemo_total' => 565, - ], - ], - 'full_refund_with_zero_shipping_refund' => [ - [ - 'grand_creditmemo_total' => 555, - ], - ], - 'partial_refund' => [ - [ - 'grand_creditmemo_total' => 110, - ], - ], - ]; - if (!isset($presets[$this->currentPreset])) { - return null; - } - return $presets[$this->currentPreset]; - } -} diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/StoreId.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/StoreId.php index 11579ab84e9e8..4f576f5d48b8d 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/StoreId.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderInjectable/StoreId.php @@ -32,7 +32,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $data, array $ { $this->params = $params; - $storeData = isset($data['dataSet']) ? ['dataSet' => $data['dataSet']] : []; + $storeData = isset($data['dataset']) ? ['dataset' => $data['dataset']] : []; if (isset($data['data'])) { $storeData = array_replace_recursive($storeData, $data); } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderStatus.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderStatus.xml index b86502663dbd5..5cea54a5f707f 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderStatus.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Fixture/OrderStatus.xml @@ -6,25 +6,17 @@ */ --> - - - order_status%isolation% - orderLabel%isolation% - - - order_status%isolation% - - - orderLabel%isolation% - - - - - - 0 - - - 0 - + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable.xml index e08828f7bff3b..1429cfef55464 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable.xml @@ -12,13 +12,13 @@ catalogProductSimple::default - default + default - US_address + US_address - default_store_view + default_store_view flatrate_flatrate @@ -36,13 +36,13 @@ catalogProductSimple::default,catalogProductSimple::default - default + default - US_address + US_address - default_store_view + default_store_view flatrate_flatrate @@ -60,13 +60,13 @@ catalogProductVirtual::default - default + default - US_address + US_address - default_store_view + default_store_view checkmo @@ -83,13 +83,13 @@ downloadableProduct::with_two_bought_links - default + default - US_address + US_address - default_store_view + default_store_view checkmo @@ -106,13 +106,13 @@ downloadableProduct::with_two_bought_links, downloadableProduct::with_two_bought_links - default + default - US_address + US_address - default_store_view + default_store_view checkmo @@ -129,13 +129,13 @@ catalogProductSimple::default - default + default - US_address + US_address - default_store_view + default_store_view flatrate_flatrate @@ -147,10 +147,10 @@ 0 USD - active_sales_rule_for_all_groups + active_sales_rule_for_all_groups - default_with_discount + default_with_discount @@ -159,13 +159,13 @@ catalogProductSimple::default - default + default - US_address + US_address - default_store_view + default_store_view flatrate_flatrate @@ -177,10 +177,10 @@ 0 USD - active_sales_rule_for_all_groups + active_sales_rule_for_all_groups - default_with_discount + default_with_discount @@ -189,13 +189,13 @@ catalogProductSimple::simple_big_qty - johndoe_unique + johndoe_unique - US_address + US_address - default_store_view + default_store_view flatrate_flatrate @@ -213,13 +213,13 @@ catalogProductVirtual::virtual_big_qty - johndoe_unique + johndoe_unique - US_address + US_address - default_store_view + default_store_view flatrate_flatrate diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable/Price.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable/Price.xml new file mode 100644 index 0000000000000..968837bdb3b5b --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable/Price.xml @@ -0,0 +1,37 @@ + + + + + + 560 + 280 + + + + 565 + 565 + + + + 210 + 110 + + + + 565 + + + + 555 + + + + 110 + + + diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/AssignCustomOrderStatusTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/AssignCustomOrderStatusTest.php index f75105b141332..0ddc727fd502b 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/AssignCustomOrderStatusTest.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/AssignCustomOrderStatusTest.php @@ -27,7 +27,7 @@ * 5. Save Status Assignment. * 6. Call assert assertOrderStatusSuccessAssignMessage. * 7. Create Order. - * 8. Perform all assertions from dataSet. + * 8. Perform all assertions from dataset. * * @group Order_Management_(CS) * @ZephyrId MAGETWO-29382 diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.xml index b5c195908cc81..c785d4a5ba402 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.xml @@ -9,7 +9,7 @@ cancel order and check status on the frontend - default + default catalogProductSimple::default,catalogProductSimple::default Canceled diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCreditMemoEntityTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCreditMemoEntityTest.php index f54fc41993282..066f7992ce586 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCreditMemoEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCreditMemoEntityTest.php @@ -21,7 +21,7 @@ * Steps: * 1. Go to Sales > Orders > find out placed order and open. * 2. Click 'Credit Memo' button. - * 3. Fill data from dataSet. + * 3. Fill data from dataset. * 4. On order's page click 'Refund offline' button. * 5. Perform all assertions. * diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCreditMemoEntityTest.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCreditMemoEntityTest.xml index 1d730f56e5bbc..bbdf7ba05ebd6 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCreditMemoEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCreditMemoEntityTest.xml @@ -11,9 +11,9 @@ Assert items return to stock (partial refund) Yes 1 - default + default catalogProductSimple::product_100_dollar - partial_refund + partial_refund @@ -28,9 +28,9 @@ 0 5 10 - default + default catalogProductSimple::default - full_refund_with_zero_shipping_refund + full_refund_with_zero_shipping_refund diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateInvoiceEntityTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateInvoiceEntityTest.php index 1c490060364c9..6fe0937884274 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateInvoiceEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateInvoiceEntityTest.php @@ -19,7 +19,7 @@ * 1. Go to Sales > Orders. * 2. Select created order in the grid and open it. * 3. Click 'Invoice' button. - * 4. Fill data according to dataSet. + * 4. Fill data according to dataset. * 5. Click 'Submit Invoice' button. * 6. Perform assertions. * diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateInvoiceEntityTest.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateInvoiceEntityTest.xml index 43b018bc8b8c2..a8aa9e15a666d 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateInvoiceEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateInvoiceEntityTest.xml @@ -8,8 +8,8 @@ - default - full_invoice + default + full_invoice catalogProductSimple::default 1 - @@ -25,8 +25,8 @@ - default - partial_invoice + default + partial_invoice catalogProductSimple::product_100_dollar - 1 diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.php index c95042db6b0a0..b5329ca2860ac 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.php @@ -19,11 +19,11 @@ * 3. Click Create New Order. * 4. Select Customer created in preconditions. * 5. Add Product. - * 6. Fill data according dataSet. + * 6. Fill data according dataset. * 7. Click Update Product qty. - * 8. Fill data according dataSet. + * 8. Fill data according dataset. * 9. Click Get Shipping Method and rates. - * 10. Fill data according dataSet. + * 10. Fill data according dataset. * 11. Submit Order. * 12. Perform all assertions. * diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.xml index ce5a4f0d95671..9bb2af8d9e4e1 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.xml @@ -10,8 +10,8 @@ Create order with simple product for registered US customer using Fixed shipping method and Cash on Delivery payment method catalogProductSimple::default - default - US_address_1_without_email + default + US_address_1_without_email No Flat Rate Fixed @@ -31,8 +31,8 @@ Create order with virtual product for registered UK customer using Check/Money Order payment method catalogProductVirtual::default - default - UK_address_without_email + default + UK_address_without_email 10.00 @@ -49,8 +49,8 @@ Create order with simple product for registered US customer using Fixed shipping method and Bank Transfer payment method catalogProductSimple::default - default - US_address_1_without_email + default + US_address_1_without_email No Flat Rate Fixed @@ -71,8 +71,8 @@ to_maintain:yes Create order with virtual product for registered UK customer using Bank Transfer payment method catalogProductVirtual::default - default - UK_address_without_email + default + UK_address_without_email No 10.00 @@ -91,9 +91,9 @@ to_maintain:yes Create order with simple product for registered US customer using Fixed shipping method and Purchase Order payment method catalogProductSimple::default - default + default No - US_address_1_without_email + US_address_1_without_email Flat Rate Fixed @@ -114,10 +114,10 @@ MAGETWO-12395 - Create Offline Order for Registered Customer in Admin catalogProductSimple::simple_10_dollar, configurableProduct::with_one_option us_ca_ny_rule - default + default No login - US_address_1_without_email + US_address_1_without_email Flat Rate Fixed @@ -132,10 +132,10 @@ MAGETWO-12520 - Create Order for New Customer in Admin with Offline Payment Method catalogProductSimple::simple_10_dollar, configurableProduct::with_one_option us_ca_ny_rule - default + default Yes register - US_address_1_without_email + US_address_1_without_email Flat Rate Fixed diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/HoldCreatedOrderTest.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/HoldCreatedOrderTest.xml index 962f0262f34f2..45f40c85582d8 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/HoldCreatedOrderTest.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/HoldCreatedOrderTest.xml @@ -9,7 +9,7 @@ hold order and check status on the front in my account - default + default catalogProductSimple::default,catalogProductSimple::default Invoice,Cancel,Reorder,Ship,Edit On Hold diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MassOrdersUpdateTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MassOrdersUpdateTest.php index 264f392cf0123..6457d6841a3b7 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MassOrdersUpdateTest.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MassOrdersUpdateTest.php @@ -18,7 +18,7 @@ * Steps: * 1. Navigate to backend. * 2. Go to Sales > Orders. - * 3. Select Mass Action according to dataSet. + * 3. Select Mass Action according to dataset. * 4. Submit. * 5. Perform Asserts. * @@ -94,7 +94,7 @@ protected function createOrders($count, $steps) $steps = explode('|', $steps); for ($i = 0; $i < $count; $i++) { /** @var OrderInjectable $order */ - $order = $this->fixtureFactory->createByCode('orderInjectable', ['dataSet' => 'default']); + $order = $this->fixtureFactory->createByCode('orderInjectable', ['dataset' => 'default']); $order->persist(); $orders[$i] = $order; $this->processSteps($order, $steps[$i]); diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveLastOrderedProductsOnOrderPageTest.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveLastOrderedProductsOnOrderPageTest.xml index db32b31002732..9a78652cbb694 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveLastOrderedProductsOnOrderPageTest.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveLastOrderedProductsOnOrderPageTest.xml @@ -8,12 +8,12 @@ - default + default catalogProductSimple::default - default + default configurableProduct::default diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveRecentlyViewedProductsOnOrderPageTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveRecentlyViewedProductsOnOrderPageTest.php index 31fd3de31d595..cd59b0f830505 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveRecentlyViewedProductsOnOrderPageTest.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveRecentlyViewedProductsOnOrderPageTest.php @@ -22,7 +22,7 @@ * 5. Check product in Recently Viewed Products section. * 6. Click Update Changes. * 7. Click Configure. - * 8. Fill data from dataSet. + * 8. Fill data from dataset. * 9. Click OK. * 10. Click Update Items and Qty's button. * 11. Perform all assertions. diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/PrintOrderFrontendGuestTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/PrintOrderFrontendGuestTest.php index f4eb3d91aae1c..d8cb6cd4ec29c 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/PrintOrderFrontendGuestTest.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/PrintOrderFrontendGuestTest.php @@ -15,7 +15,7 @@ * 2. Enable all Gift Options. * 3. Create Gift Card Account with Balance = 1. * 4. Create Customer Account. - * 5. Place order with options according to dataSet. + * 5. Place order with options according to dataset. * * Steps: * 1. Find the Order on frontend. diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/PrintOrderFrontendGuestTest.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/PrintOrderFrontendGuestTest.xml index c5bce1d33a76d..efcfd89429ce1 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/PrintOrderFrontendGuestTest.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/PrintOrderFrontendGuestTest.xml @@ -9,10 +9,10 @@ - johndoe_with_addresses" + johndoe_with_addresses" - customer_US" + customer_US" checkmo" diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/ReorderOrderEntityTest.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/ReorderOrderEntityTest.xml index 20b862a735ee7..2a1ca65019bd4 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/ReorderOrderEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/ReorderOrderEntityTest.xml @@ -9,10 +9,10 @@ Reorder placed order (update products, billing address). - two_simple_product + two_simple_product active_sales_rule_with_fixed_price_discount_coupon - default - US_address_1 + default + US_address_1 Flat Rate Fixed diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/UnassignCustomOrderStatusTest.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/UnassignCustomOrderStatusTest.xml index c429fc46730d9..cecac4451c941 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/UnassignCustomOrderStatusTest.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/UnassignCustomOrderStatusTest.xml @@ -9,7 +9,7 @@ unassign order status - assign_to_pending + assign_to_pending Pending diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/UpdateCustomOrderStatusTest.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/UpdateCustomOrderStatusTest.xml index 3db975b7ed80e..907fb84d02a0e 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/UpdateCustomOrderStatusTest.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/UpdateCustomOrderStatusTest.xml @@ -9,7 +9,7 @@ change status label to existed - default + default No Processing @@ -17,7 +17,7 @@ change status label to new and check orderStatus for order with changed orderStatus - assign_to_pending + assign_to_pending Yes orderLabel%isolation% diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/Fixture/SalesRule.xml b/dev/tests/functional/tests/app/Magento/SalesRule/Test/Fixture/SalesRule.xml index 9008a93b8a36b..e02f275c2dfdd 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/Fixture/SalesRule.xml +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/Fixture/SalesRule.xml @@ -6,89 +6,41 @@ */ --> - - - Default price rule %isolation% - Active - - Main Website - - - NOT LOGGED IN - General - Wholesale - Retailer - - No Coupon - Percent of product price discount - 50 - + - - Default price rule %isolation% - + - - 0 - - - Active - + + - - 1 - - - 1 - + + - - 0 - - - Percent of product price discount - - - 50 - + + + - - 0 - - - 0 - - - 0 - - - No Coupon - - - 0 - - - 0 - + + + + + + - - - Main Website - - - - - NOT LOGGED IN - General - Wholesale - Retailer - - + + diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/Repository/SalesRule.xml b/dev/tests/functional/tests/app/Magento/SalesRule/Test/Repository/SalesRule.xml index 9c1a431440b6c..e5b0284119121 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/Repository/SalesRule.xml +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/Repository/SalesRule.xml @@ -7,6 +7,23 @@ --> + + Default price rule %isolation% + Active + + Main Website + + + NOT LOGGED IN + General + Wholesale + Retailer + + No Coupon + Percent of product price discount + 50 + + Shopping Cart Price Rule with Specific Coupon %isolation% Description for Cart Price Rule diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.php index 1a40513ce1e2b..906a7b51a359b 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.php @@ -89,18 +89,18 @@ public function __inject( */ public function __prepare(FixtureFactory $fixtureFactory) { - $customer = $fixtureFactory->createByCode('customer', ['dataSet' => 'default']); + $customer = $fixtureFactory->createByCode('customer', ['dataset' => 'default']); $customer->persist(); $productForSalesRule1 = $fixtureFactory->createByCode( 'catalogProductSimple', - ['dataSet' => 'simple_for_salesrule_1'] + ['dataset' => 'simple_for_salesrule_1'] ); $productForSalesRule1->persist(); $productForSalesRule2 = $fixtureFactory->createByCode( 'catalogProductSimple', - ['dataSet' => 'simple_for_salesrule_2'] + ['dataset' => 'simple_for_salesrule_2'] ); $productForSalesRule2->persist(); diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/DeleteSalesRuleEntityTest.xml b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/DeleteSalesRuleEntityTest.xml index 2d76e09d87b8c..980ffa3d0ada6 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/DeleteSalesRuleEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/DeleteSalesRuleEntityTest.xml @@ -8,17 +8,17 @@ - active_sales_rule_with_percent_price_discount_coupon + active_sales_rule_with_percent_price_discount_coupon - active_sales_rule_with_complex_conditions + active_sales_rule_with_complex_conditions - inactive_sales_rule + inactive_sales_rule diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/UpdateSalesRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/UpdateSalesRuleEntityTest.php index 84c524d9cec06..a1ef4b347fef4 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/UpdateSalesRuleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/UpdateSalesRuleEntityTest.php @@ -65,7 +65,7 @@ public function __prepare(FixtureFactory $fixtureFactory) { $productForSalesRule1 = $fixtureFactory->createByCode( 'catalogProductSimple', - ['dataSet' => 'simple_for_salesrule_1'] + ['dataset' => 'simple_for_salesrule_1'] ); $productForSalesRule1->persist(); return [ diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/UpdateSalesRuleEntityTest.xml b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/UpdateSalesRuleEntityTest.xml index f4f2c01eeccec..b46f67e76b393 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/UpdateSalesRuleEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/UpdateSalesRuleEntityTest.xml @@ -8,7 +8,7 @@ - active_sales_rule_with_complex_conditions + active_sales_rule_with_complex_conditions {Conditions combination:[[Shipping Method|is|\[flatrate\] Fixed][Shipping Postcode|is|95814][Shipping State/Province|is|California][Shipping Country|is|United States]]} Buy X get Y free (discount amount is Y) 1 diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestStep/CreateSalesRuleStep.php b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestStep/CreateSalesRuleStep.php index c9b0fc0283473..56db436ccb68d 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestStep/CreateSalesRuleStep.php +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestStep/CreateSalesRuleStep.php @@ -61,7 +61,7 @@ public function run() if ($this->salesRule !== null) { $salesRule = $this->fixtureFactory->createByCode( 'salesRule', - ['dataSet' => $this->salesRule] + ['dataset' => $this->salesRule] ); $salesRule->persist(); $result['salesRule'] = $salesRule; diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/TestCase/CreateShipmentEntityTest.php b/dev/tests/functional/tests/app/Magento/Shipping/Test/TestCase/CreateShipmentEntityTest.php index 4391265ca5bb5..9402ee203c7ad 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/TestCase/CreateShipmentEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/TestCase/CreateShipmentEntityTest.php @@ -19,7 +19,7 @@ * 1. Go to Sales > Orders. * 2. Select created order in the grid and open it. * 3. Click 'Ship' button. - * 4. Fill data according to dataSet. + * 4. Fill data according to dataset. * 5. Click 'Submit Shipment' button. * 6. Perform all asserts. * diff --git a/dev/tests/functional/tests/app/Magento/Shipping/Test/TestCase/CreateShipmentEntityTest.xml b/dev/tests/functional/tests/app/Magento/Shipping/Test/TestCase/CreateShipmentEntityTest.xml index aeb61fe1fc158..ac41244817e64 100644 --- a/dev/tests/functional/tests/app/Magento/Shipping/Test/TestCase/CreateShipmentEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Shipping/Test/TestCase/CreateShipmentEntityTest.xml @@ -9,7 +9,7 @@ shipment with tracking number - default + default catalogProductSimple::default 1 - @@ -26,7 +26,7 @@ partial shipment - default + default catalogProductSimple::product_100_dollar 1 1 diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.xml b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.xml index 6927691a7aa8e..b225aa55e33a7 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.xml +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.xml @@ -6,28 +6,19 @@ */ --> - - - sitemap.xml - / - - - - - - - - - sitemap.xml - - - / - - - - - - 0 - - + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/DeleteSitemapEntityTest.xml b/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/DeleteSitemapEntityTest.xml index 5e7be0f681c88..e204dd90f9a2f 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/DeleteSitemapEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/TestCase/DeleteSitemapEntityTest.xml @@ -8,7 +8,7 @@ - default + default diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.xml b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.xml index 35dce3f104254..51c3f79b2b901 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.xml @@ -6,38 +6,20 @@ */ --> - - - - default - - Default Store View - default - Enabled - 1 - - - 1 - - - default - - - 0 - - - - default - - - - Default Store View - - - 0 - - - Enabled - + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store/GroupId.php b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store/GroupId.php index 9ec18c42b26f2..ef38ef4250823 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store/GroupId.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store/GroupId.php @@ -6,40 +6,24 @@ namespace Magento\Store\Test\Fixture\Store; -use Magento\Store\Test\Fixture\StoreGroup; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Store\Test\Fixture\StoreGroup; /** - * Class GroupId - * Prepare StoreGroup for Store + * Prepare StoreGroup for Store. */ -class GroupId implements FixtureInterface +class GroupId extends DataSource { /** - * Prepared dataSet data - * - * @var array - */ - protected $data; - - /** - * Data set configuration settings - * - * @var array - */ - protected $params; - - /** - * StoreGroup fixture + * StoreGroup fixture. * * @var StoreGroup */ protected $storeGroup; /** - * Constructor - * + * @constructor * @param FixtureFactory $fixtureFactory * @param array $params * @param array $data [optional] @@ -47,8 +31,8 @@ class GroupId implements FixtureInterface public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = []) { $this->params = $params; - if (isset($data['dataSet'])) { - $storeGroup = $fixtureFactory->createByCode('storeGroup', ['dataSet' => $data['dataSet']]); + if (isset($data['dataset'])) { + $storeGroup = $fixtureFactory->createByCode('storeGroup', ['dataset' => $data['dataset']]); /** @var StoreGroup $storeGroup */ if (!$storeGroup->getGroupId()) { $storeGroup->persist(); @@ -58,39 +42,6 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array } } - /** - * Persist attribute options - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string|null $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - /** * Return StoreGroup fixture * diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.xml b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.xml index c64a13ab523e9..c1fa4d6a8ac0f 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.xml @@ -6,34 +6,18 @@ */ --> - - - - main_website - - StoreGroup%isolation% - - default_category - - - - - - - - main_website - - - - StoreGroup%isolation% - - - - default_category - - - - 0 - + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup/CategoryId.php b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup/CategoryId.php index ca4f11663f342..23c3fa9a38508 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup/CategoryId.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup/CategoryId.php @@ -6,30 +6,15 @@ namespace Magento\Store\Test\Fixture\StoreGroup; -use Magento\Catalog\Test\Fixture\Category; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; +use Magento\Catalog\Test\Fixture\Category; /** - * Class CategoryId - * Prepare CategoryId for Store Group + * Prepare CategoryId for Store Group. */ -class CategoryId implements FixtureInterface +class CategoryId extends DataSource { - /** - * Prepared dataSet data - * - * @var array - */ - protected $data; - - /** - * Data set configuration settings - * - * @var array - */ - protected $params; - /** * Category fixture * @@ -38,8 +23,7 @@ class CategoryId implements FixtureInterface protected $category; /** - * Constructor - * + * @constructor * @param FixtureFactory $fixtureFactory * @param array $params * @param array $data [optional] @@ -47,8 +31,8 @@ class CategoryId implements FixtureInterface public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = []) { $this->params = $params; - if (isset($data['dataSet'])) { - $category = $fixtureFactory->createByCode('category', ['dataSet' => $data['dataSet']]); + if (isset($data['dataset'])) { + $category = $fixtureFactory->createByCode('category', ['dataset' => $data['dataset']]); /** @var Category $category */ if (!$category->getId()) { $category->persist(); @@ -58,39 +42,6 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array } } - /** - * Persist attribute options - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string|null $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - /** * Return Category fixture * diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup/WebsiteId.php b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup/WebsiteId.php index 36e20106ce00e..448a55ced512c 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup/WebsiteId.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup/WebsiteId.php @@ -6,40 +6,24 @@ namespace Magento\Store\Test\Fixture\StoreGroup; +use Magento\Mtf\Fixture\DataSource; use Magento\Store\Test\Fixture\Website; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; /** - * Class WebsiteId - * Prepare WebsiteId for Store Group + * Prepare WebsiteId for Store Group. */ -class WebsiteId implements FixtureInterface +class WebsiteId extends DataSource { /** - * Prepared dataSet data - * - * @var array - */ - protected $data; - - /** - * Data set configuration settings - * - * @var array - */ - protected $params; - - /** - * Website fixture + * Website fixture. * * @var Website */ protected $website; /** - * Constructor - * + * @constructor * @param FixtureFactory $fixtureFactory * @param array $params * @param array $data [optional] @@ -47,8 +31,8 @@ class WebsiteId implements FixtureInterface public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = []) { $this->params = $params; - if (isset($data['dataSet'])) { - $website = $fixtureFactory->createByCode('website', ['dataSet' => $data['dataSet']]); + if (isset($data['dataset'])) { + $website = $fixtureFactory->createByCode('website', ['dataset' => $data['dataset']]); /** @var Website $website */ if (!$website->getWebsiteId()) { $website->persist(); @@ -58,39 +42,6 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array } } - /** - * Persist attribute options - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set - * - * @param string|null $key [optional] - * @return mixed - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - /** * Return Website fixture * diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.xml b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.xml index 4614615109090..574f78cb6bc84 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.xml @@ -6,29 +6,20 @@ */ --> - - - Main Website - base - 1 - - - 1 - - - base - - - Main Website - - - 0 - - - 0 - - - 0 - + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Store.xml b/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Store.xml index a04123718ed74..f14e959ce90cb 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Store.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Store.xml @@ -9,7 +9,7 @@ - default + default Default Store View base @@ -19,7 +19,7 @@ - default + default Custom_Store_%isolation% code_%isolation% @@ -31,14 +31,14 @@ 1 - + All Store Views 0 - default + default DE%isolation% de%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Repository/StoreGroup.xml b/dev/tests/functional/tests/app/Magento/Store/Test/Repository/StoreGroup.xml index 286213fdb3c2e..b04cb4b8af12c 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Repository/StoreGroup.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Repository/StoreGroup.xml @@ -9,22 +9,22 @@ - main_website + main_website Main Website Store 1 - default_category + default_category - main_website + main_website store_name_%isolation% - default_category + default_category diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Website.xml b/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Website.xml index 6c33406d71eb2..15313c96f297b 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Website.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/Repository/Website.xml @@ -7,6 +7,12 @@ --> + + Main Website + base + 1 + + All Websites 0 diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreEntityTest.xml b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreEntityTest.xml index 4ba86215b1c13..a6bf8369d64d8 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreEntityTest.xml @@ -8,7 +8,7 @@ - default + default store_name_%isolation% storecode_%isolation% Enabled @@ -19,7 +19,7 @@ - default + default store_name_%isolation% storecode_%isolation% Disabled @@ -30,7 +30,7 @@ - custom + custom store_name_%isolation% storecode_%isolation% Enabled @@ -42,7 +42,7 @@ MAGETWO-12405: Create New Localized Store View - default + default DE_%isolation% de_%isolation% Enabled diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreGroupEntityTest.xml b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreGroupEntityTest.xml index 9e96f8393d8da..117b2010f23c7 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreGroupEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/CreateStoreGroupEntityTest.xml @@ -8,18 +8,18 @@ - main_website + main_website store_name_%isolation% - default_category + default_category - custom_website + custom_website store_name_%isolation% - root_category + root_category diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest.php b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest.php index debf3cb6b6ea0..e6a8f499b7a30 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest.php @@ -25,7 +25,7 @@ * 2. Go to Stores -> All Stores * 3. Open created store view * 4. Click "Delete Store View" - * 5. Set "Create DB Backup" according to dataSet + * 5. Set "Create DB Backup" according to dataset * 6. Click "Delete Store View" * 7. Perform all assertions * diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest.xml b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest.xml index 8abbb20c16e26..a81812963821b 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreEntityTest.xml @@ -8,7 +8,7 @@ - custom + custom Yes @@ -16,7 +16,7 @@ - custom + custom No diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreGroupEntityTest.xml b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreGroupEntityTest.xml index 26afef08b4b80..c7f54be88b9be 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreGroupEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreGroupEntityTest.xml @@ -8,14 +8,14 @@ - custom + custom Yes - custom + custom No diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteWebsiteEntityTest.xml b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteWebsiteEntityTest.xml index ccccd1f171894..e1e5a410e5e5a 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteWebsiteEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteWebsiteEntityTest.xml @@ -8,14 +8,14 @@ - custom_website + custom_website Yes - custom_website + custom_website No diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreEntityTest.xml b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreEntityTest.xml index f6e5f58018e76..b3102104f5bb1 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreEntityTest.xml @@ -8,8 +8,8 @@ - custom - default + custom + default storename_updated%isolation% storecode_updated%isolation% Enabled diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreGroupEntityTest.xml b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreGroupEntityTest.xml index 01bf7915792be..45aba74539d91 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreGroupEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateStoreGroupEntityTest.xml @@ -8,20 +8,20 @@ - custom - main_website + custom + main_website store_name_updated_%isolation% - default_category + default_category - custom - custom_website + custom + custom_website store_name_updated_%isolation% - root_category + root_category diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateWebsiteEntityTest.xml b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateWebsiteEntityTest.xml index 4190be02bea35..a0ed810288afe 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateWebsiteEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/TestCase/UpdateWebsiteEntityTest.xml @@ -8,7 +8,7 @@ - custom_website + custom_website website_upd%isolation% code_upd%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPrices.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPrices.php index 95ed90babd4f4..a50ef0ea37dee 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPrices.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPrices.php @@ -109,7 +109,7 @@ public function processAssert( $this->catalogProductView = $catalogProductView; $this->checkoutCart = $checkoutCart; //Preconditions - $address = $fixtureFactory->createByCode('address', ['dataSet' => 'US_address_NY']); + $address = $fixtureFactory->createByCode('address', ['dataset' => 'US_address_NY']); $shipping = ['shipping_service' => 'Flat Rate', 'shipping_method' => 'Fixed']; $actualPrices = []; //Assertion steps diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleApplying.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleApplying.php index 51476690a8897..51caa4822fa60 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleApplying.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleApplying.php @@ -117,7 +117,7 @@ public function processAssert( $this->productSimple = $fixtureFactory->createByCode( 'catalogProductSimple', [ - 'dataSet' => 'product_100_dollar_for_tax_rule', + 'dataset' => 'product_100_dollar_for_tax_rule', 'data' => [ 'tax_class_id' => ['tax_product_class' => $taxProductClass], ] diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.xml index 30710bb5b2f81..7c33ce4479eb8 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.xml @@ -6,19 +6,17 @@ */ --> - - - Tax Class %isolation% - - - - - - Tax Class %isolation% - - - CUSTOMER - - - + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.xml index b9a4a30142690..93925c39ddecd 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.xml @@ -6,41 +6,24 @@ */ --> - - - Tax Rate %isolation% - 10 - United States - * - California - - - - - - United States - - - California - - - * - - - Tax Rate %isolation% - - - 10 - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.xml index b53f3f1eba5d9..671a12d176951 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.xml @@ -6,33 +6,21 @@ */ --> - - - TaxIdentifier%isolation% - - US-CA-Rate_1 - - - - - - - TaxIdentifier%isolation% - - - - - - - - - - - US-CA-Rate_1 - - - - - - + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule/TaxClass.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule/TaxClass.php index b40b943db5786..2befe872139d2 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule/TaxClass.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule/TaxClass.php @@ -13,7 +13,7 @@ * Class TaxClass * * Data keys: - * - dataSet + * - dataset */ class TaxClass extends DataSource { @@ -33,11 +33,11 @@ class TaxClass extends DataSource public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = []) { $this->params = $params; - if (isset($data['dataSet'])) { - $dataSets = $data['dataSet']; - foreach ($dataSets as $dataSet) { + if (isset($data['dataset'])) { + $datasets = $data['dataset']; + foreach ($datasets as $dataset) { /** @var \Magento\Tax\Test\Fixture\TaxClass $taxClass */ - $taxClass = $fixtureFactory->createByCode('taxClass', ['dataSet' => $dataSet]); + $taxClass = $fixtureFactory->createByCode('taxClass', ['dataset' => $dataset]); $this->fixture[] = $taxClass; $this->data[] = $taxClass->getClassName(); } diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule/TaxRate.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule/TaxRate.php index 238a754ee6048..3af39e10a3203 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule/TaxRate.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule/TaxRate.php @@ -13,7 +13,7 @@ * Class TaxRate * * Data keys: - * - dataSet + * - dataset */ class TaxRate extends DataSource { @@ -33,11 +33,11 @@ class TaxRate extends DataSource public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = []) { $this->params = $params; - if (isset($data['dataSet'])) { - $dataSets = $data['dataSet']; - foreach ($dataSets as $dataSet) { + if (isset($data['dataset'])) { + $datasets = $data['dataset']; + foreach ($datasets as $dataset) { /** @var \Magento\Tax\Test\Fixture\TaxRate $taxRate */ - $taxRate = $fixtureFactory->createByCode('taxRate', ['dataSet' => $dataSet]); + $taxRate = $fixtureFactory->createByCode('taxRate', ['dataset' => $dataset]); $this->fixture[] = $taxRate; $this->data[] = $taxRate->getCode(); } diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxClass.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxClass.xml index 3e9c69f527b74..c75bcdc7ba799 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxClass.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxClass.xml @@ -7,6 +7,10 @@ --> + + Tax Class %isolation% + + 2 Taxable Goods diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRate.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRate.xml index c3e875e6e9482..85abb1aa13287 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRate.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRate.xml @@ -7,6 +7,14 @@ --> + + Tax Rate %isolation% + 10 + United States + * + California + + 1 US diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRule.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRule.xml index 801382ccf4b17..42d64c06e719f 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRule.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRule.xml @@ -7,10 +7,17 @@ --> + + TaxIdentifier%isolation% + + US-CA-Rate_1 + + + TaxIdentifier%isolation% - + us_ca_rate_8_25 us_ny_rate_8_375 @@ -22,19 +29,19 @@ Tax Rule %isolation% - + US-CA-Rate_1 us_ny_rate_8_1 - + retail_customer customer_tax_class - + taxable_goods product_tax_class @@ -46,7 +53,7 @@ TaxIdentifier%isolation% - + uk_full_tax_rate @@ -57,17 +64,17 @@ TaxIdentifier%isolation% - + US-CA-Rate_1 - + retail_customer - + taxable_goods @@ -78,19 +85,19 @@ TaxIdentifier%isolation% - + US-CA-Rate_1 US-NY-Rate_1 - + retail_customer customer_tax_class - + product_tax_class taxable_goods @@ -102,7 +109,7 @@ TaxIdentifier%isolation% - + us_ca_rate_8_25_no_zip us_ny_rate_8_25 @@ -114,7 +121,7 @@ TaxIdentifier%isolation% - + us_ca_rate_8_375 us_ny_rate_8_25 @@ -126,7 +133,7 @@ TaxIdentifier%isolation% - + us_ca_rate_8_25_no_zip us_ny_rate_8_375 @@ -138,7 +145,7 @@ TaxIdentifier%isolation% - + tx_rate_10 ny_rate_20 ca_rate_30 @@ -151,17 +158,17 @@ Tax Rule %isolation% - + uk_full_tax_rate - + retail_customer - + taxable_goods diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/ApplyTaxBasedOnVatIdTest.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/ApplyTaxBasedOnVatIdTest.xml index d5407ecf878f3..dd6d2d00fc55c 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/ApplyTaxBasedOnVatIdTest.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/ApplyTaxBasedOnVatIdTest.xml @@ -9,14 +9,14 @@ MAGETWO-13436: Automatic Apply Tax Based on VAT ID. - enable_VAT_on_frontend + enable_VAT_on_frontend default_tax_configuration, flatrate, checkmo, store_information_DE_with_VAT, enable_VAT_on_frontend - customer_UK_address_with_VAT - default + customer_UK_address_with_VAT + default catalogProductSimple::product_10_dollar - customer_UK_address_with_VAT - UK_address_with_VAT - retailer_uk_full_tax_rule + customer_UK_address_with_VAT + UK_address_with_VAT + retailer_uk_full_tax_rule valid_intra_union_group 10 2 diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRateEntityTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRateEntityTest.php index ae00c783d685b..c1fd40dbf47e4 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRateEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRateEntityTest.php @@ -17,7 +17,7 @@ * 1. Log in as default admin user. * 2. Go to Stores > Taxes > Tax Zones and Rates. * 3. Click 'Add New Tax Rate' button. - * 4. Fill in data according to dataSet + * 4. Fill in data according to dataset * 5. Save Tax Rate. * 6. Perform all assertions. * diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest.php index dcd2894854675..33aa6fb0c7e8a 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest.php @@ -16,7 +16,7 @@ * 1. Log in as default admin user. * 2. Go to Stores > Tax Rules. * 3. Click 'Add New Tax Rule' button. - * 4. Fill in data according to dataSet + * 4. Fill in data according to dataset * 5. Save Tax Rule. * 6. Perform all assertions. * diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest.xml index b8770c32386bd..befc93d83295b 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/CreateTaxRuleEntityTest.xml @@ -9,23 +9,23 @@ TaxIdentifier%isolation% - US-CA-Rate_1 - - - - - - - - + US-CA-Rate_1 + - + - + - + - TaxIdentifier%isolation% - US-CA-Rate_1 - US-NY-Rate_1 - customer_tax_class - - - product_tax_class - - + US-CA-Rate_1 + US-NY-Rate_1 + customer_tax_class + - + product_tax_class + - 1 1 @@ -35,12 +35,12 @@ Creating tax rule with new tax classes and tax rate TaxIdentifier%isolation% - default - US-NY-Rate_1 - US-CA-Rate_1 - retail_customer - customer_tax_class - taxable_goods + default + US-NY-Rate_1 + US-CA-Rate_1 + retail_customer + customer_tax_class + taxable_goods 1 @@ -48,12 +48,12 @@ TaxIdentifier%isolation% - withZipRange - US-CA-Rate_1 - retail_customer - customer_tax_class - taxable_goods - product_tax_class + withZipRange + US-CA-Rate_1 + retail_customer + customer_tax_class + taxable_goods + product_tax_class 1 @@ -62,12 +62,12 @@ MAGETWO-12438: Create Tax Rule with New and Existing Tax Rate, Customer Tax Class, Product Tax Class TaxIdentifier%isolation% - US-CA-*-Rate 1 - us_ny_rate_8_1 - retail_customer - customer_tax_class - taxable_goods - product_tax_class + US-CA-*-Rate 1 + us_ny_rate_8_1 + retail_customer + customer_tax_class + taxable_goods + product_tax_class bamboo_plan:end_to_end,test_type:acceptance_test diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRateEntityTest.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRateEntityTest.xml index cc3ac1c0efb0b..3f5138c04257f 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRateEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRateEntityTest.xml @@ -8,7 +8,7 @@ - default + default diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRuleEntityTest.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRuleEntityTest.xml index 8c8aa1e3888b4..444a019050cbc 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRuleEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/DeleteTaxRuleEntityTest.xml @@ -8,7 +8,7 @@ - tax_rule_with_custom_tax_classes + tax_rule_with_custom_tax_classes United States California 90001 diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxCalculationTest.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxCalculationTest.xml index 9891afcdf2d0f..fab0ac1694987 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxCalculationTest.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxCalculationTest.xml @@ -14,7 +14,7 @@ active_sales_rule_for_all_groups_no_coupon - customer_equals_store_rate - johndoe_unique + johndoe_unique 3 277.14 300.00 @@ -43,7 +43,7 @@ active_sales_rule_for_all_groups_no_coupon - customer_greater_store_rate - johndoe_unique + johndoe_unique 3 90.99 98.61 @@ -72,7 +72,7 @@ active_sales_rule_for_all_groups_no_coupon - customer_less_store_rate - johndoe_unique + johndoe_unique 3 90.99 98.50 @@ -101,7 +101,7 @@ active_sales_rule_for_all_groups_no_coupon - customer_less_store_rate - johndoe_unique + johndoe_unique 3 83.05 89.90 @@ -130,7 +130,7 @@ active_sales_rule_for_all_groups_no_coupon - customer_less_store_rate - johndoe_unique + johndoe_unique 3 276.81 299.65 @@ -159,7 +159,7 @@ active_sales_rule_for_all_groups_no_coupon - customer_equals_store_rate - johndoe_unique + johndoe_unique 3 90.00 97.43 @@ -188,7 +188,7 @@ active_sales_rule_for_all_groups_no_coupon - customer_equals_store_rate - johndoe_unique + johndoe_unique 3 90.99 98.50 @@ -217,7 +217,7 @@ active_sales_rule_for_all_groups_no_coupon - customer_greater_store_rate - johndoe_unique + johndoe_unique 3 84.06 91.10 @@ -246,7 +246,7 @@ active_sales_rule_for_all_groups_no_coupon - customer_greater_store_rate - johndoe_unique + johndoe_unique 3 300.00 325.13 @@ -275,7 +275,7 @@ active_sales_rule_for_all_groups_no_coupon - customer_greater_store_rate - johndoe_unique + johndoe_unique 3 90.00 97.54 diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest.php index b67edd7a4c178..b8b1f95c2b998 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest.php @@ -82,7 +82,7 @@ public function __prepare(FixtureFactory $fixtureFactory) public function __inject() { // TODO: Move test set up to "__prepare" method after fix bug MAGETWO-29331 - $taxRule = $this->fixtureFactory->createByCode('taxRule', ['dataSet' => 'cross_border_tax_rule']); + $taxRule = $this->fixtureFactory->createByCode('taxRule', ['dataset' => 'cross_border_tax_rule']); $taxRule->persist(); } @@ -96,7 +96,7 @@ protected function createCustomers() $customersData = ['johndoe_unique_TX', 'johndoe_unique']; $customers = []; foreach ($customersData as $customerData) { - $customer = $this->fixtureFactory->createByCode('customer', ['dataSet' => $customerData]); + $customer = $this->fixtureFactory->createByCode('customer', ['dataset' => $customerData]); $customer->persist(); $customers[] = $customer; } diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest.xml index 82218491cf409..e01bee641331b 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest.xml @@ -8,29 +8,29 @@ - with_one_custom_option_and_category + with_one_custom_option_and_category cross_border_enabled_price_incl_tax, display_excluding_including_tax - product_with_category - cart_rule + product_with_category + cart_rule cross_border_enabled_price_incl_tax, display_excluding_including_tax - product_with_category - catalog_price_rule_priority_0 + product_with_category + catalog_price_rule_priority_0 cross_border_enabled_price_incl_tax, display_excluding_including_tax - product_with_special_price_and_category + product_with_special_price_and_category cross_border_enabled_price_incl_tax, display_excluding_including_tax - product_with_category + product_with_category cross_border_enabled_price_excl_tax, display_excluding_including_tax diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRateEntityTest.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRateEntityTest.xml index c8205ff306c4f..23a2f6460cecc 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRateEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRateEntityTest.xml @@ -8,7 +8,7 @@ - default + default TaxIdentifier%isolation% No 90001 @@ -20,7 +20,7 @@ - default + default TaxIdentifier%isolation% Yes 90001 @@ -33,7 +33,7 @@ - default + default TaxIdentifier%isolation% No * @@ -44,7 +44,7 @@ - withZipRange + withZipRange TaxIdentifier%isolation% No 180 @@ -56,7 +56,7 @@ - withZipRange + withZipRange TaxIdentifier%isolation% Yes 1 @@ -67,7 +67,7 @@ - withZipRange + withZipRange TaxIdentifier%isolation% No * diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest.php index 79d21703eb871..681fe24dfbd5e 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest.php @@ -21,7 +21,7 @@ * 1. Login to backend * 2. Navigate to Stores > Tax Rules * 3. Click Tax Rule from grid - * 4. Edit test value(s) according to dataSet. + * 4. Edit test value(s) according to dataset. * 5. Click 'Save' button. * 6. Perform all asserts. * @@ -58,7 +58,7 @@ class UpdateTaxRuleEntityTest extends Injectable */ public function __prepare(FixtureFactory $fixtureFactory) { - $customer = $fixtureFactory->createByCode('customer', ['dataSet' => 'johndoe_retailer']); + $customer = $fixtureFactory->createByCode('customer', ['dataset' => 'johndoe_retailer']); $customer->persist(); return ['customer' => $customer]; diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest.xml index 1cc98aeb5bf1a..3941a395d7dcf 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/UpdateTaxRuleEntityTest.xml @@ -8,12 +8,12 @@ - tax_rule_default + tax_rule_default New Tax Rule name%isolation% - default - customer_tax_class - product_tax_class - product_tax_class + default + customer_tax_class + product_tax_class + product_tax_class 2 2 @@ -21,44 +21,44 @@ - tax_rule_with_custom_tax_classes - withZipRange - retail_customer - product_tax_class - taxable_goods + tax_rule_with_custom_tax_classes + withZipRange + retail_customer + product_tax_class + taxable_goods - tax_rule_with_custom_tax_classes + tax_rule_with_custom_tax_classes United States Utah 84001 Flat Rate Fixed 5 - us_ut_fixed_zip_rate_20 - - - product_tax_class - - + us_ut_fixed_zip_rate_20 + - + product_tax_class + - - tax_rule_with_custom_tax_classes + tax_rule_with_custom_tax_classes United States Idaho 83201 Flat Rate Fixed 5 - withFixedZip - - - product_tax_class - - + withFixedZip + - + product_tax_class + - diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestStep/CreateTaxRuleStep.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestStep/CreateTaxRuleStep.php index a0f5183841333..a587216002ed8 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/TestStep/CreateTaxRuleStep.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestStep/CreateTaxRuleStep.php @@ -63,7 +63,7 @@ public function run() foreach ($taxRuleDataSets as $taxRuleDataSet) { $taxRule = $this->fixtureFactory->createByCode( 'taxRule', - ['dataSet' => $taxRuleDataSet] + ['dataset' => $taxRuleDataSet] ); $taxRule->persist(); $result['taxRule'] = $taxRule; diff --git a/dev/tests/functional/tests/app/Magento/Ups/Test/TestCase/OnePageCheckoutTest.xml b/dev/tests/functional/tests/app/Magento/Ups/Test/TestCase/OnePageCheckoutTest.xml index fcb92ddb6be2a..90adf0227aa8c 100644 --- a/dev/tests/functional/tests/app/Magento/Ups/Test/TestCase/OnePageCheckoutTest.xml +++ b/dev/tests/functional/tests/app/Magento/Ups/Test/TestCase/OnePageCheckoutTest.xml @@ -11,8 +11,8 @@ MAGETWO-12848 – Use UPS Online Shipping Carrier on Checkout as a Registered Customer catalogProductSimple::default, configurableProduct::default, bundleProduct::bundle_fixed_product login - default - US_address_1 + default + US_address_1 United Parcel Service UPS Ground UPS Ground @@ -27,9 +27,9 @@ Checkout as guest using UPS with US shipping origin and UK customer catalogProductSimple::default, configurableProduct::default, bundleProduct::bundle_fixed_product guest - default - UK_address - UK_address + default + UK_address + UK_address United Parcel Service UPS Worldwide Expedited UPS Worldwide Expedited diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml index f0fda4e5442de..e2e122faa0a5e 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml @@ -6,25 +6,21 @@ */ --> - - - Main Website/Main Website Store/Default Store View - test_request%isolation% - - - - Main Website/Main Website Store/Default Store View - - - - test_request%isolation% - - - - - - target_path%isolation% - - - + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/StoreId.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/StoreId.php index 5d234bfab7156..bd669eb51ab7a 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/StoreId.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/StoreId.php @@ -6,30 +6,15 @@ namespace Magento\UrlRewrite\Test\Fixture\UrlRewrite; +use Magento\Mtf\Fixture\DataSource; use Magento\Store\Test\Fixture\Store; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; /** - * Class StoreId - * Store id source + * Store id source. */ -class StoreId implements FixtureInterface +class StoreId extends DataSource { - /** - * Resource data - * - * @var string - */ - protected $data; - - /** - * Data set configuration settings - * - * @var array - */ - protected $params; - /** * @param FixtureFactory $fixtureFactory * @param array $params @@ -40,7 +25,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, $data $this->params = $params; if (preg_match('`%(.*?)%`', $data, $store)) { /** @var Store $storeFixture */ - $storeFixture = $fixtureFactory->createByCode('store', ['dataSet' => $store[1]]); + $storeFixture = $fixtureFactory->createByCode('store', ['dataset' => $store[1]]); if (!$storeFixture->hasData('store_id')) { $storeFixture->persist(); } @@ -48,37 +33,4 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, $data } $this->data = $data; } - - /** - * Persist custom selections products - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data - * - * @param string|null $key [optional] - * @return string - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } } diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/TargetPath.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/TargetPath.php index 44614ad583261..414760395e02d 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/TargetPath.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/TargetPath.php @@ -6,37 +6,24 @@ namespace Magento\UrlRewrite\Test\Fixture\UrlRewrite; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; use Magento\Mtf\Fixture\FixtureInterface; /** - * Class TargetPath - * Prepare Target Path + * Prepare Target Path. */ -class TargetPath implements FixtureInterface +class TargetPath extends DataSource { /** - * Resource data - * - * @var string - */ - protected $data; - - /** - * Return entity + * Return entity. * * @var FixtureInterface */ protected $entity = null; /** - * Data set configuration settings - * - * @var array - */ - protected $params; - - /** + * @constructor * @param FixtureFactory $fixtureFactory * @param array $params * @param string $data [optional] @@ -48,11 +35,11 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, $data $this->data = $data; return; } - preg_match('`%(.*?)%`', $data['entity'], $dataSet); - $entityConfig = isset($dataSet[1]) ? explode('::', $dataSet[1]) : []; + preg_match('`%(.*?)%`', $data['entity'], $dataset); + $entityConfig = isset($dataset[1]) ? explode('::', $dataset[1]) : []; if (count($entityConfig) > 1) { /** @var FixtureInterface $fixture */ - $this->entity = $fixtureFactory->createByCode($entityConfig[0], ['dataSet' => $entityConfig[1]]); + $this->entity = $fixtureFactory->createByCode($entityConfig[0], ['dataset' => $entityConfig[1]]); $this->entity->persist(); $id = $this->entity->hasData('id') ? $this->entity->getId() : $this->entity->getPageId(); $this->data = preg_replace('`(%.*?%)`', $id, $data['entity']); @@ -62,40 +49,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, $data } /** - * Persist custom selections products - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data - * - * @param string|null $key - * @return string - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - - /** - * Return entity + * Return entity. * * @return FixtureInterface|null */ diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest.php index 636a64f31e559..8039caec15da8 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest.php @@ -71,7 +71,7 @@ public function __inject( $this->urlRewriteIndex = $urlRewriteIndex; $category = $fixtureFactory->createByCode( 'category', - ['dataSet' => 'default_subcategory'] + ['dataset' => 'default_subcategory'] ); $category->persist(); return ['category' => $category]; diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.php index 623d03d64103a..c2bd659b50604 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.php @@ -26,7 +26,7 @@ * 4. Select "For Product" from "Create URL Rewrite:" dropdown * 5. Select created early product * 6. Click "Skip Category Selection" button - * 7. Fill data according to dataSet + * 7. Fill data according to dataset * 8. Perform all assertions * * @group URL_Rewrites_(PS) diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.xml index 4413afea5711c..8eb1de56fe44f 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.xml @@ -10,7 +10,7 @@ MAGETWO-12409: Add Temporary Redirect for Product For product - product_with_category + product_with_category Main Website/Main Website Store/Default Store View cat%isolation%/simp_redirect%isolation%.html Temporary (302) @@ -22,7 +22,7 @@ Create Product URL Rewrites with no redirect For product - default + default Main Website/Main Website Store/Default Store View test_%isolation%.html No @@ -32,7 +32,7 @@ Create Product URL Rewrites with Temporary redirect For product - default + default Main Website/Main Website Store/Default Store View test_%isolation%.html Temporary (302) @@ -43,7 +43,7 @@ Create Product URL Rewrites with Permanent redirect For product - default + default Main Website/Main Website Store/Default Store View test_%isolation%.html Permanent (301) diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCustomUrlRewriteEntityTest.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCustomUrlRewriteEntityTest.xml index e3a67cc49fbed..1e855d511f0f2 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCustomUrlRewriteEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCustomUrlRewriteEntityTest.xml @@ -8,7 +8,7 @@ - default + default diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.xml index 8b9bf1859b06a..f682028be63b8 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.xml @@ -8,7 +8,7 @@ - default_without_target + default_without_target product/%catalogProductSimple::product_100_dollar% diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php index 25a5f58638c93..a794d6a8b18fb 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php @@ -26,7 +26,7 @@ * 1. Log in to backend as Admin. * 2. Go to the Marketing-> SEO & Search->URL Rewrites. * 3. Click Category URL Rewrite from grid. - * 4. Edit test value(s) according to dataSet. + * 4. Edit test value(s) according to dataset. * 5. Click 'Save' button. * 6. Perform all asserts. * @@ -55,7 +55,7 @@ class UpdateCategoryUrlRewriteEntityTest extends Injectable protected $urlRewriteEdit; /** - * Prepare dataSets and pages + * Prepare datasets and pages * * @param UrlRewriteIndex $urlRewriteIndex * @param UrlRewriteEdit $urlRewriteEdit @@ -75,7 +75,7 @@ public function __inject( $categoryRedirect = $fixtureFactory->createByCode( 'urlRewrite', [ - 'dataSet' => 'default', + 'dataset' => 'default', 'data' => ['target_path' => $category->getUrlKey() . '.html'] ] ); diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.xml index 76f9b2e73f7d4..5e20d3ac2af75 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.xml @@ -9,8 +9,8 @@ Main Website/Main Website Store/Default Store View - default_subcategory - default + default_subcategory + default - test_request%isolation% No @@ -21,8 +21,8 @@ Main Website/Main Website Store/Default Store View - default_subcategory - default + default_subcategory + default - request_path%isolation%.html Temporary (302) @@ -33,8 +33,8 @@ Main Website/Main Website Store/Default Store View - default_subcategory - default + default_subcategory + default - request_path%isolation%.htm Permanent (301) @@ -45,8 +45,8 @@ Main Website/Main Website Store/Default Store View - default_subcategory - default + default_subcategory + default - request_path%isolation%.aspx Temporary (302) diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest.xml index 989f7cab4a684..bb0fa6ed624a9 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest.xml @@ -8,7 +8,7 @@ - default + default Main Website/Main Website Store/Default Store View wishlist/%isolation% http://www.magentocommerce.com/magento-connect/ @@ -19,7 +19,7 @@ - custom_rewrite_wishlist + custom_rewrite_wishlist Main Website/Main Website Store/Default Store View wishlist/%isolation% catalogsearch/result/?q=$%catalogProductSimple::defaul%sku$ diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php index 3b7562540e692..dd3f4d91257ff 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php @@ -54,7 +54,7 @@ class UpdateProductUrlRewriteEntityTest extends Injectable protected $urlRewriteEdit; /** - * Prepare dataSets and pages + * Prepare datasets and pages * * @param UrlRewriteIndex $urlRewriteIndex * @param UrlRewriteEdit $urlRewriteEdit @@ -81,7 +81,7 @@ public function test(UrlRewrite $urlRewrite, FixtureFactory $fixtureFactory) $productRedirect = $fixtureFactory->createByCode( 'urlRewrite', [ - 'dataSet' => 'default', + 'dataset' => 'default', 'data' => ['target_path' => $urlRewrite->getTargetPath()] ] ); diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role.xml b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role.xml index 39ac5778e0cc3..a013071cb9c75 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role.xml @@ -6,39 +6,24 @@ */ --> - - - AdminRole%isolation% - All - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - AdminRole%isolation% - - - - - - All - - - + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role/InRoleUsers.php b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role/InRoleUsers.php index bd716bbeabb47..6ec27d7a9941b 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role/InRoleUsers.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/Role/InRoleUsers.php @@ -7,24 +7,17 @@ namespace Magento\User\Test\Fixture\Role; use Magento\User\Test\Fixture\User; +use Magento\Mtf\Fixture\DataSource; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; /** * Class InRoleUsers * * Data keys: - * - dataSet + * - dataset */ -class InRoleUsers implements FixtureInterface +class InRoleUsers extends DataSource { - /** - * Array with data set configuration settings - * - * @var array - */ - protected $params; - /** * Array with Admin Users * @@ -32,13 +25,6 @@ class InRoleUsers implements FixtureInterface */ protected $adminUsers; - /** - * Array with usernames - * - * @var array - */ - protected $data; - /** * @construct * @param FixtureFactory $fixtureFactory @@ -48,10 +34,10 @@ class InRoleUsers implements FixtureInterface public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = []) { $this->params = $params; - if (isset($data['dataSet']) && $data['dataSet'] !== '-') { - $dataSets = explode(',', $data['dataSet']); - foreach ($dataSets as $dataSet) { - $adminUser = $fixtureFactory->createByCode('user', ['dataSet' => trim($dataSet)]); + if (isset($data['dataset']) && $data['dataset'] !== '-') { + $datasets = explode(',', $data['dataset']); + foreach ($datasets as $dataset) { + $adminUser = $fixtureFactory->createByCode('user', ['dataset' => trim($dataset)]); if (!$adminUser->hasData('user_id')) { $adminUser->persist(); } @@ -61,39 +47,6 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array } } - /** - * Persist user role - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return array with usernames - * - * @param string $key [optional] - * @return array|null - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - /** * Return array with admin user fixtures * diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.xml b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.xml index 80c969cf4bbfe..a6a92e41d6446 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.xml @@ -6,69 +6,32 @@ */ --> - - - AdminUser%isolation% - FirstName%isolation% - LastName%isolation% - email%isolation%@example.com - 123123q - 123123q - Active - %current_password% - - - - - - FirstName%isolation% - - - LastName%isolation% - - - email%isolation%@example.com - - - AdminUser%isolation% - - - 123123q - - - CURRENT_TIMESTAMP - - - - - - - - - 0 - - - 0 - - - Active - - - - - - - - - - - - en_US - - - - 123123q - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/RoleId.php b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/RoleId.php index 93e9e336080fe..7b0a52176e9a9 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/RoleId.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Fixture/User/RoleId.php @@ -6,18 +6,18 @@ namespace Magento\User\Test\Fixture\User; +use Magento\Mtf\Fixture\DataSource; use Magento\User\Test\Fixture\Role; use Magento\Mtf\Fixture\FixtureFactory; -use Magento\Mtf\Fixture\FixtureInterface; /** * Source for Role of User. * * Data keys: - * - dataSet + * - dataset * - role */ -class RoleId implements FixtureInterface +class RoleId extends DataSource { /** * Admin User Role. @@ -26,13 +26,6 @@ class RoleId implements FixtureInterface */ protected $role; - /** - * User role name. - * - * @var string - */ - protected $data; - /** * @construct * @param FixtureFactory $fixtureFactory @@ -42,9 +35,9 @@ class RoleId implements FixtureInterface public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = []) { $this->params = $params; - if (isset($data['dataSet']) && $data['dataSet'] !== '-') { - list($fixtureCode, $dataSet) = explode('::', $data['dataSet']); - $this->role = $fixtureFactory->createByCode($fixtureCode, ['dataSet' => $dataSet]); + if (isset($data['dataset']) && $data['dataset'] !== '-') { + list($fixtureCode, $dataset) = explode('::', $data['dataset']); + $this->role = $fixtureFactory->createByCode($fixtureCode, ['dataset' => $dataset]); if (!$this->role->hasData('role_id')) { $this->role->persist(); } @@ -58,39 +51,6 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, array } } - /** - * Persist user role. - * - * @return void - */ - public function persist() - { - // - } - - /** - * Return prepared data set. - * - * @param string $key [optional] - * @return string|null - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function getData($key = null) - { - return $this->data; - } - - /** - * Return data set configuration settings. - * - * @return array - */ - public function getDataConfig() - { - return $this->params; - } - /** * Return role fixture. * diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Repository/User.xml b/dev/tests/functional/tests/app/Magento/User/Test/Repository/User.xml index ab4fdba7cb44f..9360d3bedf276 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Repository/User.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/Repository/User.xml @@ -36,7 +36,7 @@ 123123q 123123q - role::default + role::default %current_password% Active diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.xml b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.xml index 98c6794f0dfe3..2ee5f728668fb 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.xml @@ -15,7 +15,7 @@ 123123q 123123q Active - role::Administrators + role::Administrators - %current_password% @@ -31,7 +31,7 @@ 123123q 123123q Inactive - role::Administrators + role::Administrators - %current_password% @@ -46,7 +46,7 @@ 123123q 123123q Active - role::Administrators + role::Administrators username %current_password% @@ -58,7 +58,7 @@ 123123q 123123q Active - role::Administrators + role::Administrators email %current_password% diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteAdminUserEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteAdminUserEntityTest.php index d6d4c9f9debbc..662992062276a 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteAdminUserEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteAdminUserEntityTest.php @@ -67,7 +67,7 @@ public function __prepare(FixtureFactory $fixtureFactory) { $user = $fixtureFactory->createByCode( 'user', - ['dataSet' => 'custom_admin_with_default_role'] + ['dataset' => 'custom_admin_with_default_role'] ); $user->persist(); diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest.php index b4cf004d50b01..22421a9557c82 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/DeleteUserRoleEntityTest.php @@ -68,7 +68,7 @@ public function __prepare(FixtureFactory $fixtureFactory) { $adminUser = $fixtureFactory->createByCode( 'user', - ['dataSet' => 'custom_admin_with_default_role'] + ['dataset' => 'custom_admin_with_default_role'] ); $adminUser->persist(); diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/RevokeAllAccessTokensForAdminWithoutTokensTest.xml b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/RevokeAllAccessTokensForAdminWithoutTokensTest.xml index 1ab6385dacf9b..2603f1744ddf7 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/RevokeAllAccessTokensForAdminWithoutTokensTest.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/RevokeAllAccessTokensForAdminWithoutTokensTest.xml @@ -8,7 +8,7 @@ - custom_admin + custom_admin diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserEntityTest.xml b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserEntityTest.xml index 04daaffc32984..47c30567f6530 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserEntityTest.xml @@ -8,8 +8,8 @@ - custom_admin_with_default_role - role::role_sales + custom_admin_with_default_role + role::role_sales 123123q 0 diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserRoleEntityTest.xml b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserRoleEntityTest.xml index a96e809038e1b..d4d4cf7a2b5f2 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserRoleEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/UpdateAdminUserRoleEntityTest.xml @@ -8,7 +8,7 @@ - custom_admin_with_default_role + custom_admin_with_default_role NewAdminRole%isolation% @@ -16,10 +16,10 @@ - default + default Custom Sales - custom_admin + custom_admin sales diff --git a/dev/tests/functional/tests/app/Magento/Usps/Test/TestCase/OnePageCheckoutTest.xml b/dev/tests/functional/tests/app/Magento/Usps/Test/TestCase/OnePageCheckoutTest.xml index 25c488a697e57..7c026ceb66a3a 100644 --- a/dev/tests/functional/tests/app/Magento/Usps/Test/TestCase/OnePageCheckoutTest.xml +++ b/dev/tests/functional/tests/app/Magento/Usps/Test/TestCase/OnePageCheckoutTest.xml @@ -11,8 +11,8 @@ MAGETWO-12444 – Use USPS Online Shipping Carrier on Checkout as a Registered Customer catalogProductSimple::default, configurableProduct::default, bundleProduct::bundle_fixed_product login - default - US_address_1 + default + US_address_1 United States Postal Service Priority Mail 1-Day Priority Mail 1-Day @@ -27,9 +27,9 @@ Checkout as guest using USPS with US shipping origin and UK customer catalogProductSimple::default, configurableProduct::default, bundleProduct::bundle_fixed_product guest - default - UK_address - UK_address + default + UK_address + UK_address United States Postal Service Priority Mail International Priority Mail International diff --git a/dev/tests/functional/tests/app/Magento/Variable/Test/Constraint/AssertCustomVariableInPage.php b/dev/tests/functional/tests/app/Magento/Variable/Test/Constraint/AssertCustomVariableInPage.php index 31ae1eafecdbc..18bc8800223b4 100644 --- a/dev/tests/functional/tests/app/Magento/Variable/Test/Constraint/AssertCustomVariableInPage.php +++ b/dev/tests/functional/tests/app/Magento/Variable/Test/Constraint/AssertCustomVariableInPage.php @@ -43,7 +43,7 @@ public function processAssert( $cmsPage = $fixtureFactory->createByCode( 'cmsPage', [ - 'dataSet' => 'default', + 'dataset' => 'default', 'data' => [ 'content' => [ 'content' => '{{customVar code=' . $customVariable->getCode() . '}}', diff --git a/dev/tests/functional/tests/app/Magento/Variable/Test/Fixture/SystemVariable.xml b/dev/tests/functional/tests/app/Magento/Variable/Test/Fixture/SystemVariable.xml index c288a4ac3a0e8..5ea25949b0f4b 100644 --- a/dev/tests/functional/tests/app/Magento/Variable/Test/Fixture/SystemVariable.xml +++ b/dev/tests/functional/tests/app/Magento/Variable/Test/Fixture/SystemVariable.xml @@ -6,39 +6,19 @@ */ --> - - - variableCode%isolation% - variableName%isolation% - <p>html_value</p> - plain_value - - - 0 - - - variableCode%isolation% - - - variableName%isolation% - - - - - - 0 - - - plain_value - - - <p>html_value</p> - - - + + + + + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Variable/Test/Repository/SystemVariable.xml b/dev/tests/functional/tests/app/Magento/Variable/Test/Repository/SystemVariable.xml index 827a0fea14fdf..c4ac4c1aafba3 100644 --- a/dev/tests/functional/tests/app/Magento/Variable/Test/Repository/SystemVariable.xml +++ b/dev/tests/functional/tests/app/Magento/Variable/Test/Repository/SystemVariable.xml @@ -7,6 +7,13 @@ --> + + variableCode%isolation% + variableName%isolation% + <p>html_value</p> + plain_value + + variableCode%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Variable/Test/TestCase/UpdateCustomVariableEntityTest.php b/dev/tests/functional/tests/app/Magento/Variable/Test/TestCase/UpdateCustomVariableEntityTest.php index c3dc3c5c3a7ac..0db8eee47b842 100644 --- a/dev/tests/functional/tests/app/Magento/Variable/Test/TestCase/UpdateCustomVariableEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Variable/Test/TestCase/UpdateCustomVariableEntityTest.php @@ -81,7 +81,7 @@ public function __inject( $customVariableOrigin->persist(); // TODO: Move store creation to "__prepare" method after fix bug MAGETWO-29331 - $storeOrigin = $factory->createByCode('store', ['dataSet' => 'custom']); + $storeOrigin = $factory->createByCode('store', ['dataset' => 'custom']); $storeOrigin->persist(); $this->store = $storeOrigin; diff --git a/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.php b/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.php index 8da91bdf5ddcd..a9cc3ab7a2638 100644 --- a/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.php +++ b/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.php @@ -69,12 +69,12 @@ public function __prepare( ) { $this->markTestIncomplete("Epic: MAGETWO-30073. FPC issue."); $this->fixtureFactory = $fixtureFactory; - $customer = $fixtureFactory->createByCode('customer', ['dataSet' => 'johndoe_with_addresses']); + $customer = $fixtureFactory->createByCode('customer', ['dataset' => 'johndoe_with_addresses']); $customer->persist(); - $taxRule = $fixtureFactory->createByCode('taxRule', ['dataSet' => 'tax_rule_default']); + $taxRule = $fixtureFactory->createByCode('taxRule', ['dataset' => 'tax_rule_default']); $taxRule->persist(); $productTemplate = $this->fixtureFactory - ->createByCode('catalogAttributeSet', ['dataSet' => 'custom_attribute_set_with_fpt']); + ->createByCode('catalogAttributeSet', ['dataset' => 'custom_attribute_set_with_fpt']); $productTemplate->persist(); return [ 'customer' => $customer, @@ -113,7 +113,7 @@ public function test( ) { $product = $this->fixtureFactory->createByCode( 'catalogProductSimple', - ['dataSet' => $productData, 'data' => ['attribute_set_id' => ['attribute_set' => $productTemplate]]] + ['dataset' => $productData, 'data' => ['attribute_set_id' => ['attribute_set' => $productTemplate]]] ); $product->persist(); $this->objectManager->create( diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest.php index f64c8da3fa6d4..33bac1101c12f 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest.php @@ -18,7 +18,7 @@ * Steps: * 1. Login as a customer * 2. Navigate to catalog page - * 3. Add created product to Wishlist according to dataSet + * 3. Add created product to Wishlist according to dataset * 4. Perform all assertions * * @group Wishlist_(CS) diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ViewProductInCustomerWishlistOnBackendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ViewProductInCustomerWishlistOnBackendTest.php index 0c2913116d0e2..3598c87f0c5d3 100644 --- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ViewProductInCustomerWishlistOnBackendTest.php +++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ViewProductInCustomerWishlistOnBackendTest.php @@ -15,7 +15,7 @@ * * Preconditions: * 1. Create customer. - * 2. Create products from dataSet. + * 2. Create products from dataset. * 3. Add products to the customer's wish list (composite products should be configured). * * Steps: From a359c4712e794877309b57efa646e4879c49c94e Mon Sep 17 00:00:00 2001 From: Dmytro Aponasenko Date: Tue, 30 Jun 2015 12:05:08 +0300 Subject: [PATCH 2/8] MTA-2343: Move all test data to repositories --- .../BundleProduct/BundleSelections.php | 39 ++++++++++++++++++- .../Catalog/Test/Fixture/Product/Price.php | 8 ---- .../Product/NavigateUpSellProductsTest.php | 2 - .../Cms/Test/Fixture/CmsPage/Content.php | 2 + .../ConfigurableAttributesData.php | 5 +-- .../CreateConfigurableProductEntityTest.xml | 3 +- .../Test/Fixture/DownloadableProduct.xml | 2 +- .../Test/Fixture/GroupedProduct.xml | 2 +- .../Repository/GroupedProduct/Associated.xml | 2 +- 9 files changed, 45 insertions(+), 20 deletions(-) diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/BundleSelections.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/BundleSelections.php index 1173b4def58c9..664f7537eecb7 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/BundleSelections.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/BundleSelections.php @@ -16,6 +16,20 @@ */ class BundleSelections extends DataSource { + /** + * Repository factory instance. + * + * @var RepositoryFactory + */ + protected $repositoryFactory; + + /** + * Fixture factory instance. + * + * @var RepositoryFactory + */ + protected $fixtureFactory; + /** * @constructor * @param RepositoryFactory $repositoryFactory @@ -29,11 +43,24 @@ public function __construct( array $data, array $params = [] ) { + $this->repositoryFactory = $repositoryFactory; + $this->fixtureFactory = $fixtureFactory; $this->params = $params; $this->data = !isset($data['dataset']) ? $data : []; + $this->getDataset($data); + $this->prepareProducts(); + } + /** + * Get dataset for a field. + * + * @param array $data + * @return void + */ + protected function getDataset(array $data) + { if (isset($data['dataset']) && isset($this->params['repository'])) { - $this->data = $repositoryFactory->get($this->params['repository'])->get($data['dataset']); + $this->data = $this->repositoryFactory->get($this->params['repository'])->get($data['dataset']); if (!empty($data['products'])) { $this->data['products'] = []; $this->data['products'] = explode('|', $data['products']); @@ -42,7 +69,15 @@ public function __construct( } } } + } + /** + * Prepare products for bundle items. + * + * @return void + */ + protected function prepareProducts() + { if (!empty($this->data['products'])) { $productsSelections = $this->data['products']; $this->data['products'] = []; @@ -54,7 +89,7 @@ public function __construct( continue; } list($fixture, $dataset) = explode('::', $product); - $productSelection[$key] = $fixtureFactory->createByCode($fixture, ['dataset' => $dataset]); + $productSelection[$key] = $this->fixtureFactory->createByCode($fixture, ['dataset' => $dataset]); $productSelection[$key]->persist(); $this->data['bundle_options'][$index]['assigned_products'][$key]['search_data']['name'] = $productSelection[$key]->getName(); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/Price.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/Price.php index 7827c33370301..293b0489f569e 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/Price.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/Price.php @@ -38,14 +38,6 @@ public function __construct(RepositoryFactory $repositoryFactory, array $params, if (isset($data['value'])) { $this->data = $data['value']; -// if (is_array($this->data)) { -// $this->data = array_filter( -// $this->data, -// function ($value) { -// return $value !== '-'; -// } -// ); -// } } if (isset($data['dataset']) && isset($this->params['repository'])) { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/NavigateUpSellProductsTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/NavigateUpSellProductsTest.php index 57d87b3147d82..c3ed264e72fc9 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/NavigateUpSellProductsTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/NavigateUpSellProductsTest.php @@ -9,8 +9,6 @@ use Magento\Mtf\Fixture\InjectableFixture; /** - * Test Flow: - * * Preconditions: * 1. Create products. * 2. Assign promoted products. diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage/Content.php b/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage/Content.php index b7c10f52cffea..0ce3f511d5732 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage/Content.php +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/Fixture/CmsPage/Content.php @@ -31,6 +31,8 @@ class Content extends DataSource * @param FixtureFactory $fixtureFactory * @param array $params * @param array $data + * + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function __construct( RepositoryFactory $repositoryFactory, diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct/ConfigurableAttributesData.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct/ConfigurableAttributesData.php index 31001b44eb5c2..79ed15ba3836a 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct/ConfigurableAttributesData.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProduct/ConfigurableAttributesData.php @@ -12,7 +12,6 @@ use Magento\Mtf\Fixture\InjectableFixture; use Magento\Mtf\Repository\RepositoryFactory; use Magento\Catalog\Test\Fixture\CatalogProductSimple; -use Magento\Catalog\Test\Fixture\CatalogProductAttribute; /** * Source configurable attributes data of the configurable products. @@ -94,7 +93,7 @@ public function __construct( */ protected function prepareAttributes(array $data) { - if (isset($data['attributes'])) { + if (!isset($data['attributes'])) { return; } @@ -145,7 +144,7 @@ protected function prepareAttributesData(array $data) */ protected function prepareProducts(array $data) { - if (isset($data['products'])) { + if (!isset($data['products'])) { return; } diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.xml index 043f4b63cba9f..224ebfc244f03 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.xml @@ -5,8 +5,7 @@ * See COPYING.txt for license details. */ --> - + Create product with category and two new options diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.xml index 294d89c5622ee..3d250fc3f2f46 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.xml +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProduct.xml @@ -64,7 +64,7 @@ - + diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml index 2653e830bbca7..951ab8bd08fa9 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml @@ -28,7 +28,7 @@ - + diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct/Associated.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct/Associated.xml index 80647ef060751..8ada3e7a91dd0 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct/Associated.xml +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProduct/Associated.xml @@ -6,7 +6,7 @@ */ --> - + From a07357fca1586cb486eac782f766e9e6c7ba1967 Mon Sep 17 00:00:00 2001 From: Dmytro Aponasenko Date: Wed, 1 Jul 2015 09:49:14 +0300 Subject: [PATCH 3/8] MTA-2343: Move all test data to repositories --- .../CreateBundleProductEntityTest.xml | 1 - .../Product/Attribute/Edit/AttributeForm.php | 23 ++++++++++++++++++- .../Product/UpdateSimpleProductEntityTest.xml | 3 +-- .../AssertCatalogPriceRuleNoticeMessage.php | 4 ++-- .../Test/Block/Cart/AbstractCartItem.php | 2 +- .../Test/Fixture/GroupedProduct.xml | 2 +- .../Test/Block/Adminhtml/Order/Create.php | 3 +-- .../Order/Create/Items/ItemProduct.php | 8 +++---- .../Test/Repository/OrderInjectable/Price.xml | 2 +- 9 files changed, 32 insertions(+), 16 deletions(-) diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.xml index 31ced246ab4d3..40e5809b35255 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.xml @@ -99,7 +99,6 @@ - Bug: MAGETWO-35342 Create fixed bundle with all types options bundle-product-%isolation% BundleProduct %isolation% diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/AttributeForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/AttributeForm.php index 791edb5f52296..9824582c0225a 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/AttributeForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Edit/AttributeForm.php @@ -76,7 +76,28 @@ public function getData(FixtureInterface $fixture = null, SimpleElement $element } } - return $data; + return $this->removeEmptyValues($data); + } + + /** + * Remove recursive all empty values in array. + * + * @param mixed $input + * @return mixed + */ + protected function removeEmptyValues($input) + { + if (!is_array($input)) { + return $input; + } + $filteredArray = []; + foreach ($input as $key => $value) { + if ($value) { + $filteredArray[$key] = $this->removeEmptyValues($value); + } + } + + return $filteredArray; } /** diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.xml index 8d5e0aa7c4c5a..e9f21fa39a028 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.xml @@ -9,7 +9,7 @@ Update visibility to Catalog, Search - simple_with_tier_price + product_with_category Test simple product %isolation% test_simple_product_%isolation% 245.00 @@ -143,7 +143,6 @@ Simple Product %isolation% sku_simple_product_%isolation% 1.99 - - default diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleNoticeMessage.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleNoticeMessage.php index 8609e5acd331b..889735d7f2eab 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleNoticeMessage.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleNoticeMessage.php @@ -10,12 +10,12 @@ use Magento\Mtf\Constraint\AbstractConstraint; /** - * Class AssertCatalogPriceRuleNoticeMessage + * Assert notice message after saving catalog price rule. */ class AssertCatalogPriceRuleNoticeMessage extends AbstractConstraint { const NOTICE_MESSAGE_RULES = 'We found updated rules that are not applied.'; - const NOTICE_MESSAGE_APPLY = ' Please, click Apply Rules in order to see immediate effect in the catalog.'; + const NOTICE_MESSAGE_APPLY = ' Please click "Apply Rules" to update your catalog.'; /** * Assert that message "We found updated rules that are not applied..." diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php index 77da7feb3be50..458c7c1e57982 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php @@ -40,7 +40,7 @@ class AbstractCartItem extends Block * * @var string */ - protected $qty = './/input[@type="number" and @title="Quantity"]'; + protected $qty = './/input[@data-role="cart-item-qty"]'; /** * Cart item sub-total xpath selector diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml index 951ab8bd08fa9..e1757e1adbcf0 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProduct.xml @@ -71,7 +71,7 @@ - + diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php index ed403d78e22b9..6eb392b6d8ccf 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php @@ -234,8 +234,7 @@ public function updateProductsData(array $products) ['element' => $this->_rootElement->find($this->itemsBlock)] ); foreach ($products as $product) { - $items->getItemProductByName($product->getName()) - ->fill($product->getDataFieldConfig('checkout_data')['source']); + $items->getItemProductByName($product->getName())->fillCheckoutData($product->getCheckoutData()); } $this->updateItems(); } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Items/ItemProduct.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Items/ItemProduct.php index 406aa612ce94d..9eed5cedd9768 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Items/ItemProduct.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Items/ItemProduct.php @@ -8,7 +8,6 @@ use Magento\Mtf\Block\Form; use Magento\Mtf\Client\Locator; -use Magento\Mtf\Fixture\FixtureInterface; use Magento\Mtf\Client\Element\SimpleElement; /** @@ -78,15 +77,14 @@ public function getCheckoutData(array $fields, $currency = '$') } /** - * Fill the root form. + * Fill the root form with checkout data. * - * @param FixtureInterface $fixture + * @param array $data * @param SimpleElement|null $element * @return $this */ - public function fill(FixtureInterface $fixture, SimpleElement $element = null) + public function fillCheckoutData(array $data, SimpleElement $element = null) { - $data = $fixture->getData(); if (isset($data['cartItem'])) { unset($data['cartItem']); } diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable/Price.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable/Price.xml index 968837bdb3b5b..be490d7a33eb6 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable/Price.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable/Price.xml @@ -6,7 +6,7 @@ */ --> - + 560 280 From 5ccc5bbd7c41ea5ae9af34d5b5438e2fa8d31497 Mon Sep 17 00:00:00 2001 From: Dmytro Aponasenko Date: Thu, 2 Jul 2015 13:27:15 +0300 Subject: [PATCH 4/8] MTA-2343: Move all test data to repositories --- .../Backend/Test/Block/Widget/Grid.php | 2 +- .../Test/Block/Cart/AbstractCartItem.php | 2 +- .../AddProductsToShoppingCartEntityTest.php | 4 - .../AddProductsToShoppingCartEntityTest.xml | 6 +- .../DeleteProductFromMiniShoppingCartTest.php | 5 +- .../DeleteProductFromMiniShoppingCartTest.xml | 30 ++++---- ...eProductFromMiniShoppingCartEntityTest.php | 2 - ...eProductFromMiniShoppingCartEntityTest.xml | 73 +++++++++---------- .../TestStep/LogoutCustomerOnFrontendStep.php | 17 ++--- .../Downloadable/Test/Fixture/Cart/Item.php | 2 +- .../DownloadableProduct/CheckoutData.xml | 8 +- .../Repository/DownloadableProduct/Links.xml | 14 ++-- .../Sales/Test/Block/Adminhtml/Order/Grid.php | 7 ++ .../TestCase/CreateSalesRuleEntityTest.xml | 2 +- 14 files changed, 84 insertions(+), 90 deletions(-) diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php index 6e6d66e7b0ee0..76509dfa40663 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php @@ -186,7 +186,7 @@ abstract class Grid extends Block * * @var string */ - protected $rowPattern = '//tr[%s]'; + protected $rowPattern = '//tbody/tr[%s]'; /** * Get backend abstract block diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php index 458c7c1e57982..f13d325e2ea0e 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php @@ -63,7 +63,7 @@ class AbstractCartItem extends Block * * @var string */ - protected $optionsBlock = './/dl[@class="item-options"]'; + protected $optionsBlock = './/dl[contains(@class, "item-options")]'; /** * Escape currency in price diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php index 8bfa4789d0ef3..cca404d1fa94f 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php @@ -14,10 +14,6 @@ use Magento\Mtf\TestCase\Injectable; /** - * Test Creation for AddProductsToShoppingCartEntity - * - * Test Flow: - * * Preconditions: * 1. All type products is created * diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.xml b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.xml index a03da15b27b82..839994f8a917e 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.xml @@ -54,8 +54,7 @@ downloadableProduct::with_two_separately_links - 46 - Bug: MAGETWO-24195 + 22.43 @@ -73,8 +72,7 @@ catalogProductSimple::with_two_custom_option, catalogProductVirtual::product_50_dollar, downloadableProduct::with_two_separately_links, groupedProduct::three_simple_products, configurableProduct::default, bundleProduct::bundle_dynamic_product, bundleProduct::bundle_dynamic_product - 3249 - Bug: MAGETWO-24195 + 2510 diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php index 194b4a6c63ea2..a586805619624 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php @@ -14,10 +14,7 @@ use Magento\Mtf\TestCase\Injectable; /** - * Class DeleteProductFromMiniShoppingCartTest - * Test delete products from shopping cart - * - * Preconditions + * Preconditions: * 1. Create product according to dataset * 2. Add products to cart * diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.xml b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.xml index 165315f753cb3..d9e8f0c865b2a 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.xml +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.xml @@ -6,19 +6,19 @@ */ --> - - - delete Simple - catalogProductSimple::default, catalogProductVirtual::default - 0 - - - - - delete Simple - catalogProductSimple::default - 0 - - - + + + delete Simple + catalogProductSimple::default, catalogProductVirtual::default + 0 + + + + + delete Simple + catalogProductSimple::default + 0 + + + diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php index 58e0cc4e0ccb4..01385567492ce 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php @@ -13,8 +13,6 @@ use Magento\Mtf\TestCase\Injectable; /** - * Test Flow: - * * Preconditions: * 1. Create product according to dataset. * 2. Go to frontend. diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.xml b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.xml index 7ed2ce49ad5ed..49792e12b0ee7 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.xml @@ -6,41 +6,40 @@ */ --> - - - Update Simple - catalogProductSimple::with_two_custom_option - simple_update_mini_shopping_cart - - - - - Update Configurable and verify previous product was updated to new one in shopping cart and mini shopping cart - configurableProduct::default - configurable_update_mini_shopping_cart - - - - - - - Update Bundle and verify previous product was updated to new one in shopping cart and mini shopping cart - bundleProduct::bundle_fixed_product - bundle_update_mini_shopping_cart - - - - - - - Update Downloadable and check previous link was updated to new one in shopping cart and mini shopping cart - downloadableProduct::with_two_separately_links - downloadable_update_mini_shopping_cart - Bug: MAGETWO-24195 - - - - - - + + + Update Simple + catalogProductSimple::with_two_custom_option + simple_update_mini_shopping_cart + + + + + Update Configurable and verify previous product was updated to new one in shopping cart and mini shopping cart + configurableProduct::default + configurable_update_mini_shopping_cart + + + + + + + Update Bundle and verify previous product was updated to new one in shopping cart and mini shopping cart + bundleProduct::bundle_fixed_product + bundle_update_mini_shopping_cart + + + + + + + Update Downloadable and check previous link was updated to new one in shopping cart and mini shopping cart + downloadableProduct::with_two_separately_links + downloadable_update_mini_shopping_cart + + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php index df4f4ce87118b..1ff30b1dcdf03 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php @@ -7,8 +7,8 @@ namespace Magento\Customer\Test\TestStep; use Magento\Cms\Test\Page\CmsIndex; -use Magento\Customer\Test\Page\CustomerAccountLogout; use Magento\Mtf\TestStep\TestStepInterface; +use Magento\Customer\Test\Page\CustomerAccountIndex; /** * Logout customer on frontend. @@ -28,21 +28,21 @@ class LogoutCustomerOnFrontendStep implements TestStepInterface protected $cmsIndex; /** - * Customer logout page. + * Customer account page. * - * @var CustomerAccountLogout + * @var CustomerAccountIndex */ - protected $customerAccountLogout; + protected $customerAccount; /** * @constructor * @param CmsIndex $cmsIndex - * @param CustomerAccountLogout $customerAccountLogout + * @param CustomerAccountIndex $customerAccount */ - public function __construct(CmsIndex $cmsIndex, CustomerAccountLogout $customerAccountLogout) + public function __construct(CmsIndex $cmsIndex, CustomerAccountIndex $customerAccount) { $this->cmsIndex = $cmsIndex; - $this->customerAccountLogout = $customerAccountLogout; + $this->customerAccount = $customerAccount; } /** @@ -52,9 +52,8 @@ public function __construct(CmsIndex $cmsIndex, CustomerAccountLogout $customerA */ public function run() { - $this->cmsIndex->open(); + $this->customerAccount->open(); $this->cmsIndex->getCmsPageBlock()->waitPageInit(); - $this->cmsIndex->getCmsPageBlock()->waitUntilTextIsVisible('Home Page'); if ($this->cmsIndex->getLinksBlock()->isLinkVisible('Sign Out')) { $this->cmsIndex->getLinksBlock()->openLink('Sign Out'); $this->cmsIndex->getCmsPageBlock()->waitUntilTextIsVisible('Home Page'); diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php index ee17be252c588..14050dace32ec 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php @@ -32,7 +32,7 @@ public function __construct(FixtureInterface $product) foreach ($checkoutData['options']['links'] as $link) { $keyLink = str_replace('link_', '', $link['label']); $checkoutDownloadableOptions[] = [ - 'title' => 'Links', + 'title' => $downloadableOptions['title'], 'value' => $downloadableOptions['downloadable']['link'][$keyLink]['title'], ]; } diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/CheckoutData.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/CheckoutData.xml index eb793f9338972..74b9db4043e56 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/CheckoutData.xml +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/CheckoutData.xml @@ -35,8 +35,8 @@ - 23 - 23 + 22.43 + 22.43 @@ -63,14 +63,14 @@ - link_0 + link_1 Yes 23 - 22.43 + 23 diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/Links.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/Links.xml index cd939014a1bb5..52291319fe9ab 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/Links.xml +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProduct/Links.xml @@ -52,12 +52,12 @@ - Links%isolation% + Links title %isolation% Yes - link1%isolation% + link-1-%isolation% 2.43 2 @@ -70,7 +70,7 @@ 1 - link2%isolation% + link-2-%isolation% 3 3 @@ -87,12 +87,12 @@ - Links%isolation% + Links Title %isolation% Yes - link1%isolation% + link-1-%isolation% 2.43 2 @@ -105,7 +105,7 @@ 0 - link2%isolation% + link-2-%isolation% 3 3 @@ -118,7 +118,7 @@ 1 - link3%isolation% + link-3-%isolation% 5.43 5 diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Grid.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Grid.php index f402dd1f6273c..4a373f2ce3c3c 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Grid.php @@ -64,6 +64,13 @@ class Grid extends GridInterface ], ]; + /** + * An element locator which allows to select entities in grid. + * + * @var string + */ + protected $selectItem = 'tbody tr .col-select label input'; + /** * Start to create new order. */ diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.xml b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.xml index 0ff2064ad79fb..ec9bf8c58ed5d 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.xml @@ -249,7 +249,7 @@ Main Website NOT LOGGED IN No Coupon - {Product attribute combination:[Attribute Set|is|Default]} + {Product attribute combination:[Product Template|is|Default]} Percent of product price discount 50 No From b52a6daa9f9bf8abc9757e69b7d17635174b2f6c Mon Sep 17 00:00:00 2001 From: Dmytro Aponasenko Date: Fri, 3 Jul 2015 12:03:27 +0300 Subject: [PATCH 5/8] MTA-2343: Move all test data to repositories --- .../Product/CreateSimpleProductEntityTest.xml | 6 +- ...sertCatalogPriceRuleAppliedCatalogPage.php | 4 +- .../Test/Block/Cart/AbstractCartItem.php | 21 +++++-- .../Checkout/Test/Block/Cart/CartItem.php | 37 ++++++++--- .../Test/Block/Onepage/AbstractReview.php | 62 ++++++++++++------- .../Test/Block/Onepage/Payment/Methods.php | 34 ++++++++-- .../Checkout/Test/Block/Onepage/Shipping.php | 13 +++- .../Test/Block/Onepage/Shipping/Method.php | 3 +- .../Product/Edit/Tab/Super/Config/Matrix.php | 29 +++++++++ .../ConfigurableAttributesData.xml | 1 + .../Customer/Test/Repository/Address.xml | 2 +- .../Dhl/Test/TestCase/OnePageCheckoutTest.xml | 2 +- ...axCalculationAfterCheckoutDownloadable.php | 15 ++--- ...axRuleIsAppliedToAllPricesDownloadable.php | 2 +- ...iedToAllPricesDownloadableExcludingTax.php | 10 +-- ...iedToAllPricesDownloadableIncludingTax.php | 13 ++-- .../Test/TestCase/OnePageCheckoutTest.xml | 2 +- .../Test/Block/Adminhtml/Order/Create.php | 4 +- .../Adminhtml/Order/Create/GiftOptions.php | 1 - .../Adminhtml/Order/Create/GiftOptions.xml | 2 +- .../AssertGiftMessageInBackendOrder.php | 8 ++- .../AssertGiftMessageInFrontendOrderItems.php | 4 +- .../Test/Page/Adminhtml/OrderView.xml | 2 +- .../Product/Grouped/AssociatedProducts.php | 50 +++++++++++---- .../TestCase/SalesInvoiceReportEntityTest.xml | 6 +- .../ViewedProductsReportEntityTest.xml | 2 +- .../Test/Page/Adminhtml/SalesOrderView.xml | 2 +- .../Test/Repository/OrderInjectable/Price.xml | 24 ++++--- .../AbstractAssertOrderTaxOnBackend.php | 24 ++----- ...tractAssertTaxCalculationAfterCheckout.php | 27 ++++++-- ...tractAssertTaxRuleIsAppliedToAllPrices.php | 4 +- ...tionAfterCheckoutExcludingIncludingTax.php | 2 +- .../Tax/Test/Repository/ConfigData.xml | 6 +- 33 files changed, 289 insertions(+), 135 deletions(-) diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.xml index 190d4bf76e64f..7983610bd3319 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.xml @@ -337,7 +337,7 @@ - Create product with cross-sell products + MAGETWO-29081: Create product with cross-sell products simple-product-%isolation% Simple Product %isolation% simple_sku_%isolation% @@ -354,7 +354,7 @@ - Create product with up-sell products + MAGETWO-29105: Create product with up-sell products simple-product-%isolation% Simple Product %isolation% simple_sku_%isolation% @@ -371,7 +371,7 @@ - Create product with related products + MAGETWO-29352: Create product with related products simple-product-%isolation% Simple Product %isolation% simple_sku_%isolation% diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedCatalogPage.php b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedCatalogPage.php index 045029bca59a3..7e425f21585dc 100755 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedCatalogPage.php +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/Constraint/AssertCatalogPriceRuleAppliedCatalogPage.php @@ -46,8 +46,8 @@ public function processAssert( $categoryName = $product->getCategoryIds()[0]; $cmsIndexPage->getTopmenu()->selectCategoryByName($categoryName); $priceBlock = $catalogCategoryViewPage->getListProductBlock()->getProductItem($product)->getPriceBlock(); - $actualPrice['regular'] = $priceBlock->getOldPrice(); - $actualPrice['special'] = $priceBlock->getSpecialPrice(); + $actualPrice['regular'] = (float)$priceBlock->getOldPrice(); + $actualPrice['special'] = (float)$priceBlock->getSpecialPrice(); $actualPrice['discount_amount'] = $actualPrice['regular'] - $actualPrice['special']; $diff = $this->verifyData($actualPrice, $productPrice[$key]); \PHPUnit_Framework_Assert::assertTrue( diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php index f13d325e2ea0e..389fa52d3b506 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php @@ -9,7 +9,6 @@ use Magento\Mtf\Block\Block; /** - * Class AbstractCartItem * Base product item block on checkout page */ class AbstractCartItem extends Block @@ -35,6 +34,13 @@ class AbstractCartItem extends Block */ protected $priceInclTax = './/td[@class="col price"]/*[@class="price-including-tax"]/span'; + /** + * Selector for unit price excluding tax + * + * @var string + */ + protected $priceExclTax = './/td[@class="col price"]/*[@class="price-excluding-tax"]/span'; + /** * Quantity input selector * @@ -47,16 +53,21 @@ class AbstractCartItem extends Block * * @var string */ - protected $subtotalPrice = './/td[@class="col subtotal"]//*[@class="price-excluding-tax"]//span[@class="price"]'; + protected $subtotalPrice = '.col.subtotal .price'; + + /** + * Cart item sub-total excluding tax xpath selector + * + * @var string + */ + protected $subTotalPriceExclTax = '.col.subtotal .price-excluding-tax .price'; - // @codingStandardsIgnoreStart /** * Cart item sub-total including tax xpath selector * * @var string */ - protected $subTotalPriceInclTax = '//td[@class="col subtotal"]//span[@class="price"]'; - // @codingStandardsIgnoreEnd + protected $subTotalPriceInclTax = '.col.subtotal .price-including-tax .price'; /** * Selector for options block diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php index fe9ac8f85cfa3..cbca12b823944 100755 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php @@ -49,13 +49,6 @@ class CartItem extends AbstractCartItem */ protected $name = '.product-item-name a'; - /** - * Cart item sub-total xpath selector - * - * @var string - */ - protected $subtotalPrice = './/td[@class="col subtotal"]//*[@class="price-excluding-tax"]//span[@class="price"]'; - /** * Get product name * @@ -92,6 +85,19 @@ public function getPriceInclTax() : null; } + /** + * Get product price excluding tax + * + * @return string|null + */ + public function getPriceExclTax() + { + $cartProductPrice = $this->_rootElement->find($this->priceExclTax, Locator::SELECTOR_XPATH); + return $cartProductPrice->isVisible() + ? str_replace(',', '', $this->escapeCurrency($cartProductPrice->getText())) + : null; + } + /** * Set product quantity * @@ -120,7 +126,20 @@ public function getQty() */ public function getSubtotalPrice() { - $cartProductPrice = $this->_rootElement->find($this->subtotalPrice, Locator::SELECTOR_XPATH); + $cartProductPrice = $this->_rootElement->find($this->subtotalPrice); + return $cartProductPrice->isVisible() + ? str_replace(',', '', $this->escapeCurrency($cartProductPrice->getText())) + : null; + } + + /** + * Get sub-total excluding tax for the specified item in the cart + * + * @return string|null + */ + public function getSubtotalPriceExclTax() + { + $cartProductPrice = $this->_rootElement->find($this->subTotalPriceExclTax); return $cartProductPrice->isVisible() ? str_replace(',', '', $this->escapeCurrency($cartProductPrice->getText())) : null; @@ -133,7 +152,7 @@ public function getSubtotalPrice() */ public function getSubtotalPriceInclTax() { - $cartProductPrice = $this->_rootElement->find($this->subTotalPriceInclTax, Locator::SELECTOR_XPATH); + $cartProductPrice = $this->_rootElement->find($this->subTotalPriceInclTax); return $cartProductPrice->isVisible() ? str_replace(',', '', $this->escapeCurrency($cartProductPrice->getText())) : null; diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/AbstractReview.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/AbstractReview.php index 93eab1a28d433..c16472fb1281d 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/AbstractReview.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/AbstractReview.php @@ -26,6 +26,13 @@ abstract class AbstractReview extends Block */ protected $continueCheckoutButton = '#review-buttons-container button'; + /** + * Product item block locator. + * + * @var string + */ + protected $productItemByName = './/li[contains(@class,"product-item") and contains(.,"%s")]'; + /** * Grand total search mask. * @@ -38,14 +45,14 @@ abstract class AbstractReview extends Block * * @var string */ - protected $grandTotalExclTax = '[class="grand totals excl"] td>strong'; + protected $grandTotalExclTax = '.grand.totals.excl .price'; /** * Grand total including tax search mask. * * @var string */ - protected $grandTotalInclTax = '[class="grand totals incl"] td>strong'; + protected $grandTotalInclTax = '.grand.totals.incl .price'; /** * Subtotal search mask. @@ -59,28 +66,28 @@ abstract class AbstractReview extends Block * * @var string */ - protected $subtotalExclTax = '[class="totals sub excl"] span'; + protected $subtotalExclTax = '.totals.sub.excl .price'; /** * Subtotal including tax search mask. * * @var string */ - protected $subtotalInclTax = '[class="totals sub incl"] span'; + protected $subtotalInclTax = '.totals.sub.incl .price'; /** * Tax search mask. * * @var string */ - protected $tax = '.totals-tax span'; + protected $tax = '.totals-tax .price'; /** * Discount search mask. * * @var string */ - protected $discount = '[class="totals"] .amount>span'; + protected $discount = '.totals.discount .price'; /** * Shipping excluding tax search mask. @@ -94,21 +101,21 @@ abstract class AbstractReview extends Block * * @var string */ - protected $shippingInclTax = '[class="totals shipping incl"] span'; + protected $shippingInclTax = '.totals.shipping.incl .price'; /** * Product price excluding tax search mask. * * @var string */ - protected $itemExclTax = '//tr[contains (.,"%s")]/td[@class="col price"]/span[@class="price-excluding-tax"]/span'; + protected $itemExclTax = '.price-excluding-tax .price'; /** * Product price including tax search mask. * * @var string */ - protected $itemInclTax = '//tr[contains (.,"%s")]/td[@class="col price"]/span[@class="price-including-tax"]/span'; + protected $itemInclTax = '.price-including-tax .price'; // @codingStandardsIgnoreStart /** @@ -116,14 +123,14 @@ abstract class AbstractReview extends Block * * @var string */ - protected $itemSubExclTax = '//tr[contains (.,"%s")]/td[@class="col subtotal"]/span[@class="price-excluding-tax"]/span'; + protected $itemSubExclTax = '.subtotal .price-excluding-tax .price'; /** * Product price subtotal including tax search mask. * * @var string */ - protected $itemSubInclTax = '//tr[contains (.,"%s")]/td[@class="col subtotal"]/span[@class="price-including-tax"]/span'; + protected $itemSubInclTax = '.subtotal .price-including-tax .price'; // @codingStandardsIgnoreEnd /** @@ -163,8 +170,11 @@ public function getGrandTotal() */ public function getItemPriceExclTax($productName) { - $locator = sprintf($this->itemExclTax, $productName); - $price = $this->_rootElement->find($locator, Locator::SELECTOR_XPATH); + $productItem = $this->_rootElement->find( + sprintf($this->productItemByName, $productName), + Locator::SELECTOR_XPATH + ); + $price = $productItem->find($this->itemExclTax); return $price->isVisible() ? $this->escapeCurrency($price->getText()) : null; } @@ -176,8 +186,11 @@ public function getItemPriceExclTax($productName) */ public function getItemPriceInclTax($productName) { - $locator = sprintf($this->itemInclTax, $productName); - $price = $this->_rootElement->find($locator, Locator::SELECTOR_XPATH); + $productItem = $this->_rootElement->find( + sprintf($this->productItemByName, $productName), + Locator::SELECTOR_XPATH + ); + $price = $productItem->find($this->itemInclTax); return $price->isVisible() ? $this->escapeCurrency($price->getText()) : null; } @@ -189,8 +202,11 @@ public function getItemPriceInclTax($productName) */ public function getItemSubExclTax($productName) { - $locator = sprintf($this->itemSubExclTax, $productName); - $price = $this->_rootElement->find($locator, Locator::SELECTOR_XPATH); + $productItem = $this->_rootElement->find( + sprintf($this->productItemByName, $productName), + Locator::SELECTOR_XPATH + ); + $price = $productItem->find($this->itemSubExclTax); return $price->isVisible() ? $this->escapeCurrency($price->getText()) : null; } @@ -202,8 +218,11 @@ public function getItemSubExclTax($productName) */ public function getItemSubInclTax($productName) { - $locator = sprintf($this->itemSubInclTax, $productName); - $price = $this->_rootElement->find($locator, Locator::SELECTOR_XPATH); + $productItem = $this->_rootElement->find( + sprintf($this->productItemByName, $productName), + Locator::SELECTOR_XPATH + ); + $price = $productItem->find($this->itemSubInclTax); return $price->isVisible() ? $this->escapeCurrency($price->getText()) : null; } @@ -236,8 +255,8 @@ public function getGrandTotalInclTax() */ public function getTax() { - $tax = $this->_rootElement->find($this->tax, Locator::SELECTOR_CSS)->getText(); - return $this->escapeCurrency($tax); + $tax = $this->_rootElement->find($this->tax, Locator::SELECTOR_CSS); + return $tax->isVisible() ? $this->escapeCurrency($tax->getText()) : null; } /** @@ -302,7 +321,6 @@ public function getShippingInclTax() */ public function getShippingExclTax() { - $this->waitForElementVisible($this->shippingExclTax); $subTotal = $this->_rootElement->find($this->shippingExclTax, Locator::SELECTOR_CSS); return $subTotal->isVisible() ? $this->escapeCurrency($subTotal->getText()) : null; } diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Payment/Methods.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Payment/Methods.php index 7cdc31001f7b2..1c43dd51baa55 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Payment/Methods.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Payment/Methods.php @@ -10,7 +10,6 @@ use Magento\Payment\Test\Fixture\CreditCard; /** - * Class Methods * One page checkout status payment method block * */ @@ -21,21 +20,21 @@ class Methods extends Form * * @var string */ - protected $paymentMethodInput = '#p_method_%s'; + protected $paymentMethodInput = '#%s'; /** * Labels for payment methods * * @var string */ - protected $paymentMethodLabels = '[for^=p_method_]'; + protected $paymentMethodLabels = '.payment-method:not([style="display: none;"]) .payment-method-title label'; /** * Label for payment methods * * @var string */ - protected $paymentMethodLabel = '[for=p_method_%s]'; + protected $paymentMethodLabel = '[for="%s"]'; /** * Continue checkout button @@ -44,6 +43,13 @@ class Methods extends Form */ protected $continue = '#payment-buttons-container button'; + /** + * Place order button + * + * @var string + */ + protected $placeOrder = '.action.primary.checkout'; + /** * Wait element * @@ -73,8 +79,8 @@ public function selectPaymentMethod(array $payment, CreditCard $creditCard = nul $paymentSelector->click(); } else { $paymentCount = count($this->_rootElement->getElements($this->paymentMethodLabels)); - $paymentSelector = $this->_rootElement->find(sprintf($this->paymentMethodLabel, $payment['method'])); - if ($paymentCount !== 1 && !$paymentSelector->isVisible()) { + $paymentLabel = $this->_rootElement->find(sprintf($this->paymentMethodLabel, $payment['method'])); + if ($paymentCount !== 1 && !$paymentLabel->isVisible()) { throw new \Exception('Such payment method is absent.'); } } @@ -108,4 +114,20 @@ function () use ($browser, $selector) { } ); } + + /* + * Press "Place Order" button + */ + public function placeOrder() + { + $this->_rootElement->find($this->placeOrder)->click(); + $browser = $this->browser; + $selector = $this->waitElement; + $browser->waitUntil( + function () use ($browser, $selector) { + $element = $browser->find($selector); + return $element->isVisible() == false ? true : null; + } + ); + } } diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Shipping.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Shipping.php index 796b272a9579b..acfed58bd8961 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Shipping.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Shipping.php @@ -6,13 +6,13 @@ namespace Magento\Checkout\Test\Block\Onepage; +use Magento\Customer\Test\Fixture\Address; use Magento\Mtf\Block\Form; use Magento\Mtf\Client\Locator; use Magento\Mtf\Client\Element\SimpleElement; use Magento\Checkout\Test\Fixture\Checkout; /** - * Class Shipping * One page checkout status shipping block * */ @@ -61,4 +61,15 @@ public function fillShipping(Checkout $fixture) $this->_rootElement->find($this->continue, Locator::SELECTOR_CSS)->click(); $this->waitForElementNotVisible($this->waitElement); } + + /** + * Fill shipping address + * + * @param Address $address + * @return void + */ + public function fillShippingAddress(Address $address) + { + $this->fill($address); + } } diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Shipping/Method.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Shipping/Method.php index 7943ce406d378..0b0f7abed4f67 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Shipping/Method.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Shipping/Method.php @@ -10,7 +10,6 @@ use Magento\Mtf\Client\Locator; /** - * Class Method * One page checkout status shipping method block * */ @@ -21,7 +20,7 @@ class Method extends Block * * @var string */ - protected $shippingMethod = '//dt[text()="%s"]/following-sibling::*//label/span[contains(text()[2], "%s")]'; + protected $shippingMethod = '//tr[//td[contains(text(),"%s")] and //td[contains(text(),"%s")]]//label'; /** * Continue checkout button diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php index 8ecdc5aa867ac..49957a1509f63 100755 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php @@ -117,6 +117,35 @@ public function fillVariations(array $matrix) } } + /** + * Fill form data. + * + * @param array $fields + * @param SimpleElement|null $element + * @return void + * @throws \Exception + */ + protected function _fill(array $fields, SimpleElement $element = null) + { + $context = ($element === null) ? $this->_rootElement : $element; + foreach ($fields as $name => $field) { + if (!isset($field['value'])) { + $this->_fill($field, $context); + } else { + $element = $this->getElement($context, $field); + if (!$element->isVisible()) { + continue; + } + + if (!$element->isDisabled()) { + $element->setValue($field['value']); + } else { + throw new \Exception("Unable to set value to field '$name' as it's disabled."); + } + } + } + } + /** * Assign product to variation matrix * diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/ConfigurableAttributesData.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/ConfigurableAttributesData.xml index bf2d9d0a85cdb..6c84fb72b0149 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/ConfigurableAttributesData.xml +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/ConfigurableAttributesData.xml @@ -333,6 +333,7 @@ + option_key_1_%isolation% 1 Yes No diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Address.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Address.xml index 3b5723bab0785..3ae80adf008dc 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Address.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/Address.xml @@ -199,7 +199,7 @@ 172, Westminster Bridge Rd SE1 7RW United Kingdom - London + London 444-44-444-44 584451913 Yes diff --git a/dev/tests/functional/tests/app/Magento/Dhl/Test/TestCase/OnePageCheckoutTest.xml b/dev/tests/functional/tests/app/Magento/Dhl/Test/TestCase/OnePageCheckoutTest.xml index 1d49ae31a34ba..fd74223e5fcee 100644 --- a/dev/tests/functional/tests/app/Magento/Dhl/Test/TestCase/OnePageCheckoutTest.xml +++ b/dev/tests/functional/tests/app/Magento/Dhl/Test/TestCase/OnePageCheckoutTest.xml @@ -12,7 +12,7 @@ catalogProductSimple::default, configurableProduct::default, bundleProduct::bundle_fixed_product login customer_DE - customer_DE + DE_address customer_DE DHL Express worldwide diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxCalculationAfterCheckoutDownloadable.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxCalculationAfterCheckoutDownloadable.php index 8d8542cb82c1b..64f61bec1f988 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxCalculationAfterCheckoutDownloadable.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxCalculationAfterCheckoutDownloadable.php @@ -9,6 +9,7 @@ use Magento\Checkout\Test\Page\CheckoutCart; use Magento\Checkout\Test\Page\CheckoutOnepage; use Magento\Checkout\Test\Page\CheckoutOnepageSuccess; +use Magento\Cms\Test\Page\CmsIndex; use Magento\Customer\Test\Fixture\Customer; use Magento\Sales\Test\Page\CustomerOrderView; use Magento\Mtf\Fixture\InjectableFixture; @@ -43,24 +44,24 @@ public function processAssert( CheckoutCart $checkoutCart, CheckoutOnepage $checkoutOnepage, CheckoutOnepageSuccess $checkoutOnepageSuccess, - CustomerOrderView $customerOrderView + CustomerOrderView $customerOrderView, + CmsIndex $cmsIndex ) { $this->checkoutOnepage = $checkoutOnepage; $this->customerOrderView = $customerOrderView; $checkoutCart->getProceedToCheckoutBlock()->proceedToCheckout(); - $checkoutOnepage->getBillingBlock()->clickContinue(); - $checkoutOnepage->getPaymentMethodsBlock()->selectPaymentMethod(['method' => 'check_money_order']); - $checkoutOnepage->getPaymentMethodsBlock()->clickContinue(); + $cmsIndex->getCmsPageBlock()->waitPageInit(); + $checkoutOnepage->getPaymentMethodsBlock()->selectPaymentMethod(['method' => 'checkmo']); $actualPrices = []; $actualPrices = $this->getReviewPrices($actualPrices, $product); $actualPrices = $this->getReviewTotals($actualPrices); $prices = $this->preparePrices($prices); //Order review prices verification $message = 'Prices on order review should be equal to defined in dataset.'; - \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + \PHPUnit_Framework_Assert::assertEquals($prices, array_filter($actualPrices), $message); - $checkoutOnepage->getReviewBlock()->placeOrder(); + $checkoutOnepage->getPaymentMethodsBlock()->placeOrder(); $checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId(); $checkoutOnepageSuccess->getSuccessBlock()->openOrder(); $actualPrices = []; @@ -69,6 +70,6 @@ public function processAssert( //Frontend order prices verification $message = 'Prices on order view page should be equal to defined in dataset.'; - \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + \PHPUnit_Framework_Assert::assertEquals($prices, array_filter($actualPrices), $message); } } diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPricesDownloadable.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPricesDownloadable.php index 95e825d05f18f..da720d51ec471 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPricesDownloadable.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPricesDownloadable.php @@ -69,6 +69,6 @@ public function processAssert( $actualPrices = $this->getTotals($actualPrices); //Prices verification $message = 'Prices from dataset should be equal to prices on frontend'; - \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + \PHPUnit_Framework_Assert::assertEquals($prices, array_filter($actualPrices), $message); } } diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableExcludingTax.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableExcludingTax.php index 4c1e9f6c06bde..875b353205259 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableExcludingTax.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableExcludingTax.php @@ -32,8 +32,9 @@ class AssertTaxRuleIsAppliedToAllPricesDownloadableExcludingTax extends public function getCategoryPrices(FixtureInterface $product, $actualPrices) { $priceBlock = $this->catalogCategoryView->getListProductBlock()->getProductItem($product)->getPriceBlock(); + $actualPrices['category_price'] = $priceBlock->getPrice(); $actualPrices['category_price_excl_tax'] = $priceBlock->getPriceExcludingTax(); - $actualPrices['category_price_incl_tax'] = null; + $actualPrices['category_price_incl_tax'] = $priceBlock->getPriceIncludingTax(); return $actualPrices; } @@ -46,9 +47,10 @@ public function getCategoryPrices(FixtureInterface $product, $actualPrices) */ public function getProductPagePrices($actualPrices) { - $viewBlock = $this->catalogProductView->getViewBlock(); - $actualPrices['product_view_price_excl_tax'] = $viewBlock->getPriceBlock()->getPriceExcludingTax(); - $actualPrices['product_view_price_incl_tax'] = null; + $priceBlock = $this->catalogProductView->getViewBlock()->getPriceBlock(); + $actualPrices['product_view_price'] = $priceBlock->getPrice(); + $actualPrices['product_view_price_excl_tax'] = $priceBlock->getPriceExcludingTax(); + $actualPrices['product_view_price_incl_tax'] = $priceBlock->getPriceIncludingTax(); return $actualPrices; } diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableIncludingTax.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableIncludingTax.php index 5818f5fcab0ad..9fc0f19375f80 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableIncludingTax.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableIncludingTax.php @@ -31,8 +31,11 @@ class AssertTaxRuleIsAppliedToAllPricesDownloadableIncludingTax extends public function getCategoryPrices(FixtureInterface $product, $actualPrices) { $priceBlock = $this->catalogCategoryView->getListProductBlock()->getProductItem($product)->getPriceBlock(); - $actualPrices['category_price_excl_tax'] = null; - $actualPrices['category_price_incl_tax'] = $priceBlock->getPriceIncludingTax(); + $actualPrices['category_price_excl_tax'] = $priceBlock->getPriceExcludingTax(); + $actualPrices['category_price_incl_tax'] = $priceBlock->getPrice(); + if (null === $actualPrices['category_price_incl_tax']) { + $actualPrices['category_price_incl_tax'] = $priceBlock->getPrice(); + } return $actualPrices; } @@ -45,9 +48,9 @@ public function getCategoryPrices(FixtureInterface $product, $actualPrices) */ public function getProductPagePrices($actualPrices) { - $viewBlock = $this->catalogProductView->getViewBlock(); - $actualPrices['product_view_price_excl_tax'] = null; - $actualPrices['product_view_price_incl_tax'] = $viewBlock->getPriceBlock()->getPriceIncludingTax(); + $priceBlock = $this->catalogProductView->getViewBlock()->getPriceBlock(); + $actualPrices['product_view_price_excl_tax'] = $priceBlock->getPriceExcludingTax(); + $actualPrices['product_view_price_incl_tax'] = $priceBlock->getPriceIncludingTax(); return $actualPrices; } diff --git a/dev/tests/functional/tests/app/Magento/Fedex/Test/TestCase/OnePageCheckoutTest.xml b/dev/tests/functional/tests/app/Magento/Fedex/Test/TestCase/OnePageCheckoutTest.xml index 1b1ae9cd9b52d..e64af11dd0208 100644 --- a/dev/tests/functional/tests/app/Magento/Fedex/Test/TestCase/OnePageCheckoutTest.xml +++ b/dev/tests/functional/tests/app/Magento/Fedex/Test/TestCase/OnePageCheckoutTest.xml @@ -28,7 +28,7 @@ catalogProductSimple::default, configurableProduct::default, bundleProduct::bundle_fixed_product login customer_DE - customer_DE + DE_address customer_DE Federal Express Ground diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create.php index a30bc92f6f7a9..5cc2532f1c544 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create.php @@ -36,8 +36,8 @@ public function fillGiftMessageForItems(array $products, GiftMessage $giftMessag 'Magento\GiftMessage\Test\Block\Adminhtml\Order\Create\Items', ['element' => $this->_rootElement->find($this->itemsBlock)] ); - foreach ($products as $key => $product) { - $giftMessageItem = $giftMessage->getItems()[$key]; + foreach ($giftMessage->getItems() as $key => $giftMessageItem) { + $product = $products[$key]; $items->getItemProduct($product)->fillGiftMessageForm($giftMessageItem); } } diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/GiftOptions.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/GiftOptions.php index dc4cd18309225..dcf34e5af99ac 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/GiftOptions.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/GiftOptions.php @@ -7,7 +7,6 @@ namespace Magento\GiftMessage\Test\Block\Adminhtml\Order\Create; /** - * Class GiftOptions * Backend GiftMessage for order form. */ class GiftOptions extends \Magento\Mtf\Block\Form diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/GiftOptions.xml b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/GiftOptions.xml index a55da0421665c..34ecc89c7da57 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/GiftOptions.xml +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Block/Adminhtml/Order/Create/GiftOptions.xml @@ -5,7 +5,7 @@ * See COPYING.txt for license details. */ --> - + [name$="[sender]"] diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInBackendOrder.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInBackendOrder.php index cdb42c767135d..7ebe75449ad20 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInBackendOrder.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInBackendOrder.php @@ -12,7 +12,6 @@ use Magento\Mtf\Constraint\AbstractAssertForm; /** - * Class AssertGiftMessageInBackendOrder * Assert that message from dataset is displayed on order(s) view page on backend. */ class AssertGiftMessageInBackendOrder extends AbstractAssertForm @@ -46,6 +45,8 @@ public function processAssert( array $products, $orderId ) { + $expectedData = []; + $actualData = []; $orderIndex->open()->getSalesOrderGrid()->searchAndOpen(['id' => $orderId]); if ($giftMessage->getAllowGiftMessagesForOrder()) { @@ -54,8 +55,9 @@ public function processAssert( } if ($giftMessage->getAllowGiftOptionsForItems()) { - foreach ($products as $key => $product) { - $expectedData[] = $giftMessage->getItems()[$key]->getData(); + foreach ($giftMessage->getItems() as $key => $giftMessageItem) { + $expectedData[] = $giftMessageItem->getData(); + $product = $products[$key]; $actualData[] = $salesOrderView->getGiftItemsBlock()->getItemProduct($product) ->getGiftMessageFormData($giftMessage); } diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrderItems.php b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrderItems.php index 56369b878a190..bb193414ea93a 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrderItems.php +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Constraint/AssertGiftMessageInFrontendOrderItems.php @@ -53,9 +53,9 @@ public function processAssert( $orderHistory->open(); $orderHistory->getOrderHistoryBlock()->openOrderById($orderId); - foreach ($products as $key => $product) { + foreach ($giftMessage->getItems() as $key => $itemGiftMessage) { + $product = $products[$key]; if ($giftMessage->hasData('items')) { - $itemGiftMessage = $giftMessage->getItems()[$key]; $expectedData = [ 'sender' => $itemGiftMessage->getSender(), 'recipient' => $itemGiftMessage->getRecipient(), diff --git a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Page/Adminhtml/OrderView.xml b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Page/Adminhtml/OrderView.xml index 4270f0d4106dc..6ea4afd10785d 100644 --- a/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Page/Adminhtml/OrderView.xml +++ b/dev/tests/functional/tests/app/Magento/GiftMessage/Test/Page/Adminhtml/OrderView.xml @@ -8,6 +8,6 @@ - + diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts.php index 618e06a639165..0b6e622cf8d03 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Grouped/AssociatedProducts.php @@ -7,48 +7,56 @@ namespace Magento\GroupedProduct\Test\Block\Adminhtml\Product\Grouped; use Magento\Backend\Test\Block\Widget\Tab; +use Magento\GroupedProduct\Test\Block\Adminhtml\Product\Grouped\AssociatedProducts\ListAssociatedProducts; +use Magento\GroupedProduct\Test\Block\Adminhtml\Product\Grouped\AssociatedProducts\Search\Grid; use Magento\Mtf\Client\Element\SimpleElement; use Magento\Mtf\Client\Element; use Magento\Mtf\Client\Locator; /** - * Class AssociatedProducts - * Grouped products tab + * Grouped products tab. */ class AssociatedProducts extends Tab { /** - * 'Create New Option' button + * 'Create New Option' button. * * @var string */ protected $addNewOption = '#grouped-product-container>button'; /** - * Associated products grid locator + * Associated products grid locator. * * @var string */ protected $productSearchGrid = './/*[@data-role="modal"][.//*[@data-role="add-product-dialog"]]'; /** - * Associated products list block + * Associated products list block. * * @var string */ protected $associatedProductsBlock = '[data-role=grouped-product-grid]'; /** - * Selector for delete button + * Selector for delete button. * * @var string */ protected $deleteButton = '[data-role="delete"]'; /** - * Get search grid + * Selector for loading mask element. * - * @return AssociatedProducts\Search\Grid + * @var string + */ + protected $loadingMask = '.loading-mask'; + + /** + * Get search grid. + * + * @return Grid */ protected function getSearchGridBlock() { @@ -59,9 +67,9 @@ protected function getSearchGridBlock() } /** - * Get associated products list block + * Get associated products list block. * - * @return AssociatedProducts\ListAssociatedProducts + * @return ListAssociatedProducts */ protected function getListAssociatedProductsBlock() { @@ -72,7 +80,7 @@ protected function getListAssociatedProductsBlock() } /** - * Fill data to fields on tab + * Fill data to fields on tab. * * @param array $fields * @param SimpleElement|null $element @@ -90,6 +98,7 @@ public function fillFormTab(array $fields, SimpleElement $element = null) foreach ($fields['associated']['value']['assigned_products'] as $key => $groupedProduct) { $element->find($this->addNewOption)->click(); $searchBlock = $this->getSearchGridBlock(); + $this->waitLoaderNotVisible(); $searchBlock->searchAndSelect(['name' => $groupedProduct['name']]); $searchBlock->addProducts(); $this->getListAssociatedProductsBlock()->fillProductOptions($groupedProduct, ($key + 1)); @@ -99,7 +108,7 @@ public function fillFormTab(array $fields, SimpleElement $element = null) } /** - * Get data to fields on group tab + * Get data to fields on group tab. * * @param array|null $fields * @param SimpleElement|null $element @@ -118,4 +127,21 @@ public function getDataFormTab($fields = null, SimpleElement $element = null) } return $newFields; } + + /** + * Wait until loader is not visible. + * + * return void + */ + protected function waitLoaderNotVisible() + { + $browser = $this->browser; + $selector = $this->loadingMask; + $browser->waitUntil( + function () use ($browser, $selector) { + $element = $browser->find($selector); + return $element->isVisible() === false ? true : null; + } + ); + } } diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesInvoiceReportEntityTest.xml b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesInvoiceReportEntityTest.xml index 09c07676cef83..66a1caf735b40 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesInvoiceReportEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesInvoiceReportEntityTest.xml @@ -9,7 +9,7 @@ default - full_invoice + full_invoice Order Created Year m/d/Y 12:00 a-2 days @@ -21,7 +21,7 @@ default - full_invoice + full_invoice Order Created Month m/d/Y @@ -33,7 +33,7 @@ default - full_invoice + full_invoice Last Invoice Created Date Day m/d/Y diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.xml b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.xml index b0d0b350efa71..849c0625dd6b2 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/ViewedProductsReportEntityTest.xml @@ -22,7 +22,7 @@ 1, 1 downloadableProduct::default, bundleProduct::bundle_dynamic_product Month - m/d/Y - 1 month + m/d/Y -1 month m/d/Y No diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/SalesOrderView.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/SalesOrderView.xml index bf4d778894b7b..f5259e343cebe 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/SalesOrderView.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/SalesOrderView.xml @@ -11,7 +11,7 @@ - + diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable/Price.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable/Price.xml index be490d7a33eb6..9f0c076288e87 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable/Price.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Repository/OrderInjectable/Price.xml @@ -13,25 +13,35 @@ - 565 - 565 + + 565 + 565 + - 210 - 110 + + 210 + 110 + - 565 + + 565 + - 555 + + 555 + - 110 + + 110 + diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertOrderTaxOnBackend.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertOrderTaxOnBackend.php index f5d516b6f6957..888ebcbc8af5b 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertOrderTaxOnBackend.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertOrderTaxOnBackend.php @@ -100,36 +100,35 @@ public function processAssert( $actualPrices = $this->getOrderTotals($actualPrices); $prices = $this->preparePrices($prices); $message = 'Prices on order view page should be equal to defined in dataset.'; - \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + \PHPUnit_Framework_Assert::assertEquals($prices, array_filter($actualPrices), $message); $salesOrderView->getPageActions()->invoice(); //Check prices on invoice creation page $actualPrices = []; $actualPrices = $this->getInvoiceNewPrices($actualPrices, $product); $actualPrices = $this->getInvoiceNewTotals($actualPrices); $message = 'Prices on invoice new page should be equal to defined in dataset.'; - \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + \PHPUnit_Framework_Assert::assertEquals($prices, array_filter($actualPrices), $message); $orderInvoiceNew->getTotalsBlock()->submit(); //Check prices after invoice on order page $actualPrices = []; $actualPrices = $this->getOrderPrices($actualPrices, $product); $actualPrices = $this->getOrderTotals($actualPrices); $message = 'Prices on invoice page should be equal to defined in dataset.'; - \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + \PHPUnit_Framework_Assert::assertEquals($prices, array_filter($actualPrices), $message); $salesOrderView->getPageActions()->orderCreditMemo(); //Check prices on credit memo creation page - $pricesCreditMemo = $this->preparePricesCreditMemo($prices); $actualPrices = []; $actualPrices = $this->getCreditMemoNewPrices($actualPrices, $product); $actualPrices = $this->getCreditMemoNewTotals($actualPrices); $message = 'Prices on credit memo new page should be equal to defined in dataset.'; - \PHPUnit_Framework_Assert::assertEquals($pricesCreditMemo, $actualPrices, $message); + \PHPUnit_Framework_Assert::assertEquals($prices, array_filter($actualPrices), $message); $orderCreditMemoNew->getFormBlock()->submit(); //Check prices after refund on order page $actualPrices = []; $actualPrices = $this->getOrderPrices($actualPrices, $product); $actualPrices = $this->getOrderTotals($actualPrices); $message = 'Prices on credit memo page should be equal to defined in dataset.'; - \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + \PHPUnit_Framework_Assert::assertEquals($prices, array_filter($actualPrices), $message); } /** @@ -155,19 +154,6 @@ protected function preparePrices($prices) return $prices; } - /** - * Unset category and product page expected prices. - * - * @param array $prices - * @return array - */ - protected function preparePricesCreditMemo($prices) - { - $prices['shipping_excl_tax'] = null; - $prices['shipping_incl_tax'] = null; - return $prices; - } - /** * Get order product prices. * diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php index 4661c262f9cce..20c9c01a843ba 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php @@ -6,6 +6,7 @@ namespace Magento\Tax\Test\Constraint; +use Magento\Cms\Test\Page\CmsIndex; use Magento\Mtf\Constraint\AbstractConstraint; use Magento\Checkout\Test\Page\CheckoutCart; use Magento\Checkout\Test\Page\CheckoutOnepage; @@ -65,6 +66,7 @@ abstract protected function getOrderTotals($actualPrices); * @param CheckoutOnepage $checkoutOnepage * @param CheckoutOnepageSuccess $checkoutOnepageSuccess * @param CustomerOrderView $customerOrderView + * @param CmsIndex $cmsIndex * @return void */ public function processAssert( @@ -73,27 +75,32 @@ public function processAssert( CheckoutCart $checkoutCart, CheckoutOnepage $checkoutOnepage, CheckoutOnepageSuccess $checkoutOnepageSuccess, - CustomerOrderView $customerOrderView + CustomerOrderView $customerOrderView, + CmsIndex $cmsIndex ) { $this->checkoutOnepage = $checkoutOnepage; $this->customerOrderView = $customerOrderView; $checkoutCart->getProceedToCheckoutBlock()->proceedToCheckout(); - $checkoutOnepage->getBillingBlock()->clickContinue(); + $cmsIndex->getCmsPageBlock()->waitPageInit(); + $shippingMethod = ['shipping_service' => 'Flat Rate', 'shipping_method' => 'Fixed']; $checkoutOnepage->getShippingMethodBlock()->selectShippingMethod($shippingMethod); $checkoutOnepage->getShippingMethodBlock()->clickContinue(); - $checkoutOnepage->getPaymentMethodsBlock()->selectPaymentMethod(['method' => 'check_money_order']); - $checkoutOnepage->getPaymentMethodsBlock()->clickContinue(); + $checkoutOnepage->getPaymentMethodsBlock()->selectPaymentMethod(['method' => 'checkmo']); $actualPrices = []; $actualPrices = $this->getReviewPrices($actualPrices, $product); $actualPrices = $this->getReviewTotals($actualPrices); $prices = $this->preparePrices($prices); //Order review prices verification $message = 'Prices on order review should be equal to defined in dataset.'; - \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message); + \PHPUnit_Framework_Assert::assertEquals( + array_diff_key($prices, ['cart_item_price_excl_tax' => null, 'cart_item_price_incl_tax' => null]), + $actualPrices, + $message + ); - $checkoutOnepage->getReviewBlock()->placeOrder(); + $checkoutOnepage->getPaymentMethodsBlock()->placeOrder(); $checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId(); $checkoutOnepageSuccess->getSuccessBlock()->openOrder(); $actualPrices = []; @@ -113,18 +120,26 @@ public function processAssert( */ protected function preparePrices($prices) { + if (isset($prices['category_price'])) { + unset($prices['category_price']); + } if (isset($prices['category_price_excl_tax'])) { unset($prices['category_price_excl_tax']); } if (isset($prices['category_price_incl_tax'])) { unset($prices['category_price_incl_tax']); } + + if (isset($prices['product_view_price'])) { + unset($prices['product_view_price']); + } if (isset($prices['product_view_price_excl_tax'])) { unset($prices['product_view_price_excl_tax']); } if (isset($prices['product_view_price_incl_tax'])) { unset($prices['product_view_price_incl_tax']); } + return $prices; } diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPrices.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPrices.php index a50ef0ea37dee..5620cefee21a4 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPrices.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPrices.php @@ -154,11 +154,11 @@ public function getCartPrices(InjectableFixture $product, $actualPrices) { $this->checkoutCart->open(); $actualPrices['cart_item_price_excl_tax'] = - $this->checkoutCart->getCartBlock()->getCartItem($product)->getPrice(); + $this->checkoutCart->getCartBlock()->getCartItem($product)->getPriceExclTax(); $actualPrices['cart_item_price_incl_tax'] = $this->checkoutCart->getCartBlock()->getCartItem($product)->getPriceInclTax(); $actualPrices['cart_item_subtotal_excl_tax'] = - $this->checkoutCart->getCartBlock()->getCartItem($product)->getSubtotalPrice(); + $this->checkoutCart->getCartBlock()->getCartItem($product)->getSubtotalPriceExclTax(); $actualPrices['cart_item_subtotal_incl_tax'] = $this->checkoutCart->getCartBlock()->getCartItem($product)->getSubtotalPriceInclTax(); diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxCalculationAfterCheckoutExcludingIncludingTax.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxCalculationAfterCheckoutExcludingIncludingTax.php index 57e9269dd9b79..b25d8698d16ee 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxCalculationAfterCheckoutExcludingIncludingTax.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxCalculationAfterCheckoutExcludingIncludingTax.php @@ -48,7 +48,7 @@ public function getReviewTotals($actualPrices) */ public function getOrderTotals($actualPrices) { - $viewBlock = $this->salesOrderView->getSalesOrderViewBlock(); + $viewBlock = $this->customerOrderView->getOrderViewBlock(); $actualPrices['subtotal_excl_tax'] = $viewBlock->getSubtotalExclTax(); $actualPrices['subtotal_incl_tax'] = $viewBlock->getSubtotalInclTax(); $actualPrices['discount'] = $viewBlock->getDiscount(); diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/ConfigData.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/ConfigData.xml index e8cd16287bce0..31757f3a6c34b 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/ConfigData.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/ConfigData.xml @@ -557,14 +557,14 @@ tax 1 - Excluding Tax + Including Tax 0 tax 1 - After Discount - 1 + Before Discount + 0 tax From 9e5b44ecdb68f14f6be3b52c57193f816d60a4e9 Mon Sep 17 00:00:00 2001 From: Oleksandr Manchenko Date: Fri, 10 Jul 2015 14:40:48 +0300 Subject: [PATCH 6/8] MTA-2343: Move all test data to repositories --- dev/tests/functional/composer.json | 2 +- .../Test/TestCase/OnePageCheckoutTest.xml | 6 +-- .../BundleProduct/BundleSelections.xml | 2 +- .../Test/Block/Cart/AbstractCartItem.php | 22 ++++----- .../Checkout/Test/Block/Cart/CartItem.php | 2 +- .../Test/Block/Onepage/AbstractReview.php | 2 +- .../Checkout/Test/Block/Onepage/Payment.php | 4 +- .../ConfigurableProduct/CheckoutData.xml | 4 +- ...axCalculationAfterCheckoutDownloadable.php | 4 +- ...axRuleIsAppliedToAllPricesDownloadable.php | 3 +- ...iedToAllPricesDownloadableIncludingTax.php | 7 ++- .../Test/TestCase/OnePageCheckoutTest.xml | 2 +- .../CustomersOrderCountReportEntityTest.php | 6 +-- .../OrderedProductsReportEntityTest.php | 6 +-- .../TestCase/SalesInvoiceReportEntityTest.php | 2 +- .../TestCase/SalesOrderReportEntityTest.php | 6 +-- .../TestCase/SalesRefundsReportEntityTest.php | 6 +-- .../Sales/Test/Block/Adminhtml/Order/Grid.php | 4 +- .../Sales/Test/Page/Adminhtml/OrderIndex.xml | 10 ++-- .../Test/TestCase/CreateOrderBackendTest.xml | 2 +- .../AbstractAssertOrderTaxOnBackend.php | 2 + ...tractAssertTaxCalculationAfterCheckout.php | 6 +++ ...sertUserFailedLoginByPermissionMessage.php | 49 +++++++++++++++++++ .../AssertUserFailedLoginMessage.php | 2 +- .../TestCase/CreateAdminUserEntityTest.php | 13 +++-- .../TestCase/CreateAdminUserEntityTest.xml | 2 +- .../Magento/Weee/Test/Block/Product/Price.php | 2 +- .../Test/TestCase/CreateTaxWithFptTest.php | 10 ++-- 28 files changed, 123 insertions(+), 65 deletions(-) create mode 100644 dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserFailedLoginByPermissionMessage.php diff --git a/dev/tests/functional/composer.json b/dev/tests/functional/composer.json index ca4b3bc7f79e4..73c97a8815878 100644 --- a/dev/tests/functional/composer.json +++ b/dev/tests/functional/composer.json @@ -1,6 +1,6 @@ { "require": { - "magento/mtf": "1.0.0-rc27", + "magento/mtf": "1.0.0-rc28", "php": "~5.5.0|~5.6.0", "phpunit/phpunit": "4.1.0", "phpunit/phpunit-selenium": ">=1.2", diff --git a/dev/tests/functional/tests/app/Magento/Authorizenet/Test/TestCase/OnePageCheckoutTest.xml b/dev/tests/functional/tests/app/Magento/Authorizenet/Test/TestCase/OnePageCheckoutTest.xml index 7adf887baa967..03cebd5af2798 100644 --- a/dev/tests/functional/tests/app/Magento/Authorizenet/Test/TestCase/OnePageCheckoutTest.xml +++ b/dev/tests/functional/tests/app/Magento/Authorizenet/Test/TestCase/OnePageCheckoutTest.xml @@ -11,8 +11,8 @@ MAGETWO-12832 - Check Out as a Guest with Authorize.Net and Offline Shipping method catalogProductSimple::product_10_dollar, configurableProduct::with_one_option, bundleProduct::bundle_fixed_100_dollar_product us_ca_ny_rule - default - US_address_1 + default + US_address_1 guest Flat Rate Fixed @@ -20,7 +20,7 @@ 156.81 authorizenet - visa_default + visa_default authorizenet test_type:3rd_party_test diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/BundleSelections.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/BundleSelections.xml index e8f80bc5a55b4..5b63670819332 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/BundleSelections.xml +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct/BundleSelections.xml @@ -433,7 +433,7 @@ Radio Button Option Radio Buttons - Yes + No diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php index 389fa52d3b506..9e5cd000b1aa4 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php @@ -9,75 +9,75 @@ use Magento\Mtf\Block\Block; /** - * Base product item block on checkout page + * Base product item block on checkout page. */ class AbstractCartItem extends Block { /** - * Selector for product name + * Selector for product name. * * @var string */ protected $productName = '.product-item-name > a'; /** - * Selector for unit price + * Selector for unit price. * * @var string */ protected $price = './/td[@class="col price"]//span[@class="price"]'; /** - * Selector for unit price including tax + * Selector for unit price including tax. * * @var string */ protected $priceInclTax = './/td[@class="col price"]/*[@class="price-including-tax"]/span'; /** - * Selector for unit price excluding tax + * Selector for unit price excluding tax. * * @var string */ protected $priceExclTax = './/td[@class="col price"]/*[@class="price-excluding-tax"]/span'; /** - * Quantity input selector + * Quantity input selector. * * @var string */ protected $qty = './/input[@data-role="cart-item-qty"]'; /** - * Cart item sub-total xpath selector + * Cart item sub-total xpath selector. * * @var string */ protected $subtotalPrice = '.col.subtotal .price'; /** - * Cart item sub-total excluding tax xpath selector + * Cart item sub-total excluding tax xpath selector. * * @var string */ protected $subTotalPriceExclTax = '.col.subtotal .price-excluding-tax .price'; /** - * Cart item sub-total including tax xpath selector + * Cart item sub-total including tax xpath selector. * * @var string */ protected $subTotalPriceInclTax = '.col.subtotal .price-including-tax .price'; /** - * Selector for options block + * Selector for options block. * * @var string */ protected $optionsBlock = './/dl[contains(@class, "item-options")]'; /** - * Escape currency in price + * Escape currency in price. * * @param string $price * @return string|null diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php index cbca12b823944..0d6181f26ec84 100755 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php @@ -40,7 +40,7 @@ class CartItem extends AbstractCartItem * * @var string */ - protected $wishlistButton = '.towishlist'; + protected $wishlistButton = '.action-towishlist'; /** * Quantity input selector diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/AbstractReview.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/AbstractReview.php index f714d1051acaf..e25da69fdefb6 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/AbstractReview.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/AbstractReview.php @@ -244,7 +244,7 @@ public function getGrandTotalInclTax() /** * Get Tax text from Order Totals. * - * @return array|string + * @return string|null */ public function getTax() { diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Payment.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Payment.php index 8e04facbc5247..8ac7389621c01 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Payment.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Payment.php @@ -50,7 +50,7 @@ class Payment extends Block protected $placeOrder = '.action.primary.checkout'; /** - * Wait element + * Wait element. * * @var string */ @@ -120,6 +120,8 @@ public function getSelectedPaymentMethodBlock() /* * Press "Place Order" button. + * + * @return void */ public function placeOrder() { diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/CheckoutData.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/CheckoutData.xml index 87f372d1d1c91..350ae10b384d1 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/CheckoutData.xml +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProduct/CheckoutData.xml @@ -33,11 +33,11 @@ attribute_key_0 - option_key_0 + option_key_1 attribute_key_1 - option_key_1 + option_key_0 diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxCalculationAfterCheckoutDownloadable.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxCalculationAfterCheckoutDownloadable.php index 64f61bec1f988..2621befd5c8d1 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxCalculationAfterCheckoutDownloadable.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxCalculationAfterCheckoutDownloadable.php @@ -52,7 +52,7 @@ public function processAssert( $checkoutCart->getProceedToCheckoutBlock()->proceedToCheckout(); $cmsIndex->getCmsPageBlock()->waitPageInit(); - $checkoutOnepage->getPaymentMethodsBlock()->selectPaymentMethod(['method' => 'checkmo']); + $checkoutOnepage->getPaymentBlock()->selectPaymentMethod(['method' => 'checkmo']); $actualPrices = []; $actualPrices = $this->getReviewPrices($actualPrices, $product); $actualPrices = $this->getReviewTotals($actualPrices); @@ -61,7 +61,7 @@ public function processAssert( $message = 'Prices on order review should be equal to defined in dataset.'; \PHPUnit_Framework_Assert::assertEquals($prices, array_filter($actualPrices), $message); - $checkoutOnepage->getPaymentMethodsBlock()->placeOrder(); + $checkoutOnepage->getPaymentBlock()->placeOrder(); $checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId(); $checkoutOnepageSuccess->getSuccessBlock()->openOrder(); $actualPrices = []; diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPricesDownloadable.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPricesDownloadable.php index da720d51ec471..20dd5579d0e28 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPricesDownloadable.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AbstractAssertTaxRuleIsAppliedToAllPricesDownloadable.php @@ -55,8 +55,9 @@ public function processAssert( $this->catalogCategoryView = $catalogCategoryView; $this->catalogProductView = $catalogProductView; $this->checkoutCart = $checkoutCart; - $actualPrices = []; + //Assertion steps + $actualPrices = []; $productCategory = $product->getCategoryIds()[0]; $this->openCategory($productCategory); $actualPrices = $this->getCategoryPrices($product, $actualPrices); diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableIncludingTax.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableIncludingTax.php index 9fc0f19375f80..398fcd7c86bc2 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableIncludingTax.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertTaxRuleIsAppliedToAllPricesDownloadableIncludingTax.php @@ -31,11 +31,9 @@ class AssertTaxRuleIsAppliedToAllPricesDownloadableIncludingTax extends public function getCategoryPrices(FixtureInterface $product, $actualPrices) { $priceBlock = $this->catalogCategoryView->getListProductBlock()->getProductItem($product)->getPriceBlock(); + $actualPrices['category_special_price'] = $priceBlock->getSpecialPrice(); $actualPrices['category_price_excl_tax'] = $priceBlock->getPriceExcludingTax(); - $actualPrices['category_price_incl_tax'] = $priceBlock->getPrice(); - if (null === $actualPrices['category_price_incl_tax']) { - $actualPrices['category_price_incl_tax'] = $priceBlock->getPrice(); - } + $actualPrices['category_price_incl_tax'] = $priceBlock->getPriceIncludingTax(); return $actualPrices; } @@ -49,6 +47,7 @@ public function getCategoryPrices(FixtureInterface $product, $actualPrices) public function getProductPagePrices($actualPrices) { $priceBlock = $this->catalogProductView->getViewBlock()->getPriceBlock(); + $actualPrices['product_view_special_price'] = $priceBlock->getSpecialPrice(); $actualPrices['product_view_price_excl_tax'] = $priceBlock->getPriceExcludingTax(); $actualPrices['product_view_price_incl_tax'] = $priceBlock->getPriceIncludingTax(); diff --git a/dev/tests/functional/tests/app/Magento/Fedex/Test/TestCase/OnePageCheckoutTest.xml b/dev/tests/functional/tests/app/Magento/Fedex/Test/TestCase/OnePageCheckoutTest.xml index e64af11dd0208..28075acb0a4cb 100644 --- a/dev/tests/functional/tests/app/Magento/Fedex/Test/TestCase/OnePageCheckoutTest.xml +++ b/dev/tests/functional/tests/app/Magento/Fedex/Test/TestCase/OnePageCheckoutTest.xml @@ -18,7 +18,7 @@ International Economy International Economy checkmo - checkmo, fedex, shipping_origin_US_CA + checkmo, fedex, shipping_origin_US_CA diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomersOrderCountReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomersOrderCountReportEntityTest.php index 57954d5488f0f..ddd49e71ae356 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomersOrderCountReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/CustomersOrderCountReportEntityTest.php @@ -35,14 +35,14 @@ class CustomersOrderCountReportEntityTest extends Injectable /* end tags */ /** - * Order count report page + * Order count report page. * * @var CustomerOrdersReport */ protected $customerOrdersReport; /** - * Inject page + * Inject page. * * @param CustomerOrdersReport $customerOrdersReport * @return void @@ -53,7 +53,7 @@ public function __inject(CustomerOrdersReport $customerOrdersReport) } /** - * Order count report view + * Order count report view. * * @param Customer $customer * @param string $orders diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/OrderedProductsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/OrderedProductsReportEntityTest.php index 6bc2dea1d6ef4..0882f100bba3b 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/OrderedProductsReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/OrderedProductsReportEntityTest.php @@ -32,14 +32,14 @@ class OrderedProductsReportEntityTest extends Injectable /* end tags */ /** - * Ordered Products Report + * Ordered Products Report. * * @var OrderedProductsReport */ protected $orderedProducts; /** - * Inject pages + * Inject pages. * * @param OrderedProductsReport $orderedProducts * @return void @@ -50,7 +50,7 @@ public function __inject(OrderedProductsReport $orderedProducts) } /** - * Search order products report + * Search order products report. * * @param OrderInjectable $order * @param array $customersReport diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesInvoiceReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesInvoiceReportEntityTest.php index d2c92d5a602d7..895f48a9ecac2 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesInvoiceReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesInvoiceReportEntityTest.php @@ -41,7 +41,7 @@ class SalesInvoiceReportEntityTest extends Injectable /* end tags */ /** - * Sales invoice report + * Sales invoice report. * * @param SalesInvoiceReport $salesInvoiceReport * @param OrderInjectable $order diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesOrderReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesOrderReportEntityTest.php index a34c6b8bb3f20..ec395cc8e3fd6 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesOrderReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesOrderReportEntityTest.php @@ -41,14 +41,14 @@ class SalesOrderReportEntityTest extends Injectable /* end tags */ /** - * Sales Report page + * Sales Report page. * * @var SalesReport */ protected $salesReport; /** - * Inject page + * Inject page. * * @param SalesReport $salesReport * @return void @@ -59,7 +59,7 @@ public function __inject(SalesReport $salesReport) } /** - * Sales order report + * Sales order report. * * @param OrderInjectable $order * @param array $salesReport diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesRefundsReportEntityTest.php b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesRefundsReportEntityTest.php index 150bcf6ea6090..f174f4243cd5f 100644 --- a/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesRefundsReportEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/SalesRefundsReportEntityTest.php @@ -40,14 +40,14 @@ class SalesRefundsReportEntityTest extends Injectable /* end tags */ /** - * Refunds report page + * Refunds report page. * * @var RefundsReport */ protected $refundsReport; /** - * Inject pages + * Inject pages. * * @param RefundsReport $refundsReport * @return void @@ -58,7 +58,7 @@ public function __inject(RefundsReport $refundsReport) } /** - * Refunds report + * Refunds report. * * @param OrderInjectable $order * @param array $refundsReport diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Grid.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Grid.php index ec2f37205a20d..4c453a9ed19c9 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Grid.php @@ -81,10 +81,12 @@ class Grid extends DataGrid * * @var string */ - protected $firstRowSelector = '//tbody/tr[1]//a'; + protected $firstRowSelector = '//tbody/tr[1]/td[@data-action="grid-row-edit"]'; /** * Start to create new order. + * + * @return void */ public function addNewOrder() { diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/OrderIndex.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/OrderIndex.xml index ad56dea2c043b..ca26062f43e66 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/OrderIndex.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Page/Adminhtml/OrderIndex.xml @@ -6,9 +6,9 @@ */ --> - - - - - + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.xml index 6db8d93ed10df..1946b737114b2 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateOrderBackendTest.xml @@ -136,7 +136,7 @@ default Yes register - US_address_1_without_email + US_address_1_without_email Flat Rate Fixed diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertOrderTaxOnBackend.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertOrderTaxOnBackend.php index 888ebcbc8af5b..1c93dc11aeee2 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertOrderTaxOnBackend.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertOrderTaxOnBackend.php @@ -140,8 +140,10 @@ public function processAssert( protected function preparePrices($prices) { $deletePrices = [ + 'category_special_price', 'category_price_excl_tax', 'category_price_incl_tax', + 'product_view_special_price', 'product_view_price_excl_tax', 'product_view_price_incl_tax' ]; diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php index 20c9c01a843ba..dd2c771589a36 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php @@ -123,6 +123,9 @@ protected function preparePrices($prices) if (isset($prices['category_price'])) { unset($prices['category_price']); } + if (isset($prices['category_special_price'])) { + unset($prices['category_special_price']); + } if (isset($prices['category_price_excl_tax'])) { unset($prices['category_price_excl_tax']); } @@ -133,6 +136,9 @@ protected function preparePrices($prices) if (isset($prices['product_view_price'])) { unset($prices['product_view_price']); } + if (isset($prices['product_view_special_price'])) { + unset($prices['product_view_special_price']); + } if (isset($prices['product_view_price_excl_tax'])) { unset($prices['product_view_price_excl_tax']); } diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserFailedLoginByPermissionMessage.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserFailedLoginByPermissionMessage.php new file mode 100644 index 0000000000000..db943e911a3d0 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserFailedLoginByPermissionMessage.php @@ -0,0 +1,49 @@ +open(); + $adminAuth->getLoginBlock()->fill($customAdmin); + $adminAuth->getLoginBlock()->submit(); + + \PHPUnit_Framework_Assert::assertEquals( + self::FAILED_LOGIN_MESSAGE, + $adminAuth->getMessagesBlock()->getErrorMessages(), + 'Message "' . self::FAILED_LOGIN_MESSAGE . '" is not visible.' + ); + } + + /** + * Returns error message equals expected message. + * + * @return string + */ + public function toString() + { + return 'Invalid credentials message was displayed.'; + } +} diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserFailedLoginMessage.php b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserFailedLoginMessage.php index e01aa9a9cd0cd..1f55c18690f74 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserFailedLoginMessage.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Constraint/AssertUserFailedLoginMessage.php @@ -15,7 +15,7 @@ */ class AssertUserFailedLoginMessage extends AbstractConstraint { - const FAILED_LOGIN_MESSAGE = 'You did not sign in correctly or your account is temporarily disabled.'; + const FAILED_LOGIN_MESSAGE = 'This account is inactive.'; /** * Verify incorrect credentials message while login to admin diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.php b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.php index c77bc0c762a3d..487ff415aab3f 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.php @@ -63,7 +63,7 @@ class CreateAdminUserEntityTest extends Injectable public function __prepare(FixtureFactory $fixtureFactory) { $this->fixtureFactory = $fixtureFactory; - $adminUser = $fixtureFactory->createByCode('user'); + $adminUser = $fixtureFactory->createByCode('user', ['dataset' => 'custom_admin']); $adminUser->persist(); return ['adminUser' => $adminUser]; @@ -88,13 +88,10 @@ public function __inject( * @param User $user * @param User $adminUser * @param string $isDuplicated - * @return void + * @return array */ - public function test( - User $user, - User $adminUser, - $isDuplicated - ) { + public function test(User $user, User $adminUser, $isDuplicated) + { // Prepare data if ($isDuplicated != '-') { $data = $user->getData(); @@ -108,5 +105,7 @@ public function test( $this->userIndexPage->getPageActions()->addNew(); $this->userEditPage->getUserForm()->fill($user); $this->userEditPage->getPageActions()->save(); + + return ['customAdmin' => $user]; } } diff --git a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.xml b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.xml index eae1d1df29749..127e2d122a32b 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/TestCase/CreateAdminUserEntityTest.xml @@ -76,7 +76,7 @@ - + AdminUser%isolation% diff --git a/dev/tests/functional/tests/app/Magento/Weee/Test/Block/Product/Price.php b/dev/tests/functional/tests/app/Magento/Weee/Test/Block/Product/Price.php index 0551b792554d4..2bfd68bcdd2e9 100644 --- a/dev/tests/functional/tests/app/Magento/Weee/Test/Block/Product/Price.php +++ b/dev/tests/functional/tests/app/Magento/Weee/Test/Block/Product/Price.php @@ -18,7 +18,7 @@ class Price extends \Magento\Catalog\Test\Block\AbstractPriceBlock */ protected $mapTypePrices = [ 'regular_price' => [ - 'selector' => '[data-price-type="finalPrice"] .price' + 'selector' => '.price-final_price .price' ], 'fpt_price' => [ 'selector' => '[data-price-type="weee"] .price', diff --git a/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.php b/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.php index a9cc3ab7a2638..1bdedf647cb0b 100644 --- a/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.php +++ b/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.php @@ -64,15 +64,11 @@ class CreateTaxWithFptTest extends Injectable * @param FixtureFactory $fixtureFactory * @return array */ - public function __prepare( - FixtureFactory $fixtureFactory - ) { - $this->markTestIncomplete("Epic: MAGETWO-30073. FPC issue."); + public function __prepare(FixtureFactory $fixtureFactory) + { $this->fixtureFactory = $fixtureFactory; $customer = $fixtureFactory->createByCode('customer', ['dataset' => 'johndoe_with_addresses']); $customer->persist(); - $taxRule = $fixtureFactory->createByCode('taxRule', ['dataset' => 'tax_rule_default']); - $taxRule->persist(); $productTemplate = $this->fixtureFactory ->createByCode('catalogAttributeSet', ['dataset' => 'custom_attribute_set_with_fpt']); $productTemplate->persist(); @@ -111,6 +107,7 @@ public function test( Customer $customer, CatalogAttributeSet $productTemplate ) { + $this->fixtureFactory->createByCode('taxRule', ['dataset' => 'tax_rule_default'])->persist(); $product = $this->fixtureFactory->createByCode( 'catalogProductSimple', ['dataset' => $productData, 'data' => ['attribute_set_id' => ['attribute_set' => $productTemplate]]] @@ -121,6 +118,7 @@ public function test( ['configData' => $configData] )->run(); $this->loginCustomer($customer); + return ['product' => $product]; } From 3954db4afd0defa46388f423cfd2bcf2776e515d Mon Sep 17 00:00:00 2001 From: Oleksandr Manchenko Date: Fri, 10 Jul 2015 15:32:40 +0300 Subject: [PATCH 7/8] MTA-2343: Move all test data to repositories - Fixed order grid --- .../Sales/Test/Block/Adminhtml/Order/Grid.php | 2 +- ...tractAssertTaxCalculationAfterCheckout.php | 40 ++++++------------- 2 files changed, 14 insertions(+), 28 deletions(-) diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Grid.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Grid.php index 4c453a9ed19c9..8edbfb720f709 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Grid.php @@ -81,7 +81,7 @@ class Grid extends DataGrid * * @var string */ - protected $firstRowSelector = '//tbody/tr[1]/td[@data-action="grid-row-edit"]'; + protected $firstRowSelector = '//tbody/tr[1]/td[contains(@class,"data-grid-actions-cell")]/a'; /** * Start to create new order. diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php index dd2c771589a36..1065760f36e4a 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php @@ -120,33 +120,19 @@ public function processAssert( */ protected function preparePrices($prices) { - if (isset($prices['category_price'])) { - unset($prices['category_price']); - } - if (isset($prices['category_special_price'])) { - unset($prices['category_special_price']); - } - if (isset($prices['category_price_excl_tax'])) { - unset($prices['category_price_excl_tax']); - } - if (isset($prices['category_price_incl_tax'])) { - unset($prices['category_price_incl_tax']); - } - - if (isset($prices['product_view_price'])) { - unset($prices['product_view_price']); - } - if (isset($prices['product_view_special_price'])) { - unset($prices['product_view_special_price']); - } - if (isset($prices['product_view_price_excl_tax'])) { - unset($prices['product_view_price_excl_tax']); - } - if (isset($prices['product_view_price_incl_tax'])) { - unset($prices['product_view_price_incl_tax']); - } - - return $prices; + return array_diff_key( + $prices, + array_flip([ + 'category_price', + 'category_special_price', + 'category_price_excl_tax', + 'category_price_incl_tax', + 'product_view_price', + 'product_view_special_price', + 'product_view_price_excl_tax', + 'product_view_price_incl_tax' + ]) + ); } /** From c21586036e7892841e872b9ff1e19ac09ab9e173 Mon Sep 17 00:00:00 2001 From: Oleksandr Manchenko Date: Fri, 10 Jul 2015 15:52:06 +0300 Subject: [PATCH 8/8] MTA-2343: Move all test data to repositories - Fixed code style errors --- .../TestCase/ExpressCheckoutFromProductPageTest.xml | 2 +- .../Test/TestCase/ExpressCheckoutOnePageTest.xml | 12 ++++++------ .../AbstractAssertTaxCalculationAfterCheckout.php | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutFromProductPageTest.xml b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutFromProductPageTest.xml index c72134191de2d..2d459bcd61e1b 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutFromProductPageTest.xml +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutFromProductPageTest.xml @@ -11,7 +11,7 @@ MAGETWO-12415 - Check Out as a Guest using "Checkout with PayPal" button from Product Page and Free Shipping catalogProductSimple::simple_10_dollar us_ca_ny_rule - sandbox_us_default + sandbox_us_default guest Free diff --git a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutOnePageTest.xml b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutOnePageTest.xml index 277ad9f6bf420..e11142c9fc520 100644 --- a/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutOnePageTest.xml +++ b/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/ExpressCheckoutOnePageTest.xml @@ -11,8 +11,8 @@ MAGETWO-12413 - Check Out as a Guest Using PayPal Express Checkout Method and Offline Shipping Method catalogProductSimple::simple_10_dollar, configurableProduct::with_one_option, bundleProduct::fixed_100_dollar_with_required_options us_ca_ny_rule - sandbox_us_default - default + sandbox_us_default + default guest Fixed @@ -38,8 +38,8 @@ MAGETWO-14359 - Check Out as a Guest using Payflow Link - PayPal Express Checkout Payflow Edition and Offline Shipping catalogProductSimple::simple_10_dollar, configurableProduct::with_one_option, bundleProduct::fixed_100_dollar_with_required_options us_ca_ny_rule - sandbox_us_default - default + sandbox_us_default + default guest Fixed @@ -66,8 +66,8 @@ MAGETWO-12996 - Check Out as Guest User using PayPal Express and Offline Shipping Method catalogProductSimple::simple_10_dollar, configurableProduct::with_one_option, bundleProduct::fixed_100_dollar_with_required_options us_ca_ny_rule - sandbox_us_default - default + sandbox_us_default + default guest Fixed diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php index 1065760f36e4a..3f3fe4e112b6b 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxCalculationAfterCheckout.php @@ -116,7 +116,7 @@ public function processAssert( * Prepare expected prices prices. * * @param array $prices - * @return array $prices + * @return array */ protected function preparePrices($prices) {