File tree Expand file tree Collapse file tree 6 files changed +72
-40
lines changed
app/code/Magento/Widget/Test/Mftf
lib/internal/Magento/Framework/View/Helper Expand file tree Collapse file tree 6 files changed +72
-40
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
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
+ <actionGroups
9
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
10
+ xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Test/etc/actionGroupSchema.xsd" >
11
+ <actionGroup name =" AdminCreateWidgetWthoutLayoutActionGroup" >
12
+ <annotations >
13
+ <description >Goes to the Admin Widget creation page without saving it</description >
14
+ </annotations >
15
+ <arguments >
16
+ <argument name =" widget" />
17
+ </arguments >
18
+ <amOnPage url =" {{AdminNewWidgetPage.url}}" stepKey =" amOnAdminNewWidgetPage" />
19
+ <selectOption selector =" {{AdminNewWidgetSection.widgetType}}" userInput =" {{widget.type}}" stepKey =" setWidgetType" />
20
+ <selectOption selector =" {{AdminNewWidgetSection.widgetDesignTheme}}" userInput =" {{widget.design_theme}}" stepKey =" setWidgetDesignTheme" />
21
+ <click selector =" {{AdminNewWidgetSection.continue}}" stepKey =" clickContinue" />
22
+ <fillField selector =" {{AdminNewWidgetSection.widgetTitle}}" userInput =" {{widget.name}}" stepKey =" fillTitle" />
23
+ <selectOption selector =" {{AdminNewWidgetSection.widgetStoreIds}}" userInput =" {{widget.store_ids[0]}}" stepKey =" setWidgetStoreIds" />
24
+ <click selector =" {{AdminNewWidgetSection.addLayoutUpdate}}" stepKey =" clickAddLayoutUpdate" />
25
+ </actionGroup >
26
+ </actionGroups >
Original file line number Diff line number Diff line change
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
+ <actionGroups
9
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
10
+ xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Test/etc/actionGroupSchema.xsd" >
11
+ <actionGroup name =" AdminWidgetAddLayoutUpdateActionGroup" >
12
+ <annotations >
13
+ <description >Add layouts during widgets creation</description >
14
+ </annotations >
15
+ <waitForAjaxLoad stepKey =" waitForLoad" />
16
+ <click selector =" {{AdminNewWidgetSection.addLayoutUpdate}}" stepKey =" clickAddLayoutUpdate" />
17
+ </actionGroup >
18
+ </actionGroups >
Original file line number Diff line number Diff line change
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
+ <actionGroups
9
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
10
+ xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Test/etc/actionGroupSchema.xsd" >
11
+ <actionGroup name =" AdminWidgetDeleteLayoutUpdateActionGroup" >
12
+ <annotations >
13
+ <description >Delete layouts during widgets creation</description >
14
+ </annotations >
15
+ <click selector =" {{AdminNewWidgetSection.deleteWidgetLayoutAction}}" stepKey =" clickFirstDeleteButton" />
16
+ </actionGroup >
17
+ </actionGroups >
Original file line number Diff line number Diff line change 29
29
<argument name =" title" value =" {{AdminMenuContentElementsWidgets.pageTitle}}" />
30
30
</actionGroup >
31
31
<waitForLoadingMaskToDisappear stepKey =" waitForLoadingMaskToDisappear1" />
32
- <actionGroup ref =" AdminCreateAndDeleteMultipleLayoutWidgetActionGroup " stepKey =" addWidgetForTest" >
32
+ <actionGroup ref =" AdminCreateWidgetWthoutLayoutActionGroup " stepKey =" addWidgetForTest" >
33
33
<argument name =" widget" value =" ProductsListWidget" />
34
34
</actionGroup >
35
+ <actionGroup ref =" AdminWidgetAddLayoutUpdateActionGroup" stepKey =" AddSecondLayout" />
36
+ <actionGroup ref =" AdminWidgetAddLayoutUpdateActionGroup" stepKey =" AddThirdLayout" />
37
+ <seeNumberOfElements userInput =" 3" selector =" {{AdminNewWidgetSection.CountDeleteButtons}}" stepKey =" seeThreeDeleteButtons" />
38
+ <actionGroup ref =" AdminWidgetDeleteLayoutUpdateActionGroup" stepKey =" DeleteFirstLayoutForWidget" ></actionGroup >
39
+ <seeNumberOfElements userInput =" 2" selector =" {{AdminNewWidgetSection.CountDeleteButtons}}" stepKey =" seeTwoDeleteButtons" />
40
+ <actionGroup ref =" AdminWidgetDeleteLayoutUpdateActionGroup" stepKey =" DeleteSecondLayoutForWidget" ></actionGroup >
41
+ <seeNumberOfElements userInput =" 1" selector =" {{AdminNewWidgetSection.CountDeleteButtons}}" stepKey =" seeOneDeleteButtons" />
42
+ <actionGroup ref =" AdminWidgetDeleteLayoutUpdateActionGroup" stepKey =" DeleteThirdLayoutForWidget" ></actionGroup >
43
+ <seeNumberOfElements userInput =" 0" selector =" {{AdminNewWidgetSection.CountDeleteButtons}}" stepKey =" seeZeroDeleteButtons" />
35
44
</test >
36
45
</tests >
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ function {$listenerFunction} () {
112
112
{$ attributeJavascript };
113
113
}
114
114
var {$ elementName }Array = document.querySelectorAll(" {$ elementSelector }");
115
- if( {$ elementName }Array.lenght !== 'undefined'){
115
+ if( {$ elementName }Array.length !== 'undefined'){
116
116
{$ elementName }Array.forEach(function(element){
117
117
if (element) {
118
118
element. {$ eventName } = function (event) {
You can’t perform that action at this time.
0 commit comments