Skip to content

Commit 5844ade

Browse files
authored
Merge pull request #8032 from magento-gl/Spartans_246_quality_mainlinepr
Spartans 246 quality mainlinepr
2 parents 2b2043e + d23d16a commit 5844ade

File tree

3 files changed

+94
-2
lines changed

3 files changed

+94
-2
lines changed

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ $blockId = $block->getId();
7070
7171
require([
7272
"jquery",
73-
"mage/mage"
73+
"mage/validation"
7474
], function(jQuery){
7575
jQuery('.product_composite_configure_form').each(function () {
76-
jQuery(this).mage('form').mage('validation');
76+
jQuery(this).validation({errorElement: 'label'}).valid();
7777
});
7878
});
7979
script;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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="AddConfigurableProductToOrderPressKeyEnterActionGroup">
12+
<annotations>
13+
<description>Adds the provided Configurable Product with the provided Option to an Order. Fills in the provided Product Qty. Clicks on 'Add Selected Product(s) to Order'.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="product"/>
17+
<argument name="attribute"/>
18+
<argument name="option"/>
19+
<argument name="quantity" type="string"/>
20+
</arguments>
21+
22+
<scrollToTopOfPage stepKey="scrollToTopOfThePage"/>
23+
<waitForElementVisible selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="waitForAddProductsButton"/>
24+
<click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
25+
<fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilterConfigurable"/>
26+
<click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchConfigurable"/>
27+
<scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/>
28+
<checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectConfigurableProduct"/>
29+
<waitForElementVisible selector="{{AdminOrderFormConfigureProductSection.optionSelect(attribute.default_label)}}" stepKey="waitForConfigurablePopover"/>
30+
<wait time="2" stepKey="waitForOptionsToLoad"/>
31+
<selectOption selector="{{AdminOrderFormConfigureProductSection.optionSelect(attribute.default_label)}}" userInput="{{option.name}}" stepKey="selectionConfigurableOption"/>
32+
<fillField userInput="{{quantity}}" selector="{{AdminOrderFormConfigureProductSection.quantity}}" stepKey="fillQty"/>
33+
<wait time="2" stepKey="waitForValidateOptions"/>
34+
<!--Press Key ENTER-->
35+
<pressKey selector="{{AdminOrderFormConfigureProductSection.quantity}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::ENTER]" stepKey="pressKeyEnter"/>
36+
<scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/>
37+
<click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/>
38+
</actionGroup>
39+
</actionGroups>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminCreateOrderWithConfigurableProductPressKeyEnterTest">
12+
<annotations>
13+
<title value="Create Order in Admin with configurable product with pressing enter key in option select modal."/>
14+
<stories value="Create Order in Admin with configurable product with pressing enter key"/>
15+
<description value="Create order with configurable product with pressing enter key in option select modal."/>
16+
<features value="Sales"/>
17+
<severity value="MAJOR"/>
18+
<group value="Sales"/>
19+
</annotations>
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
22+
<createData entity="_defaultCategory" stepKey="createCategory"/>
23+
<actionGroup ref="CreateConfigurableProductActionGroup" stepKey="createConfigurableProduct">
24+
<argument name="product" value="_defaultProduct"/>
25+
<argument name="category" value="$$createCategory$$"/>
26+
</actionGroup>
27+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
28+
</before>
29+
<actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderWithExistingCustomer">
30+
<argument name="customer" value="$$createCustomer$$"/>
31+
</actionGroup>
32+
<actionGroup ref="AddConfigurableProductToOrderPressKeyEnterActionGroup" stepKey="addFirstConfigurableProductToOrder">
33+
<argument name="product" value="_defaultProduct"/>
34+
<argument name="attribute" value="colorProductAttribute"/>
35+
<argument name="option" value="colorProductAttribute1"/>
36+
<argument name="quantity" value="1"/>
37+
</actionGroup>
38+
<actionGroup ref="SelectCashOnDeliveryPaymentMethodActionGroup" stepKey="selectPaymentMethod"/>
39+
<actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/>
40+
<actionGroup ref="VerifyCreatedOrderInformationActionGroup" stepKey="verifyCreatedOrderInformation"/>
41+
<after>
42+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
43+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
44+
<actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteConfigurableProduct">
45+
<argument name="sku" value="{{_defaultProduct.sku}}"/>
46+
</actionGroup>
47+
<magentoCLI stepKey="reindex" command="indexer:reindex"/>
48+
<magentoCLI stepKey="flushCache" command="cache:flush"/>
49+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
50+
</after>
51+
52+
</test>
53+
</tests>

0 commit comments

Comments
 (0)