Skip to content

Commit f87bba6

Browse files
authored
Merge pull request #130 from magento-pangolin/MC-4767
MC-4767
2 parents b339504 + 6e60e41 commit f87bba6

20 files changed

+554
-1
lines changed

app/code/Magento/Bundle/Test/Mftf/Section/AdminProductFormBundleSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@
4141
<element name="contentDropDownIfNotShowing" type="button" selector="//div[@data-index='content']//div[contains(@class, '_hide')]"/>
4242
<element name="longDescription" type="input" selector="#product_form_description"/>
4343
<element name="shortDescription" type="input" selector="#product_form_short_description"/>
44-
<!--BundleOptinsDropDown-->
44+
<!--BundleOptionsDropDown-->
4545
<element name="bundleOptionsDropDown" type="button" selector="div[data-index='bundle-items']" timeout="30"/>
46+
<element name="currentBundleOption" type="text" selector="//div[@data-index='bundle-items']//div[contains(@class, 'admin__collapsible-title')]/span"/>
4647
<!--AddingAnOption-->
4748
<element name="addOptions" type="button" selector="//tr[@data-repeat-index='0']//td[4]" timeout="30"/>
4849
<!--SEODropdownTab-->

app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
<element name="productQuantity" type="input" selector=".admin__control-text[name='product[quantity_and_stock_status][qty]']"/>
4646
<element name="currentVariationsQuantityCells" type="button" selector="td[data-index='quantity_container']"/>
4747
<element name="rowByCode" type="textarea" selector="//span[contains(text(), '{{var1}}-{{var2}}')]//ancestor-or-self::tr" parameterized="true"/>
48+
<element name="currentAttribute" type="text" selector="//fieldset[@class='admin__fieldset']/div[contains(@class, 'admin__field _disabled')]//span"/>
4849
</section>
4950
<section name="AdminConfigurableProductSelectAttributesSlideOut">
5051
<element name="grid" type="button" selector=".admin__data-grid-wrap tbody"/>

app/code/Magento/Downloadable/Test/Mftf/Data/ProductData.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,20 @@
7474
<requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity>
7575
<requiredEntity type="downloadable_link">apiDownloadableLink</requiredEntity>
7676
</entity>
77+
<entity name="DownloadableProductWithTwoLink100" type="product">
78+
<data key="sku" unique="suffix">downloadableproduct</data>
79+
<data key="type_id">downloadable</data>
80+
<data key="attribute_set_id">4</data>
81+
<data key="name" unique="suffix">DownloadableProduct</data>
82+
<data key="price">50.99</data>
83+
<data key="quantity">100</data>
84+
<data key="weight">0</data>
85+
<data key="status">1</data>
86+
<data key="is_shareable">0</data>
87+
<data key="urlKey" unique="suffix">downloadableproduct</data>
88+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
89+
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
90+
<requiredEntity type="downloadable_link">downloadableLink1</requiredEntity>
91+
<requiredEntity type="downloadable_link">downloadableLink2</requiredEntity>
92+
</entity>
7793
</entities>
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="AdminAddToOrderBundleProductActionGroup">
12+
<arguments>
13+
<argument name="option" type="string"/>
14+
<argument name="selectedProductName" type="string"/>
15+
<argument name="quantity" type="string"/>
16+
</arguments>
17+
<scrollTo selector="{{AdminOrderFormConfigureProductSection.bundleItems}}" stepKey="scroll"/>
18+
<click selector="{{AdminOrderFormConfigureProductSection.bundleItems}}" stepKey="focusOnSideDialog"/>
19+
<waitForAjaxLoad stepKey="waitForAjax"/>
20+
<click selector="{{AdminOrderFormConfigureProductSection.bundleSelect(option)}}" stepKey="clickSelector"/>
21+
<selectOption selector="{{AdminOrderFormConfigureProductSection.bundleSelect(option)}}" userInput="{{selectedProductName}}" stepKey="selectionOption"/>
22+
<waitForAjaxLoad stepKey="waitForAjaxLoad"/>
23+
<fillField userInput="{{quantity}}" selector="{{AdminOrderFormConfigureProductSection.quantity}}" stepKey="fillQty"/>
24+
<click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOkConfigurablePopover"/>
25+
<scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/>
26+
<click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/>
27+
</actionGroup>
28+
</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="AdminAddToOrderConfigurableProductActionGroup">
12+
<arguments>
13+
<argument name="attribute" type="string"/>
14+
<argument name="option" type="string"/>
15+
<argument name="quantity" type="string"/>
16+
</arguments>
17+
<scrollTo selector="{{AdminOrderFormConfigureProductSection.associatedProducts}}" stepKey="scroll"/>
18+
<click selector="{{AdminOrderFormConfigureProductSection.associatedProducts}}" stepKey="focusOnSideDialog"/>
19+
<waitForAjaxLoad stepKey="waitForAjax"/>
20+
<click selector="{{AdminOrderFormConfigureProductSection.optionSelectNew(attribute)}}" stepKey="clickSelector"/>
21+
<selectOption selector="{{AdminOrderFormConfigureProductSection.optionSelectNew(attribute)}}" userInput="{{option}}" stepKey="selectionOption"/>
22+
<waitForAjaxLoad stepKey="waitForAjaxLoad"/>
23+
<fillField userInput="{{quantity}}" selector="{{AdminOrderFormConfigureProductSection.quantity}}" stepKey="fillQty"/>
24+
<click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOkConfigurablePopover"/>
25+
<scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/>
26+
<click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/>
27+
</actionGroup>
28+
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AdminAddToOrderCouponCodeActionGroup">
12+
<arguments>
13+
<argument name="couponCode" type="string"/>
14+
</arguments>
15+
<fillField userInput="{{couponCode}}" selector="{{AdminOrderFormDiscountSection.fieldCouponCode}}" stepKey="fillCouponCode"/>
16+
<click selector="{{AdminOrderFormDiscountSection.applyCouponCode}}" stepKey="clickApply"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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="AdminAddToOrderDownloadableProductActionGroup">
12+
<arguments>
13+
<argument name="link" type="string"/>
14+
<argument name="quantity" type="string" defaultValue="1"/>
15+
</arguments>
16+
<scrollTo selector="{{AdminOrderFormConfigureProductSection.downloadableInformation}}" stepKey="scroll"/>
17+
<click selector="{{AdminOrderFormConfigureProductSection.downloadableInformation}}" stepKey="focusOnSideDialog"/>
18+
<waitForAjaxLoad stepKey="waitForAjax"/>
19+
<checkOption selector="{{AdminOrderFormConfigureProductSection.checkLinkDownloadableProduct(link)}}" stepKey="checkLink"/>
20+
<waitForAjaxLoad stepKey="waitForAjaxLoad"/>
21+
<fillField userInput="{{quantity}}" selector="{{AdminOrderFormConfigureProductSection.quantity}}" stepKey="fillQty"/>
22+
<click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOkConfigurablePopover"/>
23+
<scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/>
24+
<click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/>
25+
</actionGroup>
26+
</actionGroups>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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="AdminFilterProductInCreateOrderActionGroup">
12+
<arguments>
13+
<argument name="productSKU" type="string"/>
14+
</arguments>
15+
<click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
16+
<fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{productSKU}}" stepKey="fillSkuFilter"/>
17+
<click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchConfigurable"/>
18+
<scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/>
19+
<checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectProduct"/>
20+
<waitForLoadingMaskToDisappear stepKey="waitForLoading"/>
21+
</actionGroup>
22+
</actionGroups>

app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminSubmitOrderActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="AdminSubmitOrderActionGroup">
1212
<click selector="{{OrdersGridSection.submitOrder}}" stepKey="submitOrder"/>
13+
<waitForPageLoad stepKey="waitForPageLoad"/>
1314
<see stepKey="seeSuccessMessageForOrder" userInput="You created the order."/>
1415
</actionGroup>
1516
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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="AssertSalesPrintOrderBillingAddress">
12+
<arguments>
13+
<argument name="address" type="entity"/>
14+
</arguments>
15+
<see userInput="{{address.firstname}}" selector="{{StorefrontOrderDetailsSection.billingAddressBlock}}" stepKey="seeFirstname"/>
16+
<see userInput="{{address.lastname}}" selector="{{StorefrontOrderDetailsSection.billingAddressBlock}}" stepKey="seeLastname"/>
17+
<see userInput="{{address.company}}" selector="{{StorefrontOrderDetailsSection.billingAddressBlock}}" stepKey="seeCompany"/>
18+
<see userInput="{{address.street[0]}}" selector="{{StorefrontOrderDetailsSection.billingAddressBlock}}" stepKey="seeStreet"/>
19+
<see userInput="{{address.city}}" selector="{{StorefrontOrderDetailsSection.billingAddressBlock}}" stepKey="seeCity"/>
20+
<see userInput="{{address.state}}" selector="{{StorefrontOrderDetailsSection.billingAddressBlock}}" stepKey="seeState"/>
21+
<see userInput="{{address.postcode}}" selector="{{StorefrontOrderDetailsSection.billingAddressBlock}}" stepKey="seePostcode"/>
22+
<see userInput="{{address.country}}" selector="{{StorefrontOrderDetailsSection.billingAddressBlock}}" stepKey="seeCountry"/>
23+
<see userInput="{{address.telephone}}" selector="{{StorefrontOrderDetailsSection.billingAddressBlock}}" stepKey="seeTelephone"/>
24+
</actionGroup>
25+
</actionGroups>

0 commit comments

Comments
 (0)