-
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.
- Loading branch information
1 parent
a93dbd8
commit d07e0a9
Showing
2 changed files
with
151 additions
and
0 deletions.
There are no files selected for viewing
122 changes: 122 additions & 0 deletions
122
...est/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductMSRPCovertTest.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,122 @@ | ||
<?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="StorefrontConfigurableProductMSRPCovertTest"> | ||
<annotations> | ||
<features value="ConfigurableProduct"/> | ||
<stories value="View configurable product options, verify convert MSRP currency on storefront."/> | ||
<title value="Verify convert MSRP currency of configurable product options"/> | ||
<description value="Check convert MSRP currency of configurable product options."/> | ||
<testCaseId value="MC-37575"/> | ||
<severity value="MAJOR"/> | ||
<group value="ConfigurableProduct"/> | ||
</annotations> | ||
|
||
<before> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
|
||
<createData entity="SimpleSubCategory" stepKey="createCategory"/> | ||
|
||
<createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
|
||
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> | ||
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</createData> | ||
<createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</createData> | ||
<createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</createData> | ||
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</getData> | ||
<getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</getData> | ||
|
||
<createData entity="ApiSimpleProductWithPrice50" stepKey="createConfigChildProduct1"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
<requiredEntity createDataKey="getConfigAttributeOption1"/> | ||
</createData> | ||
<createData entity="ApiSimpleProductWithPrice60" stepKey="createConfigChildProduct2"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
<requiredEntity createDataKey="getConfigAttributeOption2"/> | ||
</createData> | ||
|
||
<createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> | ||
<requiredEntity createDataKey="createConfigProduct"/> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
<requiredEntity createDataKey="getConfigAttributeOption1"/> | ||
<requiredEntity createDataKey="getConfigAttributeOption2"/> | ||
</createData> | ||
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> | ||
<requiredEntity createDataKey="createConfigProduct"/> | ||
<requiredEntity createDataKey="createConfigChildProduct1"/> | ||
</createData> | ||
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> | ||
<requiredEntity createDataKey="createConfigProduct"/> | ||
<requiredEntity createDataKey="createConfigChildProduct2"/> | ||
</createData> | ||
|
||
<createData entity="MsrpEnableMAP" stepKey="enableMAP"/> | ||
<magentoCLI command="config:set currency/options/allow EUR,USD" stepKey="setCurrencyAllow"/> | ||
</before> | ||
<after> | ||
|
||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> | ||
<deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> | ||
<deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> | ||
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> | ||
<createData entity="MsrpDisableMAP" stepKey="disableMAP"/> | ||
<magentoCLI command="config:set currency/options/allow USD" stepKey="setCurrencyAllow"/> | ||
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> | ||
</after> | ||
|
||
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToFirstChildProductEditPage"> | ||
<argument name="productId" value="$$createConfigChildProduct1.id$$"/> | ||
</actionGroup> | ||
<waitForPageLoad stepKey="waitForProductPageLoad"/> | ||
<actionGroup ref="AdminSetAdvancedPricingActionGroup" stepKey="setAdvancedPricingFirst"> | ||
<argument name="advancedPrice" value="100"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToSecondChildProductEditPage"> | ||
<argument name="productId" value="$$createConfigChildProduct2.id$$"/> | ||
</actionGroup> | ||
<waitForPageLoad stepKey="waitForProductPageLoad1"/> | ||
<actionGroup ref="AdminSetAdvancedPricingActionGroup" stepKey="setAdvancedPricingSecond"> | ||
<argument name="advancedPrice" value="100"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> | ||
<argument name="tags" value=""/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="navigateToProduct"> | ||
<argument name="productUrlKey" value="$$createConfigProduct.custom_attributes[url_key]$$"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="StorefrontSwitchCurrencyActionGroup" stepKey="switchEURCurrency"> | ||
<argument name="currency" value="EUR"/> | ||
</actionGroup> | ||
|
||
<selectOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" userInput="$$getConfigAttributeOption1.value$$" stepKey="selectFirstOption"/> | ||
<waitForElement selector="{{StorefrontProductInfoMainSection.mapPrice}}" stepKey="waitForLoad"/> | ||
<grabTextFrom selector="{{StorefrontProductInfoMainSection.mapPrice}}" stepKey="grabProductMapPrice"/> | ||
<assertNotEquals stepKey="assertProductMapPrice"> | ||
<actualResult type="const">($grabProductMapPrice)</actualResult> | ||
<expectedResult type="string">€100.00</expectedResult> | ||
</assertNotEquals> | ||
</test> | ||
</tests> |
29 changes: 29 additions & 0 deletions
29
app/code/Magento/Msrp/Test/Mftf/ActionGroup/AdminSetAdvancedPricingActionGroup.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,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminSetAdvancedPricingActionGroup"> | ||
<annotations> | ||
<description>Set advanced pricing and Save product on the Admin Product creation/edit page.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="advancedPrice" type="string"/> | ||
</arguments> | ||
|
||
<click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickOnAdvancedPricingButton"/> | ||
<waitForElement selector="{{AdminProductFormAdvancedPricingSection.msrp}}" stepKey="waitForMsrp"/> | ||
<fillField selector="{{AdminProductFormAdvancedPricingSection.msrp}}" userInput="{{advancedPrice}}" stepKey="setMsrpForFirstChildProduct"/> | ||
<click selector="{{AdminProductFormAdvancedPricingSection.doneButton}}" stepKey="clickDoneButton"/> | ||
<scrollToTopOfPage stepKey="scrollTopPageProduct"/> | ||
<waitForElementVisible selector="{{AdminProductFormActionSection.saveButton}}" stepKey="waitForSaveProductButton"/> | ||
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct"/> | ||
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitProductSaveSuccessMessage"/> | ||
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the product." stepKey="seeSaveConfirmation"/> | ||
</actionGroup> | ||
</actionGroups> |