-
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.
Merge pull request #87 from magento-pangolin/MC-4571-4575
MC-4571-4575
- Loading branch information
Showing
9 changed files
with
136 additions
and
2 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...gento/Checkout/Test/Mftf/ActionGroup/StorefrontCheckCartDiscountAndSummaryActionGroup.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,23 @@ | ||
<?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"> | ||
<!-- Open the Minicart and check Summary --> | ||
<actionGroup name="StorefrontCheckCartDiscountAndSummaryActionGroup"> | ||
<arguments> | ||
<argument name="total" type="string"/> | ||
<argument name="discount" type="string"/> | ||
</arguments> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
<waitForLoadingMaskToDisappear stepKey="waitForPrices"/> | ||
<see selector="{{CheckoutCartSummarySection.discountAmount}}" userInput="-${{discount}}" stepKey="assertDiscount"/> | ||
<wait time="10" stepKey="waitForTotalPrice"/> | ||
<see selector="{{CheckoutCartSummarySection.total}}" userInput="${{total}}" stepKey="assertTotal"/> | ||
</actionGroup> | ||
</actionGroups> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,4 +216,17 @@ | |
<data key="store_id">0</data> | ||
<data key="website_id">0</data> | ||
</entity> | ||
<entity name="Retailer_Customer" type="customer"> | ||
<data key="group_id">3</data> | ||
<data key="default_billing">true</data> | ||
<data key="default_shipping">true</data> | ||
<data key="email" unique="prefix">[email protected]</data> | ||
<data key="firstname">John</data> | ||
<data key="lastname">Doe</data> | ||
<data key="fullname">John Doe</data> | ||
<data key="password">pwdTest123!</data> | ||
<data key="store_id">0</data> | ||
<data key="website_id">0</data> | ||
<requiredEntity type="address">US_Address_CA</requiredEntity> | ||
</entity> | ||
</entities> |
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
22 changes: 22 additions & 0 deletions
22
app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminDeleteCartPriceRuleActionGroup.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,22 @@ | ||
<?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="AdminDeleteCartPriceRuleActionGroup"> | ||
<arguments> | ||
<argument name="ruleName" type="entity"/> | ||
</arguments> | ||
<amOnPage url="{{AdminCartPriceRulesPage.url}}" stepKey="goToCartPriceRules"/> | ||
<waitForPageLoad stepKey="waitForCartPriceRules"/> | ||
<fillField selector="{{AdminCartPriceRulesSection.filterByNameInput}}" userInput="{{ruleName.name}}" stepKey="filterByName"/> | ||
<click selector="{{AdminCartPriceRulesSection.searchButton}}" stepKey="doFilter"/> | ||
<click selector="{{AdminCartPriceRulesSection.rowByIndex('1')}}" stepKey="goToEditRulePage"/> | ||
<click selector="{{AdminCartPriceRulesFormSection.delete}}" stepKey="clickDeleteButton"/> | ||
<click selector="{{AdminCartPriceRulesFormSection.modalAcceptButton}}" stepKey="confirmDelete"/> | ||
</actionGroup> | ||
</actionGroups> |
46 changes: 46 additions & 0 deletions
46
...Test/Mftf/ActionGroup/SetCartAttributeConditionWithSegmentForCartPriceRuleActionGroup.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,46 @@ | ||
<?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"> | ||
<!--Set condition for Customer Segment--> | ||
<actionGroup name="SetCartAttributeConditionWithSegmentForCartPriceRuleActionGroup"> | ||
<arguments> | ||
<argument name="attributeName" type="string"/> | ||
<argument name="value" type="entity"/> | ||
</arguments> | ||
|
||
<scrollTo selector="{{AdminCartPriceRulesFormSection.conditionsHeader}}" stepKey="scrollToActionTab"/> | ||
<conditionalClick selector="{{AdminCartPriceRulesFormSection.conditionsHeader}}" dependentSelector="{{AdminCartPriceRulesFormSection.conditionsHeaderOpen}}" visible="false" stepKey="openActionTab"/> | ||
<click selector="{{AdminCartPriceRulesFormSection.conditions}}" stepKey="applyRuleForConditions"/> | ||
|
||
<waitForPageLoad stepKey="waitForDropDownOpened"/> | ||
<selectOption selector="{{AdminCartPriceRulesFormSection.childAttribute}}" userInput="{{attributeName}}" stepKey="selectAttribute"/> | ||
|
||
<waitForPageLoad time="20" stepKey="waitForOperator"/> | ||
<click selector="{{AdminCartPriceRulesFormSection.condition('...')}}" stepKey="clickToChooseOption1"/> | ||
<click selector="{{AdminCartPriceRulesFormSection.openList}}" stepKey="openList" /> | ||
<waitForPageLoad time="20" stepKey="waitForGrid"/> | ||
<fillField selector="{{AdminCartPriceRulesFormSection.searchSegmentName}}" userInput="{{value.name}}" stepKey="fillSegmentName"/> | ||
<click selector="{{AdminCartPriceRulesFormSection.searchButton}}" stepKey="clickButtonSearch"/> | ||
|
||
<waitForPageLoad stepKey="waitForResults"/> | ||
<checkOption selector="{{AdminCartPriceRulesFormSection.selectAll}}" stepKey="checkAll"/> | ||
<waitForPageLoad stepKey="waitForChecking"/> | ||
<moveMouseOver selector="{{AdminCartPriceRulesFormSection.setSegment}}" stepKey="moveOnButton"/> | ||
<click selector="{{AdminCartPriceRulesFormSection.setSegment}}" stepKey="setCustomerSegment"/> | ||
<click selector="{{AdminMainActionsSection.saveAndContinue}}" stepKey="clickSaveButton"/> | ||
<see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/> | ||
</actionGroup> | ||
<actionGroup name="SetCartAttributeConditionWhenMatchForCartPriceRuleActionGroup" extends="SetCartAttributeConditionWithSegmentForCartPriceRuleActionGroup"> | ||
<arguments> | ||
<argument name="operatorType" type="string" defaultValue="matches"/> | ||
</arguments> | ||
<click selector="{{AdminCartPriceRulesFormSection.condition('matches')}}" stepKey="clickToChooseOption" after="waitForOperator"/> | ||
<selectOption userInput="{{operatorType}}" selector="{{AdminCartPriceRulesFormSection.conditionsOperator}}" stepKey="setOperatorType" after="clickToChooseOption"/> | ||
</actionGroup> | ||
</actionGroups> |
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