Skip to content

Commit 1217452

Browse files
author
Joan He
committed
Merge remote-tracking branch 'trigger/MAGETWO-96192' into BugFixPR
2 parents b5fe8b2 + d2a48d8 commit 1217452

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@
9898
<element name="AddParam" type="button" selector=".rule-param-add"/>
9999
<element name="ConditionsDropdown" type="select" selector="#conditions__1__new_child"/>
100100
<element name="RuleParam" type="button" selector="//a[text()='...']"/>
101+
<element name="RuleParamSelect" type="select" selector="//ul[contains(@class,'rule-param-children')]/li[{{arg1}}]//*[contains(@class,'rule-param')][{{arg2}}]//select" parameterized="true"/>
102+
<element name="RuleParamInput" type="input" selector="//ul[contains(@class,'rule-param-children')]/li[{{arg1}}]//*[contains(@class,'rule-param')][{{arg2}}]//input" parameterized="true"/>
103+
<element name="RuleParamLabel" type="input" selector="//ul[contains(@class,'rule-param-children')]/li[{{arg1}}]//*[contains(@class,'rule-param')][{{arg2}}]//a" parameterized="true"/>
101104
<element name="Chooser" type="button" selector="//img[@title='Open Chooser']"/>
102105
<element name="PageSize" type="input" selector="input[name='parameters[page_size]']"/>
103106
<element name="ProductAttribute" type="multiselect" selector="select[name='parameters[show_attributes][]']" />

app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeTest.xml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,29 @@
5757
<click selector="{{WidgetSection.RuleParam}}" stepKey="clickRuleParam" />
5858
<waitForElementVisible selector="{{WidgetSection.Chooser}}" stepKey="waitForElement" />
5959
<click selector="{{WidgetSection.Chooser}}" stepKey="clickChooser" />
60-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear3" />
60+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear4" />
6161
<click selector="{{WidgetSection.PreCreateCategory('$$createPreReqCategory.name$$')}}" stepKey="selectPreCategory" />
62+
63+
<!-- Test that the "<" operand functions correctly -->
64+
<click selector="{{WidgetSection.AddParam}}" stepKey="clickAddParamBtn2" />
65+
<waitForElementVisible selector="{{WidgetSection.ConditionsDropdown}}" stepKey="waitForDropdownVisible2"/>
66+
<selectOption selector="{{WidgetSection.ConditionsDropdown}}" userInput="Price" stepKey="selectPriceCondition"/>
67+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear3"/>
68+
<click selector="{{WidgetSection.RuleParamLabel('2','1')}}" stepKey="clickOperatorLabel"/>
69+
<selectOption selector="{{WidgetSection.RuleParamSelect('2','1')}}" userInput="&lt;" stepKey="selectLessThanCondition"/>
70+
<click selector="{{WidgetSection.RuleParam}}" stepKey="clickRuleParam2"/>
71+
<fillField selector="{{WidgetSection.RuleParamInput('2','2')}}" userInput="125" stepKey="fillMaxPrice"/>
72+
73+
<!-- Test that the ">" operand functions correctly -->
74+
<click selector="{{WidgetSection.AddParam}}" stepKey="clickAddParamBtn3" />
75+
<waitForElementVisible selector="{{WidgetSection.ConditionsDropdown}}" stepKey="waitForDropdownVisible3"/>
76+
<selectOption selector="{{WidgetSection.ConditionsDropdown}}" userInput="Price" stepKey="selectPriceCondition2"/>
77+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear5"/>
78+
<click selector="{{WidgetSection.RuleParamLabel('3','1')}}" stepKey="clickOperatorLabel2"/>
79+
<selectOption selector="{{WidgetSection.RuleParamSelect('3','1')}}" userInput="&gt;" stepKey="selectLessThanCondition2"/>
80+
<click selector="{{WidgetSection.RuleParam}}" stepKey="clickRuleParam3"/>
81+
<fillField selector="{{WidgetSection.RuleParamInput('3','2')}}" userInput="1" stepKey="fillMinPrice"/>
82+
6283
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
6384
<waitForPageLoad stepKey="wait6" />
6485
<scrollTo selector="{{CmsNewPagePageSeoSection.header}}" stepKey="scrollToSearchEngineTab" />

dev/tests/integration/testsuite/Magento/Widget/Setup/LayoutUpdateConverterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function convertDataProvider()
3434
// @codingStandardsIgnoreStart
3535
$beginning = '<body><referenceContainer name="content"><block class="Magento\CatalogWidget\Block\Product\ProductsList" name="23e38bbfa7cc6474454570e51aeffcc3" template="Magento_CatalogWidget::product/widget/content/grid.phtml"><action method="setData"><argument name="name" xsi:type="string">show_pager</argument><argument name="value" xsi:type="string">0</argument></action><action method="setData"><argument name="name" xsi:type="string">products_count</argument><argument name="value" xsi:type="string">10</argument></action><action method="setData">';
3636
$serializedWidgetXml = '<argument name="name" xsi:type="string">conditions_encoded</argument><argument name="value" xsi:type="string">a:3:[i:1;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Combine`;s:10:`aggregator`;s:3:`all`;s:5:`value`;s:1:`1`;s:9:`new_child`;s:0:``;]s:4:`1--1`;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Product`;s:9:`attribute`;s:3:`sku`;s:8:`operator`;s:2:`()`;s:5:`value`;s:15:`simple, simple1`;]s:4:`1--2`;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Product`;s:9:`attribute`;s:5:`price`;s:8:`operator`;s:2:`&lt;=`;s:5:`value`;s:2:`10`;]]</argument>';
37-
$jsonEncodedWidgetXml = '<argument name="name" xsi:type="string">conditions_encoded</argument><argument name="value" xsi:type="string">^[`1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Combine`,`aggregator`:`all`,`value`:`1`,`new_child`:``^],`1--1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Product`,`attribute`:`sku`,`operator`:`()`,`value`:`simple, simple1`^],`1--2`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Product`,`attribute`:`price`,`operator`:`&lt;=`,`value`:`10`^]^]</argument>';
37+
$jsonEncodedWidgetXml = '<argument name="name" xsi:type="string">conditions_encoded</argument><argument name="value" xsi:type="string">^[`1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Combine`,`aggregator`:`all`,`value`:`1`,`new_child`:``^],`1--1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Product`,`attribute`:`sku`,`operator`:`()`,`value`:`simple, simple1`^],`1--2`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Product`,`attribute`:`price`,`operator`:`^(=`,`value`:`10`^]^]</argument>';
3838
$ending = '</action><action method="setData"><argument name="name" xsi:type="string">page_var_name</argument><argument name="value" xsi:type="string">pobqks</argument></action></block></referenceContainer></body>';
3939
// @codingStandardsIgnoreEnd
4040
return [

lib/internal/Magento/Framework/Data/Wysiwyg/Normalizer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
*/
1111
class Normalizer
1212
{
13-
1413
const WYSIWYG_RESERVED_CHARACTERS_REPLACEMENT_MAP = [
1514
'{' => '^[',
1615
'}' => '^]',
1716
'"' => '`',
1817
'\\' => '|',
18+
'<' => '^(',
19+
'>' => '^)'
1920
];
2021

2122
/**

0 commit comments

Comments
 (0)