Skip to content

Commit ea30f6f

Browse files
author
Alexander Akimov
authored
Merge pull request #2980 from magento-tsg/2.2-develop-pr39
[TSG] Backporting for 2.2 (pr39) (2.2.7)
2 parents 5314307 + ea24f1e commit ea30f6f

File tree

11 files changed

+30
-23
lines changed

11 files changed

+30
-23
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
<element name="useDefaultOptionTitle" type="text" selector="[data-index='options'] tr.data-row [data-index='title'] [name^='options_use_default']"/>
1515
<element name="useDefaultOptionValueTitleByIndex" type="text" selector="[data-index='options'] [data-index='values'] tr[data-repeat-index='{{var1}}'] [name^='options_use_default']" parameterized="true"/>
1616
<element name="addOptionBtn" type="button" selector="button[data-index='button_add']"/>
17-
<element name="fillOptionTitle" type="input" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//span[text()='Option Title']/parent::label/parent::div//input[@class='admin__control-text']" parameterized="true"/>
18-
<element name="checkSelect" type="select" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//span[text()='Option Type']/parent::label/parent::div//div[@data-role='selected-option']" parameterized="true"/>
17+
<element name="fillOptionTitle" type="input" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//label[text()='Option Title']/parent::span/parent::div//input[@class='admin__control-text']" parameterized="true"/>
18+
<element name="checkSelect" type="select" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//label[text()='Option Type']/parent::span/parent::div//div[@data-role='selected-option']" parameterized="true"/>
1919
<element name="checkDropDown" type="select" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//parent::label/parent::div//li[@class='admin__action-multiselect-menu-inner-item']//label[text()='Drop-down']" parameterized="true"/>
2020
<element name="clickAddValue" type="button" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//tfoot//button" parameterized="true"/>
21-
<element name="fillOptionValueTitle" type="input" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//tbody/tr[@data-repeat-index='{{var2}}']//span[text()='Title']/parent::label/parent::div//div[@class='admin__field-control']/input" parameterized="true"/>
21+
<element name="fillOptionValueTitle" type="input" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//tbody/tr[@data-repeat-index='{{var2}}']//label[text()='Title']/parent::span/parent::div//div[@class='admin__field-control']/input" parameterized="true"/>
2222
<element name="fillOptionValuePrice" type="input" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//tbody/tr[@data-repeat-index='{{var2}}']//span[text()='Price']/parent::label/parent::div//div[@class='admin__control-addon']/input" parameterized="true"/>
23-
<element name="clickSelectPriceType" type="select" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//tbody//tr[@data-repeat-index='{{var2}}']//span[text()='Price Type']/parent::label/parent::div//select" parameterized="true"/>
23+
<element name="clickSelectPriceType" type="select" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//tbody//tr[@data-repeat-index='{{var2}}']//label[text()='Price Type']/parent::span/parent::div//select" parameterized="true"/>
2424
<!-- Elements that make it easier to select the most recently added element -->
2525
<element name="lastOptionTitle" type="input" selector="//*[@data-index='custom_options']//*[@data-index='options']/tbody/tr[last()]//*[contains(@class, '_required')]//input" />
2626
<element name="lastOptionTypeParent" type="block" selector="//*[@data-index='custom_options']//*[@data-index='options']/tbody/tr[last()]//*[contains(@class, 'admin__action-multiselect-text')]" />

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
<element name="productName" type="input" selector=".admin__field[data-index=name] input"/>
1616
<element name="productNameUseDefault" type="checkbox" selector="input[name='use_default[name]']"/>
1717
<element name="productSku" type="input" selector=".admin__field[data-index=sku] input"/>
18+
<element name="enableProductAttributeLabel" type="text" selector="[data-index='status'] .admin__field-label label"/>
19+
<element name="enableProductAttributeLabelWrapper" type="text" selector="[data-index='status'] .admin__field-label"/>
1820
<element name="productStatus" type="checkbox" selector="input[name='product[status]']"/>
1921
<element name="productStatusUseDefault" type="checkbox" selector="input[name='use_default[status]']"/>
2022
<element name="productPrice" type="input" selector=".admin__field[data-index=price] input"/>
@@ -31,7 +33,7 @@
3133
<element name="visibilityUseDefault" type="checkbox" selector="//input[@name='use_default[visibility]']"/>
3234
<element name="divByDataIndex" type="input" selector="div[data-index='{{var}}']" parameterized="true"/>
3335
<element name="attributeSetSearchCount" type="text" selector="div[data-index='attribute_set_id'] .admin__action-multiselect-search-count"/>
34-
<element name="attributeLabelByText" type="text" selector="//*[@class='admin__field']//span[text()='{{attributeLabel}}']" parameterized="true"/>
36+
<element name="attributeLabelByText" type="text" selector="//*[@class='admin__field']//label[text()='{{attributeLabel}}']" parameterized="true"/>
3537
<element name="addAttributeBtn" type="button" selector="#addAttribute"/>
3638
</section>
3739
<section name="ProductInWebsitesSection">

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@
4040

4141
<!--Create a Simple Product -->
4242
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToCatalogProductGrid"/>
43-
<waitForPageLoad time="30" stepKey="waitForProductsGridPageLoad"/>
43+
<waitForPageLoad stepKey="waitForProductsGridPageLoad"/>
4444
<click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickAddProductDropdown"/>
4545
<click selector="{{AdminProductGridActionSection.addSimpleProduct}}" stepKey="clickAddSimpleProduct"/>
46-
<!-- Need to wait because fields are loaded a little bit later then it starts to fill them -->
47-
<waitForElementVisible selector="{{AdminProductFormSection.productName}}" stepKey="waitForNameFieldVisible"/>
46+
<waitForPageLoad stepKey="waitForPageProductFormLoad"/>
4847
<fillField userInput="{{_defaultProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="fillProductName"/>
4948
<fillField userInput="{{_defaultProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="fillProductSKU"/>
5049
<fillField userInput="{{_defaultProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="fillProductPrice"/>
@@ -54,7 +53,7 @@
5453
<click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="openProductInWebsites"/>
5554
<click selector="{{ProductInWebsitesSection.website('Second Website')}}" stepKey="selectSecondWebsite"/>
5655
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSave"/>
57-
<waitForLoadingMaskToDisappear stepKey="waitForProductPageSave"/>
56+
<waitForPageLoad stepKey="waitForProductSave"/>
5857
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSaveProductMessage"/>
5958

6059
<!-- switch to the second store view -->

app/code/Magento/Ui/view/base/web/templates/form/field.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
visible="visible"
99
css="$data.additionalClasses"
1010
attr="'data-index': index">
11-
<label class="admin__field-label" if="$data.label" visible="$data.labelVisible" attr="for: uid">
12-
<span translate="label" attr="'data-config-scope': $data.scopeLabel"/>
13-
</label>
11+
<span class="admin__field-label" if="$data.label" visible="$data.labelVisible">
12+
<label translate="label" attr="'data-config-scope': $data.scopeLabel, for: uid"/>
13+
</span>
1414
<div class="admin__field-control"
1515
css="'_with-tooltip': $data.tooltip, '_with-reset': $data.showFallbackReset && $data.isDifferedFromDefault">
1616
<render args="elementTmpl" ifnot="hasAddons()"/>

app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,13 @@
183183

184184
.admin__field-label {
185185
color: @field-label__color;
186-
cursor: pointer;
187186
margin: 0;
188187
text-align: right;
189188

189+
label {
190+
cursor: pointer;
191+
}
192+
190193
+ br {
191194
display: none;
192195
}
@@ -207,7 +210,7 @@
207210
overflow: hidden;
208211
}
209212

210-
span {
213+
label {
211214
display: inline-block;
212215
line-height: @field-label__line-height;
213216
vertical-align: middle;
@@ -225,7 +228,7 @@
225228

226229
.required > &, // ToDo UI: change classes 'required' to '_required'.
227230
._required > & {
228-
> span {
231+
> label {
229232
&:after {
230233
color: @validation__color;
231234
content: '*';
@@ -512,7 +515,7 @@
512515
position: absolute;
513516
top: 0;
514517

515-
span {
518+
label {
516519
&:before {
517520
display: block;
518521
}
@@ -527,7 +530,7 @@
527530
}
528531

529532
& > .admin__field-label {
530-
span {
533+
label {
531534
&:before {
532535
display: none;
533536
}

dev/tests/functional/tests/app/Magento/Braintree/Test/Constraint/AssertDeviceDataIsPresentInBraintreeRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class AssertDeviceDataIsPresentInBraintreeRequest extends AbstractConstraint
1717
/**
1818
* Log file name.
1919
*/
20-
const FILE_NAME = 'debug.log';
20+
const FILE_NAME = 'payment.log';
2121

2222
/**
2323
* Device data pattern for regular expression.

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ProductForm extends FormSections
2828
*
2929
* @var string
3030
*/
31-
protected $attribute = './/*[contains(@class,"label")]/span[text()="%s"]';
31+
protected $attribute = './/*[contains(@class,"label")]/label[text()="%s"]';
3232

3333
/**
3434
* Product new from date field on the product form

dev/tests/functional/tests/app/Magento/Reports/Test/TestCase/AbandonedCartsReportEntityTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class AbandonedCartsReportEntityTest extends Injectable
3434
{
3535
/* tags */
3636
const MVP = 'no';
37-
const STABLE = 'no';
37+
const STABLE = 'yes';
3838
/* end tags */
3939

4040
/**

dev/tests/functional/tests/app/Magento/Store/Test/TestCase/DeleteStoreGroupEntityTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
99
<testCase name="Magento\Store\Test\TestCase\DeleteStoreGroupEntityTest" summary="Delete Store Group" ticketId="MAGETWO-27596">
1010
<variation name="DeleteStoreGroupEntityTestVariation1">
11-
<data name="tag" xsi:type="string">severity:S3, stable:no</data>
11+
<data name="tag" xsi:type="string">severity:S3</data>
1212
<data name="storeGroup/dataset" xsi:type="string">custom</data>
1313
<data name="createBackup" xsi:type="string">Yes</data>
1414
<constraint name="Magento\Store\Test\Constraint\AssertStoreGroupSuccessDeleteAndBackupMessages" />

dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AbstractAssertWishlistProductDetails.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
*/
1717
abstract class AbstractAssertWishlistProductDetails extends AbstractAssertForm
1818
{
19+
/**
20+
* @inheritdoc
21+
*/
22+
protected $skippedFields = ['sku'];
23+
1924
/**
2025
* Assert product details.
2126
*

0 commit comments

Comments
 (0)