Skip to content

Commit 328a463

Browse files
author
Eric Bohanon
committed
Merge remote-tracking branch 'origin/MAGETWO-87010-Graph-Ql-Error-Handling' into MAGETWO-87010-Graph-Ql-Error-Handling
2 parents b25cc12 + 3ce346d commit 328a463

File tree

72 files changed

+993
-464
lines changed

Some content is hidden

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

72 files changed

+993
-464
lines changed

app/code/Magento/Cms/Helper/Wysiwyg/Images.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
/**
1111
* Wysiwyg Images Helper
12+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1213
*/
1314
class Images extends \Magento\Framework\App\Helper\AbstractHelper
1415
{

app/code/Magento/Ui/view/base/web/js/form/element/wysiwyg.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,16 @@ define([
106106
this.$wysiwygEditorButton.removeProp('disabled');
107107
}
108108

109-
if (wysiwyg && disabled) {
110-
wysiwyg.setEnabledStatus(false);
111-
wysiwyg.getPluginButtons().prop('disabled', 'disabled');
112-
} else if (wysiwyg) {
113-
wysiwyg.setEnabledStatus(true);
114-
wysiwyg.getPluginButtons().removeProp('disabled');
109+
/* eslint-disable no-undef */
110+
if (typeof wysiwyg !== 'undefined' && wysiwyg.activeEditor()) {
111+
112+
if (wysiwyg && disabled) {
113+
wysiwyg.setEnabledStatus(false);
114+
wysiwyg.getPluginButtons().prop('disabled', 'disabled');
115+
} else if (wysiwyg) {
116+
wysiwyg.setEnabledStatus(true);
117+
wysiwyg.getPluginButtons().removeProp('disabled');
118+
}
115119
}
116120
}
117121
});

dev/tests/acceptance/tests/_suite/sampleSuite.xml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,41 @@
66
*/
77
-->
88
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Suite/etc/suiteSchema.xsd">
9+
<suite name="mySuite">
10+
<before>
11+
<createData entity="_defaultCategory" stepKey="createCategory"/>
12+
<createData entity="_defaultProduct" stepKey="createProduct">
13+
<required-entity createDataKey="createCategory"/>
14+
</createData>
15+
</before>
16+
<after>
17+
<deleteData stepKey="deleteMyProduct" createDataKey="createProduct"/>
18+
<deleteData stepKey="deleteMyCategory" createDataKey="createCategory"/>
19+
</after>
20+
<include>
21+
<group name="example"/>
22+
<cest test="PersistMultipleEntitiesTest" name="PersistMultipleEntitiesCest"/>
23+
<module name="SampleTests" file="SampleCest.xml"/>
24+
</include>
25+
<exclude>
26+
<group name="testGroup"/>
27+
</exclude>
28+
</suite>
929
<suite name="Catalog">
1030
<include>
1131
<module name="Catalog" />
1232
</include>
1333
<exclude>
14-
<cest name="AdminCreateCategoryCest"/>
15-
<cest name="AdminCreateSimpleProductCest"/>
34+
<test name="AdminCreateCategoryCest"/>
35+
<test name="AdminCreateSimpleProductCest"/>
1636
</exclude>
1737
</suite>
1838
<suite name="Cms">
1939
<include>
2040
<module name="Cms" />
2141
</include>
2242
<exclude>
23-
<cest name="AdminCreateCmsPageCest"/>
43+
<test name="AdminCreateCmsPageCest"/>
2444
</exclude>
2545
</suite>
2646
<suite name="Newsletter">
@@ -35,9 +55,9 @@
3555
<module name="Newsletter" />
3656
</include>
3757
<exclude>
38-
<cest name="AdminCreateCmsPageCest"/>
39-
<cest name="AdminCreateCategoryCest"/>
40-
<cest name="AdminCreateSimpleProductCest"/>
58+
<test name="AdminCreateCmsPageCest"/>
59+
<test name="AdminCreateCategoryCest"/>
60+
<test name="AdminCreateSimpleProductCest"/>
4161
</exclude>
4262
</suite>
4363
</suites>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Analytics/Test/AdminConfigurationTimeToSendDataCest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-66464"/>
1919
<group value="analytics"/>
20+
<group value="skip"/>
21+
<!--random failure on Jenkins MAGETWO-87216-->
2022
</annotations>
2123
<after>
2224
<amOnPage stepKey="amOnLogoutPage" url="admin/admin/auth/logout/"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
10+
<section name="StorefrontProductActionSection">
11+
<element name="addToCart" type="button" selector="#product-addtocart-button"/>
12+
</section>
13+
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/StorefrontProductInfoMainSection.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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1111
<section name="StorefrontProductInfoMainSection">
12+
<element name="stock" type="input" selector=".stock.available"/>
1213
<element name="productName" type="text" selector=".base"/>
1314
<element name="productSku" type="text" selector=".product.attribute.sku>.value"/>
1415
<element name="productPrice" type="text" selector=".price"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddImageToWYSIWYGCatalogCest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
<actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" />
1515
</before>
1616
<annotations>
17-
<features value="Add Image to WYSIWYG on Catalog Page"/>
18-
<stories value="Default WYSIWYG toolbar configuration with Magento Media Gallery-MAGETWO-42041"/>
19-
<group value="addImageCatalog"/>
17+
<features value="MAGETWO-36659-[CMS] WYSIWYG update"/>
18+
<stories value="MAGETWO-42041-Default WYSIWYG toolbar configuration with Magento Media Gallery"/>
19+
<group value="Catalog"/>
2020
<title value="Admin should be able to add image to WYSIWYG Editor on Catalog Page"/>
2121
<description value="Admin should be able to add image to WYSIWYG Editor on Catalog Page"/>
2222
<severity value="CRITICAL"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddImageToWYSIWYGProductCest.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
1010
<test name="AddImageToWYSIWYGProductEditor">
1111
<annotations>
12-
<features value="Add Image to WYSIWYG on Product Page"/>
13-
<stories value="Default WYSIWYG toolbar configuration with Magento Media Gallery-MAGETWO-42041"/>
14-
<group value="addImageProduct"/>
12+
<features value="MAGETWO-36659-[CMS] WYSIWYG update"/>
13+
<stories value="MAGETWO-42041-Default WYSIWYG toolbar configuration with Magento Media Gallery"/>
14+
<group value="Catalog"/>
1515
<title value="Admin should be able to add image to WYSIWYG Editor on Product Page"/>
1616
<description value="Admin should be able to add image to WYSIWYG Editor on Product Page"/>
1717
<severity value="CRITICAL"/>
@@ -28,6 +28,7 @@
2828
<fillField userInput="{{_defaultProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="fillPrice"/>
2929
<fillField userInput="{{_defaultProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="fillSKU"/>
3030
<fillField userInput="{{_defaultProduct.quantity}}" selector="{{AdminProductFormSection.productQuantity}}" stepKey="fillQuantity"/>
31+
<scrollTo selector="{{AdminProductFormSection.productQuantity}}" stepKey="scrollToQty" />
3132
<click selector="{{AdminProductFormSection.contentTab}}" stepKey="clickContentTab" />
3233
<waitForElementVisible selector="{{ProductDescriptionWYSIWYGToolbarSection.TinyMCE4}}" stepKey="waitForDescription" />
3334
<click selector="{{ProductDescriptionWYSIWYGToolbarSection.InsertImageIcon}}" stepKey="clickInsertImageIcon1" />
@@ -68,7 +69,7 @@
6869
<fillField selector="{{ProductDescriptionWYSIWYGToolbarSection.Height}}" userInput="{{ImageUpload.height}}" stepKey="fillImageHeight1" />
6970
<click selector="{{ProductDescriptionWYSIWYGToolbarSection.OkBtn}}" stepKey="clickOkBtn1" />
7071
<waitForPageLoad stepKey="waitForPageLoad3"/>
71-
72+
<scrollTo selector="{{ProductDescriptionWYSIWYGToolbarSection.TinyMCE4}}" stepKey="scrollToTinyMCE4" />
7273
<click selector="{{ProductShortDescriptionWYSIWYGToolbarSection.InsertImageIcon}}" stepKey="clickInsertImageIcon2" />
7374
<waitForPageLoad stepKey="waitForPageLoad4" />
7475
<click selector="{{ProductShortDescriptionWYSIWYGToolbarSection.Browse}}" stepKey="clickBrowse2" />
@@ -98,6 +99,7 @@
9899
<click selector="{{ProductShortDescriptionWYSIWYGToolbarSection.OkBtn}}" stepKey="clickOkBtn2" />
99100
<waitForPageLoad stepKey="waitForPageLoad6"/>
100101
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/>
102+
<waitForLoadingMaskToDisappear stepKey="waitForLoading13" />
101103
<amOnPage url="{{_defaultProduct.name}}.html" stepKey="navigateToProductPage"/>
102104
<waitForPageLoad stepKey="waitForPageLoad2"/>
103105
<seeElement selector="{{StorefrontProductInfoMainSection.mediaDescription}}" stepKey="assertMediaDescription"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminEditTextEditorProductAttributeCest.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
1010
<test name="EditTextEditorProductAttributeCest">
1111
<annotations>
12-
<features value="TinyMCEv4"/>
13-
<stories value="Input type configuration for custom Product Attributes-MAGETWO-51484"/>
14-
<group value="editProductAttribute"/>
12+
<features value="MAGETWO-36659-[CMS] WYSIWYG update"/>
13+
<stories value="MAGETWO-51484-Input type configuration for custom Product Attributes"/>
14+
<group value="Catalog"/>
1515
<title value="Admin see TinyMCEv4.6 is native WYSIWYG on Product Page"/>
1616
<description value="Admin should be able to switch between 2 version of Tinymce in the admin back-end."/>
1717
<severity value="CRITICAL"/>
@@ -46,6 +46,7 @@
4646
<dontSeeElement selector="{{ProductAttributeWYSIWYGSection.TinyMCE4($$myProductAttributeCreation.attribute_code$$)}}" stepKey="dontSeeTinyMCE4" />
4747
<fillField selector="{{ProductAttributeWYSIWYGSection.TextArea($$myProductAttributeCreation.attribute_code$$)}}" userInput="Text Area" stepKey="fillContentTextarea" />
4848
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/>
49+
<waitForLoadingMaskToDisappear stepKey="waitForLoading1"/>
4950
<!-- Go to storefront product page, assert product content -->
5051
<amOnPage url="{{_defaultProduct.name}}.html" stepKey="navigateToProductPage"/>
5152
<waitForPageLoad stepKey="waitForPageLoad5"/>
@@ -69,6 +70,7 @@
6970
<waitForPageLoad stepKey="waitForPageLoad10" />
7071
<seeElement selector="{{ProductAttributeWYSIWYGSection.TinyMCE4($$myProductAttributeCreation.attribute_code$$)}}" stepKey="waitForPageLoad11"/>
7172
<after>
73+
<deleteData createDataKey="myProductAttributeCreation" stepKey="deletePreReqProductAttribute" />
7274
<actionGroup ref="DisabledWYSIWYG" stepKey="disableWYSIWYG"/>
7375
<actionGroup ref="logout" stepKey="logout"/>
7476
</after>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/VerifyDefaultWYSIWYGToolbarOnProductCest.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
1111
<test name="Verifydefaultcontrolsonproductdescription">
1212
<annotations>
13-
<features value="Default WYSIWYG toolbar configuration in Magento"/>
14-
<stories value="Default toolbar configuration in Magento-MAGETWO-70412"/>
15-
<group value="WYSIWYG"/>
13+
<features value="MAGETWO-36659-[CMS] WYSIWYG update"/>
14+
<stories value="MAGETWO-70412-Default toolbar configuration in Magento"/>
15+
<group value="Catalog"/>
1616
<title value="You should be able to see default toolbar display on Description content area"/>
1717
<description value="You should be able to see default toolbar display on Description content area"/>
1818
<severity value="CRITICAL"/>
@@ -25,6 +25,7 @@
2525
</before>
2626
<amOnPage url="{{AdminProductEditPage(simple)}}" stepKey="navigateToProduct"/>
2727
<waitForPageLoad stepKey="wait"/>
28+
<scrollTo selector="{{AdminProductFormSection.productQuantity}}" stepKey="scrollToQty" />
2829
<click selector="{{AdminProductFormSection.contentTab}}" stepKey="clickContentTab" />
2930
<waitForElementVisible selector="{{ProductDescriptionWYSIWYGToolbarSection.TinyMCE4}}" stepKey="waitforTinyMCE4Visible1"/>
3031
<seeElement selector="{{ProductDescriptionWYSIWYGToolbarSection.TinyMCE4}}" stepKey="TinyMCE4Description" />
@@ -63,6 +64,7 @@
6364
</before>
6465
<amOnPage url="{{AdminProductEditPage(simple)}}" stepKey="navigateToProduct"/>
6566
<waitForPageLoad stepKey="wait"/>
67+
<scrollTo selector="{{AdminProductFormSection.productQuantity}}" stepKey="scrollToQty" />
6668
<click selector="{{AdminProductFormSection.contentTab}}" stepKey="clickContentTab" />
6769
<waitForElementVisible selector="{{ProductShortDescriptionWYSIWYGToolbarSection.TinyMCE4}}" stepKey="waitforTinyMCE4Visible2"/>
6870
<seeElement selector="{{ProductShortDescriptionWYSIWYGToolbarSection.TinyMCE4}}" stepKey="TinyMCE4ShortDescription" />

0 commit comments

Comments
 (0)