Skip to content

Commit 9845b2b

Browse files
authored
Merge pull request #3465 from magento-epam/EPAM-PR-19
Fixed issues: MAGETWO-62728 My Wishlist - quantity input box issue MAGETWO-91658 Wrong Checkout Totals Sort Order in cart MAGETWO-71022 After return "RMA" is complete in Admin, "remaining quantity" in customer account shows incorrect value MAGETWO-91537 [2.3] Search synonyms results missing for words including hyphen and numbers MAGETWO-91725 Reward Points Balance Update Emails are not being sent when balance change initiated by store front MAGETWO-91707 [Sigma Beauty]Cannot pause Youtube video in IE 11 MAGETWO-91596 Making order in admin with grouped product by adding it by sku with empty qty field leads to unability to order MAGETWO-91784 On Payment screen using Credit Card checkout, up and down arrow key allow to add -ve numbers also.. MAGETWO-91496 Instantiating WYSIWYG in DynamicRows MAGETWO-91651 Navigation Menu problem on Mobile theme
2 parents 7610692 + 3d1ad62 commit 9845b2b

File tree

23 files changed

+317
-62
lines changed

23 files changed

+317
-62
lines changed

app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,14 @@
158158
<see userInput="${{total}}" selector="{{CheckoutPaymentSection.orderSummaryTotal}}" stepKey="assertTotal"/>
159159
</actionGroup>
160160

161+
<actionGroup name="CheckTotalsSortOrderInSummarySection">
162+
<arguments>
163+
<argument name="elementName" type="string"/>
164+
<argument name="positionNumber" type="integer"/>
165+
</arguments>
166+
<see userInput="{{elementName}}" selector="{{CheckoutCartSummarySection.elementPosition(positionNumber)}}" stepKey="assertElementPosition"/>
167+
</actionGroup>
168+
161169
<!-- Check ship to information in checkout -->
162170
<actionGroup name="CheckShipToInformationInCheckoutActionGroup">
163171
<arguments>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartSummarySection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="CheckoutCartSummarySection">
12+
<element name="elementPosition" type="text" selector=".data.table.totals > tbody tr:nth-of-type({{value}}) > th" parameterized="true"/>
1213
<element name="subtotal" type="text" selector="//*[@id='cart-totals']//tr[@class='totals sub']//td//span[@class='price']"/>
1314
<element name="shippingMethodForm" type="text" selector="#co-shipping-method-form"/>
1415
<element name="shippingMethod" type="text" selector="//*[@id='cart-totals']//tr[@class='totals shipping excl']//th//span[@class='value']"/>

app/code/Magento/Customer/Model/Metadata/CustomerMetadata.php

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,30 @@ class CustomerMetadata implements CustomerMetadataInterface
3333
*/
3434
private $attributeMetadataDataProvider;
3535

36+
/**
37+
* List of system attributes which should be available to the clients.
38+
*
39+
* @var string[]
40+
*/
41+
private $systemAttributes;
42+
3643
/**
3744
* @param AttributeMetadataConverter $attributeMetadataConverter
3845
* @param AttributeMetadataDataProvider $attributeMetadataDataProvider
46+
* @param string[] $systemAttributes
3947
*/
4048
public function __construct(
4149
AttributeMetadataConverter $attributeMetadataConverter,
42-
AttributeMetadataDataProvider $attributeMetadataDataProvider
50+
AttributeMetadataDataProvider $attributeMetadataDataProvider,
51+
array $systemAttributes = []
4352
) {
4453
$this->attributeMetadataConverter = $attributeMetadataConverter;
4554
$this->attributeMetadataDataProvider = $attributeMetadataDataProvider;
55+
$this->systemAttributes = $systemAttributes;
4656
}
4757

4858
/**
49-
* {@inheritdoc}
59+
* @inheritdoc
5060
*/
5161
public function getAttributes($formCode)
5262
{
@@ -67,7 +77,7 @@ public function getAttributes($formCode)
6777
}
6878

6979
/**
70-
* {@inheritdoc}
80+
* @inheritdoc
7181
*/
7282
public function getAttributeMetadata($attributeCode)
7383
{
@@ -92,7 +102,7 @@ public function getAttributeMetadata($attributeCode)
92102
}
93103

94104
/**
95-
* {@inheritdoc}
105+
* @inheritdoc
96106
*/
97107
public function getAllAttributesMetadata()
98108
{
@@ -116,7 +126,7 @@ public function getAllAttributesMetadata()
116126
}
117127

118128
/**
119-
* {@inheritdoc}
129+
* @inheritdoc
120130
*/
121131
public function getCustomAttributesMetadata($dataObjectClassName = self::DATA_INTERFACE_NAME)
122132
{
@@ -134,9 +144,10 @@ public function getCustomAttributesMetadata($dataObjectClassName = self::DATA_IN
134144
$isDataObjectMethod = isset($this->customerDataObjectMethods['get' . $camelCaseKey])
135145
|| isset($this->customerDataObjectMethods['is' . $camelCaseKey]);
136146

137-
/** Even though disable_auto_group_change is system attribute, it should be available to the clients */
138147
if (!$isDataObjectMethod
139-
&& (!$attributeMetadata->isSystem() || $attributeCode == 'disable_auto_group_change')
148+
&& (!$attributeMetadata->isSystem()
149+
|| in_array($attributeCode, $this->systemAttributes)
150+
)
140151
) {
141152
$customAttributes[] = $attributeMetadata;
142153
}

app/code/Magento/Customer/etc/di.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@
127127
<argument name="groupManagement" xsi:type="object">Magento\Customer\Api\GroupManagementInterface\Proxy</argument>
128128
</arguments>
129129
</type>
130+
<type name="Magento\Customer\Model\Metadata\CustomerMetadata">
131+
<arguments>
132+
<argument name="systemAttributes" xsi:type="array">
133+
<item name="disable_auto_group_change" xsi:type="string">disable_auto_group_change</item>
134+
</argument>
135+
</arguments>
136+
</type>
130137
<virtualType name="SectionInvalidationConfigReader" type="Magento\Framework\Config\Reader\Filesystem">
131138
<arguments>
132139
<argument name="idAttributes" xsi:type="array">

app/code/Magento/Payment/view/base/web/js/model/credit-card-validation/credit-card-number-validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ define([
3636
return resultWrapper(null, false, false);
3737
}
3838

39-
value = value.replace(/\-|\s/g, '');
39+
value = value.replace(/|\s/g, '');
4040

4141
if (!/^\d*$/.test(value)) {
4242
return resultWrapper(null, false, false);

app/code/Magento/Payment/view/base/web/js/model/credit-card-validation/validator.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
}(function ($, cvvValidator, creditCardNumberValidator, yearValidator, monthValidator, creditCardData) {
2424
'use strict';
2525

26+
$('.payment-method-content input[type="number"]').on('keyup', function () {
27+
if ($(this).val() < 0) {
28+
$(this).val($(this).val().replace(/^-/, ''));
29+
}
30+
});
31+
2632
$.each({
2733
'validate-card-type': [
2834
function (number, item, allowedTypes) {

app/code/Magento/ProductVideo/Test/Mftf/Section/StorefrontProductInfoMainSection.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontProductInfoMainSection">
1212
<element name="productVideo" type="text" selector="//*[@class='product-video' and @data-type='{{videoType}}']" parameterized="true"/>
13+
<element name="clickInVideo" type="video" selector="//*[@class='fotorama__stage__shaft']"/>
14+
<element name="videoPausedMode" type="video" selector="//*[contains(@class, 'paused-mode')]"/>
15+
<element name="videoPlayedMode" type="video" selector="//*[contains(@class,'playing-mode')]"/>
16+
<element name="frameVideo" type="video" selector="widget2"/>
1317
</section>
1418
</sections>
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
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="YoutubeVideoWindowOnProductPageTest">
12+
<annotations>
13+
<features value="ProductVideo"/>
14+
<stories value="MAGETWO-91707: [Sigma Beauty]Cannot pause Youtube video in IE 11"/>
15+
<testCaseId value="MAGETWO-95254"/>
16+
<title value="Youtube video window on the product page"/>
17+
<description value="Check Youtube video window on the product page"/>
18+
<severity value="MAJOR"/>
19+
<group value="ProductVideo"/>
20+
</annotations>
21+
22+
<before>
23+
<!--Log In-->
24+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
25+
<!--Create category-->
26+
<createData entity="_defaultCategory" stepKey="createCategory"/>
27+
<!--Create product-->
28+
<createData entity="SimpleProduct" stepKey="createProduct">
29+
<requiredEntity createDataKey="createCategory"/>
30+
</createData>
31+
<!-- Set product video Youtube api key configuration -->
32+
<createData entity="ProductVideoYoutubeApiKeyConfig" stepKey="setStoreConfig" after="loginAsAdmin"/>
33+
</before>
34+
35+
<!--Open simple product-->
36+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductIndex"/>
37+
<waitForPageLoad stepKey="wait1"/>
38+
<actionGroup ref="resetProductGridToDefaultView" stepKey="resetProductGrid"/>
39+
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku">
40+
<argument name="product" value="$$createProduct$$"/>
41+
</actionGroup>
42+
<actionGroup ref="openProducForEditByClickingRowXColumnYInProductGrid" stepKey="openFirstProductForEdit"/>
43+
44+
<!-- Add product video -->
45+
<actionGroup ref="addProductVideo" stepKey="addProductVideo" after="openFirstProductForEdit"/>
46+
<!-- Assert product video in admin product form -->
47+
<actionGroup ref="assertProductVideoAdminProductPage" stepKey="assertProductVideoAdminProductPage" after="addProductVideo"/>
48+
49+
<!-- Save the product -->
50+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveFirstProduct"/>
51+
<waitForPageLoad stepKey="waitForFirstProductSaved"/>
52+
53+
<!-- Assert product video in storefront product page -->
54+
<amOnPage url="$$createProduct.name$$.html" stepKey="goToStorefrontCategoryPage"/>
55+
<waitForPageLoad stepKey="waitForStorefrontPageLoaded"/>
56+
<actionGroup ref="assertProductVideoStorefrontProductPage" stepKey="assertProductVideoStorefrontProductPage" after="waitForStorefrontPageLoaded"/>
57+
58+
<!--Click Play video button-->
59+
<click stepKey="clickToPlayVideo" selector="{{StorefrontProductInfoMainSection.clickInVideo}}"/>
60+
<wait stepKey="waitFiveSecondToPlayVideo" time="5"/>
61+
<switchToIFrame selector="{{StorefrontProductInfoMainSection.frameVideo}}" stepKey="switchToFrame"/>
62+
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.videoPlayedMode}}" stepKey="waitForVideoPlayed"/>
63+
<seeElement selector="{{StorefrontProductInfoMainSection.videoPlayedMode}}" stepKey="AssertVideoIsPlayed"/>
64+
<switchToIFrame stepKey="switchBack1"/>
65+
66+
<!--Click Pause button-->
67+
<click stepKey="clickToStopVideo" selector="{{StorefrontProductInfoMainSection.clickInVideo}}"/>
68+
<wait stepKey="waitFiveSecondToStopVideo" time="5"/>
69+
<switchToIFrame selector="{{StorefrontProductInfoMainSection.frameVideo}}" stepKey="switchToFrame2"/>
70+
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.videoPausedMode}}" stepKey="waitForVideoPaused"/>
71+
<seeElement selector="{{StorefrontProductInfoMainSection.videoPausedMode}}" stepKey="AssertVideoIsPaused"/>
72+
<switchToIFrame stepKey="switchBack2"/>
73+
74+
<!--Click Play video button again. Make sure that Video continued playing-->
75+
<click stepKey="clickAgainToPlayVideo" selector="{{StorefrontProductInfoMainSection.clickInVideo}}"/>
76+
<wait stepKey="waitAgainFiveSecondToPlayVideo" time="5"/>
77+
<switchToIFrame selector="{{StorefrontProductInfoMainSection.frameVideo}}" stepKey="switchToFrame3"/>
78+
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.videoPlayedMode}}" stepKey="waitForVideoPlayedAgain"/>
79+
<seeElement selector="{{StorefrontProductInfoMainSection.videoPlayedMode}}" stepKey="AssertVideoIsPlayedAgain"/>
80+
<switchToIFrame stepKey="switchBack3"/>
81+
82+
<after>
83+
<deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/>
84+
<deleteData createDataKey="createCategory" stepKey="deleteCategoryFirst"/>
85+
<!-- Set product video configuration to default -->
86+
<createData entity="DefaultProductVideoConfig" stepKey="setStoreDefaultConfig" before="logout"/>
87+
<!--Log Out-->
88+
<actionGroup ref="logout" stepKey="logout"/>
89+
</after>
90+
</test>
91+
</tests>
92+

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,16 @@
3838
</arguments>
3939
<see selector="{{AdminInvoiceItemsSection.skuColumn}}" userInput="{{product.sku}}" stepKey="seeProductSkuInGrid"/>
4040
</actionGroup>
41+
42+
<actionGroup name="goToInvoiceIntoOrder">
43+
<click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceAction"/>
44+
<seeInCurrentUrl url="{{AdminInvoiceNewPage.url}}" stepKey="seeOrderInvoiceUrl"/>
45+
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Invoice" stepKey="seePageNameNewInvoicePage"/>
46+
</actionGroup>
47+
48+
<actionGroup name="submitInvoiceIntoOrder">
49+
<click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="clickSubmitInvoice"/>
50+
<seeInCurrentUrl url="{{AdminOrderDetailsPage.url}}" stepKey="seeViewOrderPageInvoice"/>
51+
<see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeInvoiceCreateSuccess"/>
52+
</actionGroup>
4153
</actionGroups>

app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormAccountSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
<element name="email" type="input" selector="#email"/>
1414
<element name="requiredGroup" type="text" selector=".admin__field.required[data-ui-id='billing-address-fieldset-element-form-field-group-id']"/>
1515
<element name="requiredEmail" type="text" selector=".admin__field.required[data-ui-id='billing-address-fieldset-element-form-field-email']"/>
16+
<element name="defaultGeneral" type="text" selector="//*[contains(text(),'General')]" time="15"/>
1617
</section>
1718
</sections>

0 commit comments

Comments
 (0)