Skip to content

Commit 703252f

Browse files
committed
Merge branches 'MC-4765' and 'mtf-eol' of github.com:magento-pangolin/magento2ce into MC-4765
# Conflicts: # app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerCreateNewOrderSection.xml
2 parents bf46e74 + 06de7e3 commit 703252f

File tree

75 files changed

+2334
-221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+2334
-221
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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="AssertOrderGraphImageOnDashboardActionGroup">
12+
<click selector="{{AdminDashboardSection.ordersTab}}" stepKey="clickOrdersBtn"/>
13+
<seeElement selector="{{AdminDashboardSection.ordersChart}}" stepKey="seeGraphImage"/>
14+
</actionGroup>
15+
</actionGroups>

app/code/Magento/Backend/Test/Mftf/Page/AdminDashboardPage.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
1111
<page name="AdminDashboardPage" url="admin/dashboard/" area="admin" module="Magento_Backend">
1212
<section name="AdminMenuSection"/>
13+
<section name="AdminDashboardSection"/>
1314
</page>
1415
</pages>

app/code/Magento/Backend/Test/Mftf/Section/AdminDashboardSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminDashboardSection">
12+
<element name="ordersTab" type="button" selector="#diagram_tab_orders"/>
13+
<element name="ordersChart" type="button" selector="#diagram_tab_orders_content .dashboard-diagram-image img"/>
1214
<element name="dashboardDiagramContent" type="button" selector="#diagram_tab_content"/>
1315
<element name="dashboardDiagramOrderContentTab" type="block" selector="#diagram_tab_orders_content"/>
1416
<element name="dashboardDiagramAmounts" type="button" selector="#diagram_tab_amounts"/>

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryProductSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
<element name="ProductTitleByName" type="button" selector="//main//li//a[contains(text(), '{{var1}}')]" parameterized="true"/>
2323
<element name="ProductPriceByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//span[@class='price']" parameterized="true"/>
24+
<element name="ProductCatalogRuleSpecialPriceTitleByName" type="text" selector="//div[descendant::*[contains(text(), '{{var1}}')]]//*[contains(@class, 'special-price')]" parameterized="true"/>
25+
<element name="ProductCatalogRulePriceTitleByName" type="text" selector="//div[descendant::*[contains(text(), '{{var1}}')]]//*[contains(@class, 'price-label')]" parameterized="true"/>
2426
<element name="ProductImageByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//img[@class='product-image-photo']" parameterized="true"/>
2527
<element name="ProductImageBySrc" type="text" selector=".products-grid img[src*='{{pattern}}']" parameterized="true"/>
2628
<element name="ProductInfoByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//div[@class='product-item-info']" parameterized="true"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteAttributeSetTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<stories value="Attribute sets"/>
1414
<title value="Delete Attribute Set"/>
1515
<description value="Admin should be able to delete an attribute set"/>
16-
<testCaseId value="MC-4413"/>
16+
<testCaseId value="MC-10889"/>
1717
<severity value="CRITICAL"/>
1818
<group value="mtf_migrated"/>
1919
</annotations>

app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/CatalogPriceRuleActionGroup.xml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<arguments>
1414
<argument name="catalogRule" defaultValue="_defaultCatalogRule"/>
1515
</arguments>
16+
1617
<!-- Go to the admin Catalog rule grid and add a new one -->
1718
<amOnPage stepKey="goToPriceRulePage" url="{{CatalogRulePage.url}}"/>
1819
<waitForPageLoad stepKey="waitForPriceRulePage"/>
@@ -36,7 +37,6 @@
3637
<waitForPageLoad stepKey="waitForApplied"/>
3738
</actionGroup>
3839

39-
4040
<actionGroup name="createCatalogPriceRule">
4141
<arguments>
4242
<argument name="catalogRule" defaultValue="_defaultCatalogRule"/>
@@ -53,6 +53,26 @@
5353
<waitForPageLoad stepKey="waitForApplied"/>
5454
</actionGroup>
5555

56+
<actionGroup name="CreateCatalogPriceRuleViaTheUi">
57+
<arguments>
58+
<argument name="catalogRule" defaultValue="_defaultCatalogRule"/>
59+
<argument name="customerGroup" defaultValue="General" type="string"/>
60+
<argument name="disregardRules" defaultValue="Yes" type="string"/>
61+
</arguments>
62+
63+
<fillField selector="{{AdminNewCatalogPriceRule.ruleName}}" userInput="{{catalogRule.name}}" stepKey="fillName1"/>
64+
<fillField selector="{{AdminNewCatalogPriceRule.description}}" userInput="{{catalogRule.description}}" stepKey="fillDescription1"/>
65+
<selectOption selector="{{AdminNewCatalogPriceRule.websites}}" userInput="{{catalogRule.website_ids[0]}}" stepKey="selectWebSite1"/>
66+
<selectOption selector="{{AdminNewCatalogPriceRule.customerGroups}}" userInput="{{customerGroup}}" stepKey="selectCustomerGroup1"/>
67+
<scrollTo selector="{{AdminNewCatalogPriceRule.actionsTab}}" stepKey="scrollToActionTab1"/>
68+
<click selector="{{AdminNewCatalogPriceRule.actionsTab}}" stepKey="openActionDropdown1"/>
69+
<selectOption selector="{{AdminNewCatalogPriceRuleActions.apply}}" userInput="{{catalogRule.simple_action}}" stepKey="discountType1"/>
70+
<fillField selector="{{AdminNewCatalogPriceRuleActions.discountAmount}}" userInput="{{catalogRule.discount_amount}}" stepKey="fillDiscountValue1"/>
71+
<selectOption selector="{{AdminNewCatalogPriceRuleActions.disregardRules}}" userInput="{{disregardRules}}" stepKey="discardSubsequentRules1"/>
72+
<waitForPageLoad stepKey="waitForPageToLoad1"/>
73+
<scrollToTopOfPage stepKey="scrollToTop1"/>
74+
</actionGroup>
75+
5676
<actionGroup name="CreateCatalogPriceRuleConditionWithAttribute">
5777
<arguments>
5878
<argument name="attributeName" type="string"/>
@@ -70,6 +90,7 @@
7090
<click selector="{{AdminNewCatalogPriceRule.fromDateButton}}" stepKey="clickFromCalender"/>
7191
<click selector="{{AdminNewCatalogPriceRule.todayDate}}" stepKey="clickFromToday"/>
7292
</actionGroup>
93+
7394
<!-- Apply all of the saved catalog price rules -->
7495
<actionGroup name="applyCatalogPriceRules">
7596
<amOnPage stepKey="goToPriceRulePage" url="{{CatalogRulePage.url}}"/>

app/code/Magento/CatalogRule/Test/Mftf/Data/CatalogRuleData.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
<data key="simple_action">by_percent</data>
9595
<data key="discount_amount">10</data>
9696
</entity>
97+
9798
<entity name="InactiveCatalogRule" type="catalogRule">
9899
<data key="name" unique="suffix">InactiveCatalogRule</data>
99100
<data key="description">Inactive Catalog Price Rule Description</data>
@@ -121,4 +122,39 @@
121122
<data key="simple_action">by_percent</data>
122123
<data key="discount_amount">0</data>
123124
</entity>
125+
126+
<entity name="ActiveCatalogPriceRuleWithConditions" type="catalogRule">
127+
<data key="name" unique="suffix">Active Catalog Rule with conditions </data>
128+
<data key="description">Rule Description</data>
129+
<data key="is_active">1</data>
130+
<array key="customer_group_ids">
131+
<item>0</item>
132+
<item>1</item>
133+
<item>2</item>
134+
<item>3</item>
135+
</array>
136+
<array key="website_ids">
137+
<item>1</item>
138+
</array>
139+
<data key="simple_action">by_percent</data>
140+
<data key="discount_amount">10</data>
141+
</entity>
142+
143+
<!-- DO NOT USE IN OTHER TESTS AS IT WILL BREAK THE EXISTING TESTS -->
144+
<entity name="DeleteActiveCatalogPriceRuleWithConditions" type="catalogRule">
145+
<data key="name" unique="suffix">Delete Active Catalog Rule with conditions </data>
146+
<data key="description">Rule Description</data>
147+
<data key="is_active">1</data>
148+
<array key="customer_group_ids">
149+
<item>0</item>
150+
<item>1</item>
151+
<item>2</item>
152+
<item>3</item>
153+
</array>
154+
<array key="website_ids">
155+
<item>1</item>
156+
</array>
157+
<data key="simple_action">by_percent</data>
158+
<data key="discount_amount">10</data>
159+
</entity>
124160
</entities>

0 commit comments

Comments
 (0)