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#189 from magento-pangolin/MC-224
MC-224
- Loading branch information
Showing
1 changed file
with
145 additions
and
0 deletions.
There are no files selected for viewing
145 changes: 145 additions & 0 deletions
145
app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.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,145 @@ | ||
<?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="AdminCreateAndEditBundleProductSettingsTest"> | ||
<annotations> | ||
<features value="Bundle"/> | ||
<stories value="Create/Edit bundle product in Admin"/> | ||
<title value="Admin should be able to set/edit other product information when creating/editing a bundle product"/> | ||
<description value="Admin should be able to set/edit other product information when creating/editing a bundle product"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-224"/> | ||
<group value="Catalog"/> | ||
</annotations> | ||
<before> | ||
<!-- Create a Website --> | ||
<createData entity="customWebsite" stepKey="createWebsite"/> | ||
|
||
<!-- Create a simple product for a bundle option --> | ||
<createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> | ||
|
||
<!-- Login as admin --> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
</before> | ||
<after> | ||
<!-- Delete the simple product --> | ||
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> | ||
|
||
<!-- Log out --> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<!-- Create new bundle product --> | ||
<actionGroup ref="GoToSpecifiedCreateProductPage" stepKey="createBundleProduct"> | ||
<argument name="productType" value="bundle"/> | ||
</actionGroup> | ||
|
||
<!-- Fill all main fields --> | ||
<actionGroup ref="fillMainBundleProductForm" stepKey="fillMainProductFields"/> | ||
|
||
<!-- Add the bundle option to the product --> | ||
<actionGroup ref="addBundleOptionWithOneProduct" stepKey="addBundleOption"> | ||
<argument name="x" value="0"/> | ||
<argument name="n" value="1"/> | ||
<argument name="prodOneSku" value="$$createSimpleProduct.sku$$"/> | ||
<argument name="prodTwoSku" value=""/> | ||
<argument name="optionTitle" value="{{RadioButtonsOption.title}}"/> | ||
<argument name="inputType" value="{{RadioButtonsOption.type}}"/> | ||
</actionGroup> | ||
|
||
<!-- Set product in created Website --> | ||
<actionGroup ref="AdminAssignProductInWebsiteActionGroup" stepKey="selectProductInWebsites"> | ||
<argument name="website" value="$createWebsite.website[name]$"/> | ||
</actionGroup> | ||
|
||
<!-- Set Design settings for the product --> | ||
<actionGroup ref="AdminSetProductDesignSettingsActionGroup" stepKey="setProductDesignSettings"> | ||
<argument name="designSettings" value="simpleLumaDesignThreeColumns"/> | ||
</actionGroup> | ||
|
||
<!-- Set Gift Options settings for the product --> | ||
<actionGroup ref="AdminSwitchProductGiftMessageStatusActionGroup" stepKey="enableGiftMessageSettings"> | ||
<argument name="status" value="1"/> | ||
</actionGroup> | ||
|
||
<!-- Save product form --> | ||
<actionGroup ref="saveProductForm" stepKey="clickSaveButton"/> | ||
|
||
<!-- Open product page --> | ||
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openStorefrontProductPage"> | ||
<argument name="productUrl" value="{{BundleProduct.name}}"/> | ||
</actionGroup> | ||
|
||
<!-- Assert product Design settings "layout 3 columns" --> | ||
<seeElement selector="{{StorefrontProductPageDesignSection.layoutThreeColumns}}" stepKey="seeDesignChanges"/> | ||
|
||
<!-- Assert Gift Option product settings is present --> | ||
<actionGroup ref="StorefrontAddBundleProductFromProductToCartActionGroup" stepKey="addProductToCart"> | ||
<argument name="productName" value="{{BundleProduct.name}}"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openShoppingCart"/> | ||
<actionGroup ref="StorefrontAssertGiftMessageFieldsActionGroup" stepKey="assertGiftMessageFieldsArePresent"/> | ||
|
||
<!-- Open created product --> | ||
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct"> | ||
<argument name="product" value="BundleProduct"/> | ||
</actionGroup> | ||
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct"> | ||
<argument name="product" value="BundleProduct"/> | ||
</actionGroup> | ||
|
||
<!-- Assert product in assigned to Website --> | ||
<actionGroup ref="AssertProductIsAssignedToWebsite" stepKey="seeCustomWebsiteIsChecked"> | ||
<argument name="website" value="$createWebsite.website[name]$"/> | ||
</actionGroup> | ||
|
||
<!-- Edit product in Websites --> | ||
<actionGroup ref="AdminUnassignProductInWebsiteActionGroup" stepKey="uncheckProductInWebsites"> | ||
<argument name="website" value="$createWebsite.website[name]$"/> | ||
</actionGroup> | ||
|
||
<!-- Edit product Search Engine Optimization settings --> | ||
<actionGroup ref="AdminChangeProductSEOSettingsActionGroup" stepKey="editProductSEOSettings"> | ||
<argument name="productName" value="ApiBundleProduct.name"/> | ||
</actionGroup> | ||
|
||
<!-- Edit Design settings for the product --> | ||
<actionGroup ref="AdminSetProductDesignSettingsActionGroup" stepKey="editProductDesignSettings"/> | ||
|
||
<!-- Edit Gift Option product settings --> | ||
<actionGroup ref="AdminSwitchProductGiftMessageStatusActionGroup" stepKey="disableGiftMessageSettings"/> | ||
|
||
<!-- Save product form --> | ||
<actionGroup ref="saveProductForm" stepKey="clickSaveProduct"/> | ||
|
||
<!-- Verify Url Key after changing --> | ||
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> | ||
<argument name="productUrl" value="{{ApiBundleProduct.name}}"/> | ||
</actionGroup> | ||
|
||
<!-- Assert product design settings "Layout empty" --> | ||
<seeElement selector="{{StorefrontProductPageDesignSection.layoutTwoColumnsLeft}}" stepKey="seeNewDesignChanges"/> | ||
|
||
<!-- Assert Gift Option product settings --> | ||
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCart"/> | ||
<dontSeeElement selector="{{StorefrontProductCartGiftOptionSection.giftOptions}}" stepKey="dontSeeGiftOptionBtn"/> | ||
|
||
<!-- Delete created bundle product --> | ||
<actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteProduct"> | ||
<argument name="product" value="BundleProduct"/> | ||
</actionGroup> | ||
|
||
<!-- Delete created Website --> | ||
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite"> | ||
<argument name="websiteName" value="$createWebsite.website[name]$"/> | ||
</actionGroup> | ||
</test> | ||
</tests> | ||
|