Skip to content

Commit

Permalink
Merge pull request magento#119 from magento-pangolin/MC-4673
Browse files Browse the repository at this point in the history
MC-4673
  • Loading branch information
tomreece authored May 20, 2019
2 parents 3e224f0 + 4617e53 commit 11691a8
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,10 @@
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" time="30" stepKey="waitForProductAddedMessage"/>
<see selector="{{StorefrontMessagesSection.success}}" userInput="You added {{product.name}} to your shopping cart." stepKey="seeAddToCartSuccessMessage"/>
</actionGroup>
<actionGroup name="StorefrontAddSimpleProductWithQtyActionGroup" extends="AddSimpleProductToCart">
<arguments>
<argument name="quantity" type="string" defaultValue="1"/>
</arguments>
<fillField userInput="{{quantity}}" selector="{{StorefrontProductPageSection.qtyInput}}" stepKey="fillProductQty" after="goToProductPage"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?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="AdminCreateTaxRuleActionGroup">
<arguments>
<argument name="taxRate" type="entity"/>
<argument name="taxRule" type="entity"/>
</arguments>
<!-- Create Tax Rule -->
<amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/>
<waitForPageLoad stepKey="waitForTaxRatePage"/>
<click selector="{{AdminGridMainControls.add}}" stepKey="addNewTaxRate"/>
<fillField selector="{{AdminTaxRulesSection.ruleName}}" userInput="{{taxRule.code}}" stepKey="fillRuleName"/>
<click selector="{{AdminTaxRulesSection.selectTaxRate(taxRate.code)}}" stepKey="selectTaxRate"/>
<click selector="{{AdminTaxRuleFormSection.additionalSettings}}" stepKey="clickAdditionalSettings"/>
<fillField userInput="{{taxRule.priority}}" selector="{{AdminTaxRuleFormSection.priority}}" stepKey="fillPriority"/>
<fillField userInput="{{taxRule.position}}" selector="{{AdminTaxRuleFormSection.sortOrder}}" stepKey="fillPosition"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoading"/>
<click selector="{{AdminStoresMainActionsSection.saveButton}}" stepKey="clickSave"/>
</actionGroup>
</actionGroups>
7 changes: 7 additions & 0 deletions app/code/Magento/Tax/Test/Mftf/Data/TaxRateData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,11 @@
<data key="tax_region_id">51</data>
<data key="rate">6</data>
</entity>
<entity name="USFullTaxRate" type="taxRate">
<data key="code" unique="suffix">Tax Rate</data>
<data key="tax_country_id">US</data>
<data key="tax_postcode">*</data>
<data key="zip_is_range">0</data>
<data key="rate">10</data>
</entity>
</entities>
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@
<element name="popUpDialogOK" type="button" selector="//*[@class='modal-footer']//*[contains(text(),'OK')]"/>
<element name="taxRateMultiSelectItems" type="block" selector=".mselect-list-item"/>
<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"/>
<element name="selectTaxRate" type="input" selector="//span[text()='{{taxCode}}']" parameterized="true"/>
</section>
</sections>

0 comments on commit 11691a8

Please sign in to comment.