-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4793 from magento-epam/EPAM-PR-73
- Fixed [FT] Not pass functional test \Magento\Catalog\Test\TestCase\Product\ProductTypeSwitchingOnUpdateTest - Fixed [GITHUB] Inconsistent CSV file Import error: #7495 - Fixed Incorrect behavior in the category menu on the Storefront
- Loading branch information
Showing
14 changed files
with
692 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
app/code/Magento/Catalog/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminVirtualProductTypeSwitchingToDownloadableProductTest"> | ||
<annotations> | ||
<features value="Catalog"/> | ||
<stories value="Product type switching"/> | ||
<title value="Virtual product type switching on editing to Downloadable product"/> | ||
<description value="Virtual product type switching on editing to Downloadable product"/> | ||
<testCaseId value="MC-17954"/> | ||
<useCaseId value="MAGETWO-44170"/> | ||
<severity value="MAJOR"/> | ||
<group value="catalog"/> | ||
</annotations> | ||
<before> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
<!--Create product--> | ||
<comment userInput="Create product" stepKey="commentCreateProduct"/> | ||
<createData entity="VirtualProduct" stepKey="createProduct"/> | ||
</before> | ||
<after> | ||
<!--Delete product--> | ||
<comment userInput="Delete product" stepKey="commentDeleteProduct"/> | ||
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/> | ||
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductFilters"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
<!--Change product type to Downloadable--> | ||
<comment userInput="Change product type to Downloadable" stepKey="commentCreateDownloadable"/> | ||
<amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="gotToDownloadableProductPage"/> | ||
<waitForPageLoad stepKey="waitForDownloadableProductPageLoad"/> | ||
<actionGroup ref="AdminAddDownloadableLinkInformationActionGroup" stepKey="addDownloadableLinkInformation"/> | ||
<checkOption selector="{{AdminProductDownloadableSection.isLinksPurchasedSeparately}}" stepKey="checkOptionPurchaseSeparately"/> | ||
<actionGroup ref="addDownloadableProductLinkWithMaxDownloads" stepKey="addDownloadableProductLink"> | ||
<argument name="link" value="downloadableLinkWithMaxDownloads"/> | ||
</actionGroup> | ||
<actionGroup ref="saveProductForm" stepKey="saveDownloadableProductForm"/> | ||
<!--Assert downloadable product on Admin product page grid--> | ||
<comment userInput="Assert configurable product in Admin product page grid" stepKey="commentAssertDownloadableProductOnAdmin"/> | ||
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="goToCatalogProductPage"/> | ||
<actionGroup ref="filterProductGridBySku2" stepKey="filterProductGridBySku"> | ||
<argument name="sku" value="$$createProduct.sku$$"/> | ||
</actionGroup> | ||
<see selector="{{AdminProductGridSection.productGridCell('1', 'Name')}}" userInput="$$createProduct.name$$" stepKey="seeDownloadableProductNameInGrid"/> | ||
<see selector="{{AdminProductGridSection.productGridCell('1', 'Type')}}" userInput="Downloadable Product" stepKey="seeDownloadableProductTypeInGrid"/> | ||
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearDownloadableProductFilters"/> | ||
<!--Assert downloadable product on storefront--> | ||
<comment userInput="Assert downloadable product on storefront" stepKey="commentAssertDownloadableProductOnStorefront"/> | ||
<amOnPage url="{{StorefrontProductPage.url($$createProduct.name$$)}}" stepKey="openDownloadableProductPage"/> | ||
<waitForPageLoad stepKey="waitForStorefrontDownloadableProductPageLoad"/> | ||
<see userInput="IN STOCK" selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="assertDownloadableProductInStock"/> | ||
<scrollTo selector="{{StorefrontDownloadableProductSection.downloadableLinkBlock}}" stepKey="scrollToLinksInStorefront"/> | ||
<seeElement selector="{{StorefrontDownloadableProductSection.downloadableLinkLabel(downloadableLinkWithMaxDownloads.title)}}" stepKey="seeDownloadableLink" /> | ||
</test> | ||
<test name="AdminDownloadableProductTypeSwitchingToSimpleProductTest" extends="AdminVirtualProductTypeSwitchingToDownloadableProductTest"> | ||
<annotations> | ||
<features value="Catalog"/> | ||
<stories value="Product type switching"/> | ||
<title value="Downloadable product type switching on editing to Simple product"/> | ||
<description value="Downloadable product type switching on editing to Simple product"/> | ||
<testCaseId value="MC-17955"/> | ||
<useCaseId value="MAGETWO-44170"/> | ||
<severity value="MAJOR"/> | ||
<group value="catalog"/> | ||
</annotations> | ||
<!--Change product type to Simple--> | ||
<comment userInput="Change product type to Simple Product" stepKey="commentCreateSimple"/> | ||
<amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="gotToProductPage"/> | ||
<waitForPageLoad stepKey="waitForProductPageLoad"/> | ||
<actionGroup ref="AdminAddDownloadableLinkInformationActionGroup" stepKey="addDownloadableLinkInformation"/> | ||
<selectOption selector="{{AdminProductFormSection.productWeightSelect}}" userInput="This item has weight" stepKey="selectWeightForProduct"/> | ||
<actionGroup ref="saveProductForm" stepKey="saveProductForm"/> | ||
<!--Assert simple product on Admin product page grid--> | ||
<comment userInput="Assert simple product in Admin product page grid" stepKey="commentAssertProductOnAdmin"/> | ||
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="goToCatalogSimpleProductPage"/> | ||
<actionGroup ref="filterProductGridBySku2" stepKey="filterSimpleProductGridBySku"> | ||
<argument name="sku" value="$$createProduct.sku$$"/> | ||
</actionGroup> | ||
<see selector="{{AdminProductGridSection.productGridCell('1', 'Name')}}" userInput="$$createProduct.name$$" stepKey="seeSimpleProductNameInGrid"/> | ||
<see selector="{{AdminProductGridSection.productGridCell('1', 'Type')}}" userInput="Simple Product" stepKey="seeSimpleProductTypeInGrid"/> | ||
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearSimpleProductFilters"/> | ||
<!--Assert simple product on storefront--> | ||
<comment userInput="Assert simple product on storefront" stepKey="commentAssertSimpleProductOnStorefront"/> | ||
<amOnPage url="{{StorefrontProductPage.url($$createProduct.name$$)}}" stepKey="openSimpleProductPage"/> | ||
<waitForPageLoad stepKey="waitForStorefrontSimpleProductPageLoad"/> | ||
<see userInput="IN STOCK" selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="assertSimpleProductInStock"/> | ||
<dontSeeElement selector="{{StorefrontDownloadableProductSection.downloadableLinkLabel(downloadableLinkWithMaxDownloads.title)}}" stepKey="dontSeeDownloadableLink" /> | ||
</test> | ||
</tests> |
85 changes: 85 additions & 0 deletions
85
...e/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryHighlightedAndProductDisplayedTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="StorefrontCategoryHighlightedAndProductDisplayedTest"> | ||
<annotations> | ||
<features value="Catalog"/> | ||
<stories value="Category"/> | ||
<title value="Сheck that current category is highlighted and all products displayed for it"/> | ||
<description value="Сheck that current category is highlighted and all products displayed for it"/> | ||
<severity value="MAJOR"/> | ||
<testCaseId value="MC-19626"/> | ||
<useCaseId value="MAGETWO-98748"/> | ||
<group value="Catalog"/> | ||
</annotations> | ||
<before> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
<createData entity="SimpleSubCategory" stepKey="category1"/> | ||
<createData entity="SimpleSubCategory" stepKey="category2"/> | ||
<createData entity="SimpleSubCategory" stepKey="category3"/> | ||
<createData entity="SimpleSubCategory" stepKey="category4"/> | ||
<createData entity="SimpleProduct" stepKey="product1"> | ||
<requiredEntity createDataKey="category1"/> | ||
</createData> | ||
<createData entity="SimpleProduct" stepKey="product2"> | ||
<requiredEntity createDataKey="category1"/> | ||
</createData> | ||
<createData entity="SimpleProduct" stepKey="product3"> | ||
<requiredEntity createDataKey="category2"/> | ||
</createData> | ||
<createData entity="SimpleProduct" stepKey="product4"> | ||
<requiredEntity createDataKey="category2"/> | ||
</createData> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="product1" stepKey="deleteProduct1"/> | ||
<deleteData createDataKey="product2" stepKey="deleteProduct2"/> | ||
<deleteData createDataKey="product3" stepKey="deleteProduct3"/> | ||
<deleteData createDataKey="product4" stepKey="deleteProduct4"/> | ||
<deleteData createDataKey="category1" stepKey="deleteCategory1"/> | ||
<deleteData createDataKey="category2" stepKey="deleteCategory2"/> | ||
<deleteData createDataKey="category3" stepKey="deleteCategory3"/> | ||
<deleteData createDataKey="category4" stepKey="deleteCategory4"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
<!--Open Storefront home page--> | ||
<comment userInput="Open Storefront home page" stepKey="openStorefrontHomePage"/> | ||
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToStorefrontHomePage"/> | ||
<waitForPageLoad stepKey="waitForSimpleProductPage"/> | ||
<!--Click on first category--> | ||
<comment userInput="Click on first category" stepKey="openFirstCategoryPage"/> | ||
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree($$category1.name$$)}}" stepKey="clickCategory1Name"/> | ||
<waitForPageLoad stepKey="waitForCategory1Page"/> | ||
<!--Check if current category is highlighted and the others are not--> | ||
<comment userInput="Check if current category is highlighted and the others are not" stepKey="checkCateg1NameIsHighlighted"/> | ||
<grabAttributeFrom selector="{{AdminCategorySidebarTreeSection.categoryHighlighted($$category1.name$$)}}" userInput="class" stepKey="grabCategory1Class"/> | ||
<assertContains expectedType="string" expected="active" actual="$grabCategory1Class" stepKey="assertCategory1IsHighlighted"/> | ||
<executeJS function="return document.querySelectorAll('{{AdminCategorySidebarTreeSection.categoryNotHighlighted}}').length" stepKey="highlightedAmount"/> | ||
<assertEquals expectedType="int" expected="1" actual="$highlightedAmount" stepKey="assertRestCategories1IsNotHighlighted"/> | ||
<!--See products in the category page--> | ||
<comment userInput="See products in the category page" stepKey="seeProductsInCategoryPage"/> | ||
<seeElement selector="{{StorefrontCategoryMainSection.specifiedProductItemInfo($product1.name$)}}" stepKey="seeProduct1InCategoryPage"/> | ||
<seeElement selector="{{StorefrontCategoryMainSection.specifiedProductItemInfo($product2.name$)}}" stepKey="seeProduct2InCategoryPage"/> | ||
<!--Click on second category--> | ||
<comment userInput="Click on second category" stepKey="openSecondCategoryPage"/> | ||
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree($$category2.name$$)}}" stepKey="clickCategory2Name"/> | ||
<waitForPageLoad stepKey="waitForCategory2Page"/> | ||
<!--Check if current category is highlighted and the others are not--> | ||
<comment userInput="Check if current category is highlighted and the others are not" stepKey="checkCateg2NameIsHighlighted"/> | ||
<grabAttributeFrom selector="{{AdminCategorySidebarTreeSection.categoryHighlighted($$category2.name$$)}}" userInput="class" stepKey="grabCategory2Class"/> | ||
<assertContains expectedType="string" expected="active" actual="$grabCategory2Class" stepKey="assertCategory2IsHighlighted"/> | ||
<executeJS function="return document.querySelectorAll('{{AdminCategorySidebarTreeSection.categoryNotHighlighted}}').length" stepKey="highlightedAmount2"/> | ||
<assertEquals expectedType="int" expected="1" actual="$highlightedAmount2" stepKey="assertRestCategories1IsNotHighlighted2"/> | ||
<!--Assert products in second category page--> | ||
<comment userInput="Assert products in second category page" stepKey="commentAssertProducts"/> | ||
<seeElement selector="{{StorefrontCategoryMainSection.specifiedProductItemInfo($product3.name$)}}" stepKey="seeProduct3InCategoryPage"/> | ||
<seeElement selector="{{StorefrontCategoryMainSection.specifiedProductItemInfo($product4.name$)}}" stepKey="seeProduct4InCategoryPage"/> | ||
</test> | ||
</tests> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.