Skip to content

Commit 2f4a078

Browse files
committed
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-96721
2 parents e14a92c + 88e5cda commit 2f4a078

File tree

141 files changed

+2193
-678
lines changed

Some content is hidden

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

141 files changed

+2193
-678
lines changed

app/code/Magento/Authorizenet/Model/Directpost.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,7 @@ protected function declineOrder(\Magento\Sales\Model\Order $order, $message = ''
832832
->void($response);
833833
}
834834
$order->registerCancellation($message)->save();
835+
$this->_eventManager->dispatch('order_cancel_after', ['order' => $order ]);
835836
} catch (\Exception $e) {
836837
//quiet decline
837838
$this->getPsrLogger()->critical($e);

app/code/Magento/Backend/view/adminhtml/templates/system/cache/additional.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ $permissions = $block->getData('permissions');
1111
?>
1212
<?php if ($permissions && $permissions->hasAccessToAdditionalActions()): ?>
1313
<div class="additional-cache-management">
14+
<h2>
15+
<span><?= $block->escapeHtml(__('Additional Cache Management')); ?></span>
16+
</h2>
1417
<?php if ($permissions->hasAccessToFlushCatalogImages()): ?>
15-
<h2>
16-
<span><?= $block->escapeHtml(__('Additional Cache Management')); ?></span>
17-
</h2>
1818
<p>
1919
<button onclick="setLocation('<?= $block->escapeJs($block->getCleanImagesUrl()); ?>')" type="button">
2020
<?= $block->escapeHtml(__('Flush Catalog Images Cache')); ?>

app/code/Magento/Braintree/Test/Mftf/ActionGroup/AdminOrderFillBraintreeCreditCardActionGroup.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,18 @@
1818
<!--Fill card number-->
1919
<switchToIFrame selector="{{AdminOrderFormPaymentSection.braintreeCcFrame}}" stepKey="switchToCcIFrame"/>
2020
<fillField selector="{{AdminOrderFormPaymentSection.braintreeCardNumber}}" userInput="{{cardData.card_number}}" stepKey="fillCardNumber"/>
21-
<waitForPageLoad stepKey="waitForFillCardNumber" time="1"/>
2221
<switchToIFrame stepKey="switchToDefaultContext1"/>
2322
<!--Fill card expiration month-->
2423
<switchToIFrame selector="{{AdminOrderFormPaymentSection.braintreeCcExpMonthFrame}}" stepKey="switchToCcExpMonthIFrame"/>
2524
<fillField selector="{{AdminOrderFormPaymentSection.braintreeExpMonth}}" userInput="{{cardData.exp_month}}" stepKey="fillExpMonth"/>
26-
<waitForPageLoad stepKey="waitForFillCardExpMonth" time="1"/>
2725
<switchToIFrame stepKey="switchToDefaultContext2"/>
2826
<!--Fill card expiration year-->
2927
<switchToIFrame selector="{{AdminOrderFormPaymentSection.braintreeCcExpYear}}" stepKey="switchToCcExpYearIFrame"/>
3028
<fillField selector="{{AdminOrderFormPaymentSection.braintreeExpYear}}" userInput="{{cardData.exp_year}}" stepKey="fillExpYear"/>
31-
<waitForPageLoad stepKey="waitForFillCardExpYear" time="1"/>
3229
<switchToIFrame stepKey="switchToDefaultContext3"/>
3330
<!--Fill card CVV-->
3431
<switchToIFrame selector="{{AdminOrderFormPaymentSection.braintreeCvvFrame}}" stepKey="switchToCvvIFrame"/>
3532
<fillField selector="{{AdminOrderFormPaymentSection.braintreeCvv}}" userInput="{{cardData.cvv}}" stepKey="fillCvv"/>
36-
<waitForPageLoad stepKey="waitForFillCardCvv" time="1"/>
3733
<switchToIFrame stepKey="switchToDefaultContext4"/>
3834
</actionGroup>
3935
</actionGroups>

app/code/Magento/Braintree/Test/Mftf/Test/AdminCreateOrderUsingBraintreePaymentTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1111
<test name="AdminCreateOrderUsingBraintreePaymentTest">
1212
<annotations>
1313
<features value="Backend"/>
@@ -84,7 +84,8 @@
8484
<actionGroup ref="AdminOrderFillBraintreeCreditCardActionGroup" stepKey="selectBraintreeCreditCard"/>
8585
<!--Submit Order and verify information-->
8686
<click selector="{{AdminOrderFormActionSection.submitOrder}}" stepKey="clickSubmitOrder"/>
87-
<seeInCurrentUrl url="{{AdminOrderDetailsPage.url}}" stepKey="seeViewOrderPage"/>
87+
<grabFromCurrentUrl regex="~/order_id/(\d+)/~" stepKey="grabOrderId"/>
88+
<seeInCurrentUrl url="{{AdminOrderDetailsPage.url('$grabOrderId')}}" stepKey="seeViewOrderPage"/>
8889
<see selector="{{AdminMessagesSection.success}}" userInput="You created the order." stepKey="seeOrderSuccessMessage"/>
8990
<actionGroup ref="logout" stepKey="logoutRestrictedAdminFromBackend"/>
9091
</test>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductGridActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
<click selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="clickActionDropdown"/>
7272
<click selector="{{AdminProductGridSection.bulkActionOption('Change status')}}" stepKey="clickChangeStatusAction"/>
7373
<click selector="{{AdminProductGridSection.changeStatus('status')}}" stepKey="clickChangeStatusDisabled" parameterized="true"/>
74+
<waitForPageLoad stepKey="waitForStatusToBeChanged"/>
7475
<see selector="{{AdminMessagesSection.success}}" userInput="A total of 1 record(s) have been updated." stepKey="seeSuccessMessage"/>
7576
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial2"/>
7677
</actionGroup>

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminCategoryBasicFieldSection">
1212
<element name="IncludeInMenu" type="checkbox" selector="input[name='include_in_menu']"/>
1313
<element name="includeInMenuLabel" type="text" selector="input[name='include_in_menu']+label"/>
@@ -17,6 +17,9 @@
1717
<element name="enableUseDefault" type="checkbox" selector="input[name='use_default[is_active]']"/>
1818
<element name="CategoryNameInput" type="input" selector="input[name='name']"/>
1919
<element name="categoryNameUseDefault" type="checkbox" selector="input[name='use_default[name]']"/>
20+
<element name="requiredFieldIndicator" type="text" selector=" return window.getComputedStyle(document.querySelector('._required[data-index=name]&gt;.admin__field-label span'), ':after').getPropertyValue('content');"/>
21+
<element name="requiredFieldIndicatorColor" type="text" selector=" return window.getComputedStyle(document.querySelector('._required[data-index=name]&gt;.admin__field-label span'), ':after').getPropertyValue('color');"/>
22+
<element name="panelFieldControl" type="input" selector='//aside//div[@data-index="{{arg1}}"]/descendant::*[@name="{{arg2}}"]' parameterized="true"/>
2023
</section>
2124
<section name="CatalogWYSIWYGSection">
2225
<element name="ShowHideBtn" type="button" selector="#togglecategory_form_description"/>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminProductFormSection">
1212
<element name="attributeSet" type="select" selector="div[data-index='attribute_set_id'] .admin__field-control"/>
1313
<element name="attributeSetFilter" type="input" selector="div[data-index='attribute_set_id'] .admin__field-control input"/>
@@ -38,6 +38,8 @@
3838
<element name="addAttributeBtn" type="button" selector="#addAttribute"/>
3939
<element name="attributeSetFilterResultByName" type="text" selector="//label/span[text() = '{{var}}']" timeout="30" parameterized="true"/>
4040
<element name="attributeSetDropDown" type="select" selector="div[data-index='attribute_set_id'] .action-select.admin__action-multiselect"/>
41+
<element name="requiredNameIndicator" type="text" selector=" return window.getComputedStyle(document.querySelector('._required[data-index=name]&gt;.admin__field-label span'), ':after').getPropertyValue('content');"/>
42+
<element name="requiredSkuIndicator" type="text" selector=" return window.getComputedStyle(document.querySelector('._required[data-index=sku]&gt;.admin__field-label span'), ':after').getPropertyValue('content');"/>
4143
</section>
4244
<section name="ProductInWebsitesSection">
4345
<element name="sectionHeader" type="button" selector="div[data-index='websites']" timeout="30"/>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
-->
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontMessagesSection">
1212
<element name="test" type="input" selector=".test"/>
1313
<element name="success" type="text" selector="div.message-success.success.message"/>
1414
<element name="error" type="text" selector="div.message-error.error.message"/>
15+
<element name="notice" type="text" selector="div.message-notice"/>
1516
</section>
1617
</sections>

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

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1111
<test name="AdminFilteringCategoryProductsUsingScopeSelectorTest">
1212
<annotations>
1313
<features value="Catalog"/>
@@ -19,19 +19,19 @@
1919
</annotations>
2020
<before>
2121
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
22-
<!--Create website, Sore adn Store View-->
23-
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="adminCreateWebsite">
24-
<argument name="newWebsiteName" value="secondWebsite"/>
25-
<argument name="websiteCode" value="second_website"/>
22+
<!--Create website, Sore and Store View-->
23+
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createSecondWebsite">
24+
<argument name="newWebsiteName" value="{{SecondWebsite.name}}"/>
25+
<argument name="websiteCode" value="{{SecondWebsite.code}}"/>
2626
</actionGroup>
27-
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="adminCreateStore">
28-
<argument name="website" value="secondWebsite"/>
29-
<argument name="storeGroupName" value="Second Store"/>
30-
<argument name="storeGroupCode" value="second_store"/>
27+
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createSecondStoreGroup">
28+
<argument name="website" value="{{SecondWebsite.name}}"/>
29+
<argument name="storeGroupName" value="{{SecondStoreGroupUnique.name}}"/>
30+
<argument name="storeGroupCode" value="{{SecondStoreGroupUnique.code}}"/>
3131
</actionGroup>
32-
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="adminCreateStoreView">
33-
<argument name="storeGroup" value="secondStoreGroup"/>
34-
<argument name="customStore" value="secondStore"/>
32+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createSecondStoreView">
33+
<argument name="storeGroup" value="SecondStoreGroupUnique"/>
34+
<argument name="customStore" value="SecondStoreUnique"/>
3535
</actionGroup>
3636

3737
<!--Create Simple Product and Category -->
@@ -74,7 +74,7 @@
7474
<waitForPageLoad time="30" stepKey="waitForProductEditOpen1"/>
7575

7676
<actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="selectProductInWebsites">
77-
<argument name="website" value="secondWebsite"/>
77+
<argument name="website" value="{{SecondWebsite.name}}"/>
7878
</actionGroup>
7979
<uncheckOption selector="{{ProductInWebsitesSection.website('Main Website')}}" stepKey="uncheckWebsite1"/>
8080
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct1"/>
@@ -89,22 +89,27 @@
8989
<waitForPageLoad time="30" stepKey="waitForProductEditOpen2"/>
9090

9191
<actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="selectProductInWebsites1">
92-
<argument name="website" value="secondWebsite"/>
92+
<argument name="website" value="{{SecondWebsite.name}}"/>
9393
</actionGroup>
9494
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct2"/>
9595
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product."
9696
stepKey="seeSuccessMessage2"/>
9797
</before>
9898
<after>
99-
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
100-
<argument name="websiteName" value="secondWebsite"/>
101-
</actionGroup>
102-
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearProductFilters"/>
10399
<deleteData createDataKey="createProduct0" stepKey="deleteProduct"/>
104100
<deleteData createDataKey="createProduct1" stepKey="deleteProduct1"/>
105101
<deleteData createDataKey="createProduct2" stepKey="deleteProduct2"/>
106102
<deleteData createDataKey="createProduct12" stepKey="deleteProduct3"/>
107103
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
104+
<!--Delete website-->
105+
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteSecondWebsite">
106+
<argument name="websiteName" value="{{SecondWebsite.name}}"/>
107+
</actionGroup>
108+
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearWebsitesFilters"/>
109+
<!--Clear products filter-->
110+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
111+
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearProductsFilters"/>
112+
108113
<actionGroup ref="logout" stepKey="logout"/>
109114
</after>
110115
<!-- Step 1-2: Open Category page and Set scope selector to All Store Views-->
@@ -156,7 +161,7 @@
156161
<click selector="{{AdminCategoryMainActionsSection.categoryStoreViewDropdownToggle}}"
157162
stepKey="clickStoresList1"/>
158163
<waitForPageLoad stepKey="waitForCategoryPageLoad3"/>
159-
<click selector="{{AdminCategoryMainActionsSection.categoryStoreViewOption(secondStore.name)}}"
164+
<click selector="{{AdminCategoryMainActionsSection.categoryStoreViewOption(SecondStoreUnique.name)}}"
160165
stepKey="clickStoreView1"/>
161166
<waitForElementVisible selector="{{AdminCategoryMainActionsSection.categoryStoreViewModalAccept}}"
162167
stepKey="waitForPopup2"/>
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" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminRequiredFieldsHaveRequiredFieldIndicatorTest">
11+
<annotations>
12+
<stories value="MAGETWO-73342: Clicking on area around the label of a toggle element results in the element's state being changed"/>
13+
<title value="Required fields should have the required asterisk indicator "/>
14+
<description value="Verify that Required fields should have the required indicator icon next to the field name"/>
15+
<severity value="MAJOR"/>
16+
<testCaseId value="MAGETWO-97037"/>
17+
<group value="catalog"/>
18+
<group value="cms"/>
19+
</annotations>
20+
<before>
21+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
22+
</before>
23+
<after>
24+
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
25+
</after>
26+
27+
<amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage"/>
28+
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategory"/>
29+
30+
<!-- Verify that the Category Name field has the required field name indicator -->
31+
<executeJS function="{{AdminCategoryBasicFieldSection.requiredFieldIndicator}}" stepKey="getRequiredFieldIndicator"/>
32+
<assertEquals expected='"*"' expectedType="string" actualType="variable" actual="getRequiredFieldIndicator" stepKey="assertRequiredFieldIndicator"/>
33+
34+
<executeJS function="{{AdminCategoryBasicFieldSection.requiredFieldIndicatorColor}}" stepKey="getRequiredFieldIndicatorColor"/>
35+
<assertEquals expected="rgb(226, 38, 38)" expectedType="string" actualType="variable" actual="getRequiredFieldIndicatorColor" stepKey="assertRequiredFieldIndicator1"/>
36+
37+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndexPage"/>
38+
<click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="addProductDropdown"/>
39+
<click selector="{{AdminProductGridActionSection.addSimpleProduct}}" stepKey="addSimpleProduct"/>
40+
41+
<!-- Verify that the Product Name and Sku fields have the required field name indicator -->
42+
<executeJS function="{{AdminProductFormSection.requiredNameIndicator}}" stepKey="productNameRequiredFieldIndicator"/>
43+
<assertEquals expected='"*"' expectedType="string" actualType="variable" actual="productNameRequiredFieldIndicator" stepKey="assertRequiredFieldIndicator2"/>
44+
<executeJS function="{{AdminProductFormSection.requiredSkuIndicator}}" stepKey="productSkuRequiredFieldIndicator"/>
45+
<assertEquals expected='"*"' expectedType="string" actualType="variable" actual="productSkuRequiredFieldIndicator" stepKey="assertRequiredFieldIndicator3"/>
46+
47+
<!-- Verify that the CMS page have the required field name indicator next to Page Title -->
48+
<amOnPage url="{{CmsPagesPage.url}}" stepKey="amOnPagePagesGrid"/>
49+
<click selector="{{CmsPagesPageActionsSection.addNewPage}}" stepKey="clickAddNewPage"/>
50+
<executeJS function="{{CmsNewPagePageBasicFieldsSection.requiredFieldIndicator}}" stepKey="pageTitleRequiredFieldIndicator"/>
51+
<assertEquals expected='"*"' expectedType="string" actualType="variable" actual="pageTitleRequiredFieldIndicator" stepKey="assertRequiredFieldIndicator4"/>
52+
</test>
53+
</tests>

0 commit comments

Comments
 (0)