forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
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 magento#3282 from magento-tsg/2.3-develop-mftf-pr7
[TSG] MFTF for 2.3 (pr7) (2.3.1)
- Loading branch information
Showing
13 changed files
with
410 additions
and
9 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
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
172 changes: 172 additions & 0 deletions
172
...e/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.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,172 @@ | ||
<?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="AdminFilteringCategoryProductsUsingScopeSelectorTest"> | ||
<annotations> | ||
<features value="Catalog"/> | ||
<title value="Filtering Category Products using scope selector"/> | ||
<description value="Filtering Category Products using scope selector"/> | ||
<severity value="MAJOR"/> | ||
<testCaseId value="MAGETWO-48850"/> | ||
<group value="catalog"/> | ||
</annotations> | ||
<before> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
<!--Create website, Sore adn Store View--> | ||
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="adminCreateWebsite"> | ||
<argument name="newWebsiteName" value="secondWebsite"/> | ||
<argument name="websiteCode" value="second_website"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="adminCreateStore"> | ||
<argument name="website" value="secondWebsite"/> | ||
<argument name="storeGroupName" value="secondStore"/> | ||
<argument name="storeGroupCode" value="second_store"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="adminCreateStoreView"> | ||
<argument name="StoreGroup" value="customStoreTierPrice"/> | ||
<argument name="customStore" value="customStoreView"/> | ||
</actionGroup> | ||
|
||
<!--Create Simple Product and Category --> | ||
<createData entity="_defaultCategory" stepKey="createCategory"/> | ||
<createData entity="_defaultProduct" stepKey="createProduct0"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="_defaultProduct" stepKey="createProduct1"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="_defaultProduct" stepKey="createProduct2"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="_defaultProduct" stepKey="createProduct12"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
|
||
<!-- Set filter to product name and product0 not assigned to any website--> | ||
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="filterGroupedProductOptions"> | ||
<argument name="product" value="_defaultProduct"/> | ||
</actionGroup> | ||
|
||
<click selector="{{AdminProductGridSection.productGridNameProduct('$$createProduct0.name$$')}}" | ||
stepKey="clickOpenProductForEdit"/> | ||
<waitForPageLoad time="30" stepKey="waitForProductEditOpen"/> | ||
|
||
<scrollTo selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="scrollToWebsitesSection"/> | ||
<click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="clickToOpenWebsiteSection"/> | ||
<waitForPageLoad stepKey="waitForToOpenedWebsiteSection"/> | ||
<uncheckOption selector="{{ProductInWebsitesSection.website('Main Website')}}" stepKey="uncheckWebsite"/> | ||
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct"/> | ||
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product." | ||
stepKey="seeSuccessMessage"/> | ||
|
||
<!-- Set filter to product name and product2 in website 2 only --> | ||
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> | ||
<waitForPageLoad time="30" stepKey="waitForProductsPageToLoad"/> | ||
<click selector="{{AdminProductGridSection.productGridNameProduct('$$createProduct2.name$$')}}" | ||
stepKey="clickOpenProductForEdit1"/> | ||
<waitForPageLoad time="30" stepKey="waitForProductEditOpen1"/> | ||
|
||
<actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="selectProductInWebsites"> | ||
<argument name="website" value="secondWebsite"/> | ||
</actionGroup> | ||
<uncheckOption selector="{{ProductInWebsitesSection.website('Main Website')}}" stepKey="uncheckWebsite1"/> | ||
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct1"/> | ||
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product." | ||
stepKey="seeSuccessMessage1"/> | ||
|
||
<!-- Set filter to product name and product12 assigned to both websites 1 and 2 --> | ||
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex1"/> | ||
<waitForPageLoad time="30" stepKey="waitForProductsPageToLoad1"/> | ||
<click selector="{{AdminProductGridSection.productGridNameProduct('$$createProduct12.name$$')}}" | ||
stepKey="clickOpenProductForEdit2"/> | ||
<waitForPageLoad time="30" stepKey="waitForProductEditOpen2"/> | ||
|
||
<actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="selectProductInWebsites1"> | ||
<argument name="website" value="secondWebsite"/> | ||
</actionGroup> | ||
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct2"/> | ||
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product." | ||
stepKey="seeSuccessMessage2"/> | ||
</before> | ||
<after> | ||
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite"> | ||
<argument name="websiteName" value="secondWebsite"/> | ||
</actionGroup> | ||
<actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductsFilter"/> | ||
<deleteData createDataKey="createProduct0" stepKey="deleteProduct"/> | ||
<deleteData createDataKey="createProduct1" stepKey="deleteProduct1"/> | ||
<deleteData createDataKey="createProduct2" stepKey="deleteProduct2"/> | ||
<deleteData createDataKey="createProduct12" stepKey="deleteProduct3"/> | ||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
<!-- Step 1-2: Open Category page and Set scope selector to All Store Views--> | ||
<amOnPage url="{{AdminCategoryPage.url}}" stepKey="goToCategoryPage"/> | ||
<waitForPageLoad stepKey="waitForCategoryPageLoad"/> | ||
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree($$createCategory.name$$)}}" | ||
stepKey="clickCategoryName"/> | ||
<click selector="{{AdminCategoryProductsSection.sectionHeader}}" stepKey="openProductSection"/> | ||
<see selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct0.name$$)}}" | ||
userInput="$$createProduct0.name$$" stepKey="seeProductName"/> | ||
<see selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct1.name$$)}}" | ||
userInput="$$createProduct1.name$$" stepKey="seeProductName1"/> | ||
<see selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct2.name$$)}}" | ||
userInput="$$createProduct2.name$$" stepKey="seeProductName2"/> | ||
<see selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct12.name$$)}}" | ||
userInput="$$createProduct12.name$$" stepKey="seeProductName3"/> | ||
|
||
<!-- Step 3: Set scope selector to Website1( Storeview for the Website 1) --> | ||
<scrollToTopOfPage stepKey="scrollToTopOfPage"/> | ||
<click selector="{{AdminCategoryMainActionsSection.CategoryStoreViewDropdownToggle}}" | ||
stepKey="clickStoresList"/> | ||
<waitForPageLoad stepKey="waitForCategoryPageLoad1"/> | ||
<click selector="{{AdminCategoryMainActionsSection.CategoryStoreViewOption('Default Store View')}}" | ||
stepKey="clickStoreView"/> | ||
<waitForElement selector="{{AdminCategoryMainActionsSection.CategoryStoreViewModalAccept}}" | ||
stepKey="waitForModalAccept"/> | ||
<click selector="{{AdminCategoryMainActionsSection.CategoryStoreViewModalAccept}}" stepKey="clickActionAccept"/> | ||
<waitForElementNotVisible selector="{{AdminCategoryMainActionsSection.CategoryStoreViewModalAccept}}" | ||
stepKey="waitForNotVisibleModalAccept"/> | ||
<waitForPageLoad stepKey="waitForCategoryPageLoad2"/> | ||
<click selector="{{AdminCategoryProductsSection.sectionHeader}}" stepKey="openProductSection1"/> | ||
<see selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct1.name$$)}}" | ||
userInput="$$createProduct1.name$$" stepKey="seeProductName4"/> | ||
<see selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct12.name$$)}}" | ||
userInput="$$createProduct12.name$$" stepKey="seeProductName5"/> | ||
<dontSee selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct0.name$$)}}" | ||
userInput="$$createProduct0.name$$" stepKey="dontSeeProductName"/> | ||
<dontSee selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct2.name$$)}}" | ||
userInput="$$createProduct2.name$$" stepKey="dontSeeProductName1"/> | ||
|
||
<!-- Step 4: Set scope selector to Website2 ( StopreView for Website 2) --> | ||
<scrollToTopOfPage stepKey="scrollToTopOfPage1"/> | ||
<click selector="{{AdminCategoryMainActionsSection.CategoryStoreViewDropdownToggle}}" | ||
stepKey="clickStoresList1"/> | ||
<waitForPageLoad stepKey="waitForCategoryPageLoad3"/> | ||
<click selector="{{AdminCategoryMainActionsSection.CategoryStoreViewOption('secondStoreView')}}" | ||
stepKey="clickStoreView1"/> | ||
<waitForElement selector="{{AdminCategoryMainActionsSection.CategoryStoreViewModalAccept}}" | ||
stepKey="waitForModalAccept1"/> | ||
<click selector="{{AdminCategoryMainActionsSection.CategoryStoreViewModalAccept}}" | ||
stepKey="clickActionAccept1"/> | ||
<waitForElementNotVisible selector="{{AdminCategoryMainActionsSection.CategoryStoreViewModalAccept}}" | ||
stepKey="waitForNotVisibleModalAccept1"/> | ||
<waitForPageLoad stepKey="waitForCategoryPageLoad4"/> | ||
<click selector="{{AdminCategoryProductsSection.sectionHeader}}" stepKey="openProductSection2"/> | ||
<see selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct2.name$$)}}" | ||
userInput="$$createProduct2.name$$" stepKey="seeProductName6"/> | ||
<see selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct12.name$$)}}" | ||
userInput="$$createProduct12.name$$" stepKey="seeProductName7"/> | ||
<dontSee selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct0.name$$)}}" | ||
userInput="$$createProduct0.name$$" stepKey="dontSeeProductName2"/> | ||
<dontSee selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct2.name$$)}}" | ||
userInput="$$createProduct1.name$$" stepKey="dontSeeProductName3"/> | ||
</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
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.