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#3177 from magento-epam/EPAM-PR-9
[epam] MAGETWO-66442: Changes in default scope not effect product images in other scopes
- Loading branch information
Showing
22 changed files
with
373 additions
and
66 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
129 changes: 129 additions & 0 deletions
129
app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.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,129 @@ | ||
<?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="AdminRemoveImageAffectsAllScopesTest"> | ||
<annotations> | ||
<features value="Catalog"/> | ||
<stories value="MAGETWO-66442: Changes in default scope not effect product images in other scopes"/> | ||
<title value="Effect of product images changes in default scope to other scopes"/> | ||
<description value="Product image should be deleted from all scopes"/> | ||
<severity value="MAJOR"/> | ||
<testCaseId value="MAGETWO-94265"/> | ||
<group value="Catalog"/> | ||
</annotations> | ||
<before> | ||
<!--Create 2 websites (with stores, store views)--> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
<createData entity="_defaultCategory" stepKey="category"/> | ||
<createData entity="_defaultProduct" stepKey="product"> | ||
<requiredEntity createDataKey="category"/> | ||
</createData> | ||
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createWebsite"> | ||
<argument name="newWebsiteName" value="FirstWebSite"/> | ||
<argument name="websiteCode" value="FirstWebSiteCode"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore" after="createWebsite"> | ||
<argument name="website" value="FirstWebSite"/> | ||
<argument name="storeGroupName" value="NewStore"/> | ||
<argument name="storeGroupCode" value="Base1"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView" after="createNewStore"> | ||
<argument name="StoreGroup" value="staticFirstStoreGroup"/> | ||
<argument name="customStore" value="staticStore"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createSecondWebsite" after="createCustomStoreView"> | ||
<argument name="newWebsiteName" value="SecondWebSite"/> | ||
<argument name="websiteCode" value="SecondWebSiteCode"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createSecondStore" after="createSecondWebsite"> | ||
<argument name="website" value="SecondWebSite"/> | ||
<argument name="storeGroupName" value="SecondStore"/> | ||
<argument name="storeGroupCode" value="Base2"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView2" after="createSecondStore"> | ||
<argument name="StoreGroup" value="staticStoreGroup"/> | ||
<argument name="customStore" value="staticSecondStore"/> | ||
</actionGroup> | ||
</before> | ||
|
||
<after> | ||
<actionGroup ref="ResetWebUrlOptions" stepKey="resetUrlOption"/> | ||
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite"> | ||
<argument name="websiteName" value="FirstWebSite"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteSecondWebsite"> | ||
<argument name="websiteName" value="SecondWebSite"/> | ||
</actionGroup> | ||
<deleteData createDataKey="category" stepKey="deletePreReqCategory"/> | ||
<deleteData createDataKey="product" stepKey="deleteFirstProduct"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<!--Create product--> | ||
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> | ||
<waitForPageLoad stepKey="waitForProductIndexPage"/> | ||
<actionGroup ref="resetProductGridToDefaultView" stepKey="resetProductGridColumnsInitial"/> | ||
|
||
<!--Open created product--> | ||
<click selector="{{AdminProductGridSection.productGridNameProduct($$product.name$$)}}" stepKey="createdProduct"/> | ||
<waitForPageLoad stepKey="waitForOpenedCreatedProduct"/> | ||
|
||
<!-- Add image to product --> | ||
<actionGroup ref="addProductImage" stepKey="addFirstImageForProduct"> | ||
<argument name="image" value="TestImageNew"/> | ||
</actionGroup> | ||
|
||
<!-- Add second image to product --> | ||
<actionGroup ref="addProductImage" stepKey="addSecondImageForProduct"> | ||
<argument name="image" value="MagentoLogo"/> | ||
</actionGroup> | ||
<!--"Product in Websites": select both Websites--> | ||
<actionGroup ref="ProductSetWebsite" stepKey="ProductSetWebsite1"> | ||
<argument name="website" value="FirstWebSite"/> | ||
</actionGroup> | ||
<actionGroup ref="ProductSetWebsite" stepKey="ProductSetWebsite2"> | ||
<argument name="website" value="SecondWebSite"/> | ||
</actionGroup> | ||
|
||
<!--Go to "Catalog" -> "Products". Open created product--> | ||
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductPage"/> | ||
<waitForPageLoad stepKey="waitForProductPageLoaded"/> | ||
<click selector="{{AdminProductGridSection.productGridNameProduct($$product.name$$)}}" stepKey="openCreatedProduct"/> | ||
<waitForPageLoad stepKey="waitForCreatedProductOpened"/> | ||
|
||
<!--Delete Image 1--> | ||
<actionGroup ref="removeProductImage" stepKey="removeProductImage"/> | ||
|
||
<!--Click "Save" in the upper right corner--> | ||
<actionGroup ref="saveProductForm" stepKey="saveProductFormAfterRemove"/> | ||
|
||
<!--Switch to "Store view 1"--> | ||
<actionGroup ref="SwitchToTheNewStoreView" stepKey="selectStoreView"> | ||
<argument name="storeViewName" value="Store View"/> | ||
</actionGroup> | ||
|
||
<!-- Assert product first image not in admin product form --> | ||
<actionGroup ref="assertProductImageNotInAdminProductPage" stepKey="assertProductImageNotInAdminProductPage"> | ||
<argument name="image" value="TestImageNew"/> | ||
</actionGroup> | ||
|
||
<!--Switch to "Store view 2"--> | ||
<actionGroup ref="SwitchToTheNewStoreView" stepKey="selectSecondStoreView"> | ||
<argument name="storeViewName" value="Second Store View"/> | ||
</actionGroup> | ||
|
||
<!-- Verify that Image 1 is deleted from the Second Store View list --> | ||
<actionGroup ref="assertProductImageNotInAdminProductPage" stepKey="assertProductImageNotInSecondStoreViewPage"> | ||
<argument name="image" value="TestImageNew"/> | ||
</actionGroup> | ||
</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.