Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit 11691a8

Browse files
authored
Merge pull request #119 from magento-pangolin/MC-4673
MC-4673
2 parents 3e224f0 + 4617e53 commit 11691a8

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AddProductToCartActionGroup.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,10 @@
2121
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" time="30" stepKey="waitForProductAddedMessage"/>
2222
<see selector="{{StorefrontMessagesSection.success}}" userInput="You added {{product.name}} to your shopping cart." stepKey="seeAddToCartSuccessMessage"/>
2323
</actionGroup>
24+
<actionGroup name="StorefrontAddSimpleProductWithQtyActionGroup" extends="AddSimpleProductToCart">
25+
<arguments>
26+
<argument name="quantity" type="string" defaultValue="1"/>
27+
</arguments>
28+
<fillField userInput="{{quantity}}" selector="{{StorefrontProductPageSection.qtyInput}}" stepKey="fillProductQty" after="goToProductPage"/>
29+
</actionGroup>
2430
</actionGroups>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminCreateTaxRuleActionGroup">
12+
<arguments>
13+
<argument name="taxRate" type="entity"/>
14+
<argument name="taxRule" type="entity"/>
15+
</arguments>
16+
<!-- Create Tax Rule -->
17+
<amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/>
18+
<waitForPageLoad stepKey="waitForTaxRatePage"/>
19+
<click selector="{{AdminGridMainControls.add}}" stepKey="addNewTaxRate"/>
20+
<fillField selector="{{AdminTaxRulesSection.ruleName}}" userInput="{{taxRule.code}}" stepKey="fillRuleName"/>
21+
<click selector="{{AdminTaxRulesSection.selectTaxRate(taxRate.code)}}" stepKey="selectTaxRate"/>
22+
<click selector="{{AdminTaxRuleFormSection.additionalSettings}}" stepKey="clickAdditionalSettings"/>
23+
<fillField userInput="{{taxRule.priority}}" selector="{{AdminTaxRuleFormSection.priority}}" stepKey="fillPriority"/>
24+
<fillField userInput="{{taxRule.position}}" selector="{{AdminTaxRuleFormSection.sortOrder}}" stepKey="fillPosition"/>
25+
<waitForLoadingMaskToDisappear stepKey="waitForLoading"/>
26+
<click selector="{{AdminStoresMainActionsSection.saveButton}}" stepKey="clickSave"/>
27+
</actionGroup>
28+
</actionGroups>

app/code/Magento/Tax/Test/Mftf/Data/TaxRateData.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,11 @@
110110
<data key="tax_region_id">51</data>
111111
<data key="rate">6</data>
112112
</entity>
113+
<entity name="USFullTaxRate" type="taxRate">
114+
<data key="code" unique="suffix">Tax Rate</data>
115+
<data key="tax_country_id">US</data>
116+
<data key="tax_postcode">*</data>
117+
<data key="zip_is_range">0</data>
118+
<data key="rate">10</data>
119+
</entity>
113120
</entities>

app/code/Magento/Tax/Test/Mftf/Section/AdminTaxRulesSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@
3434
<element name="popUpDialogOK" type="button" selector="//*[@class='modal-footer']//*[contains(text(),'OK')]"/>
3535
<element name="taxRateMultiSelectItems" type="block" selector=".mselect-list-item"/>
3636
<element name="taxRateNumber" type="button" selector="//div[@data-ui-id='tax-rate-form-fieldset-element-form-field-tax-rate']//div[@class='mselect-items-wrapper']//label[{{var}}]" parameterized="true"/>
37+
<element name="selectTaxRate" type="input" selector="//span[text()='{{taxCode}}']" parameterized="true"/>
3738
</section>
3839
</sections>

0 commit comments

Comments
 (0)