File tree Expand file tree Collapse file tree 5 files changed +21
-16
lines changed
app/code/Magento/Newsletter/Test/Mftf Expand file tree Collapse file tree 5 files changed +21
-16
lines changed 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 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
9
+ xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Test/etc/actionGroupSchema.xsd" >
10
+ <actionGroup name =" SwitchToIframeActionGroup" >
11
+ <executeJS function =" document.getElementById('preview_iframe').sandbox.add('allow-scripts')" stepKey =" addSandboxValue" />
12
+ <wait time =" 10" stepKey =" waitBeforeSwitchToIframe" />
13
+ <switchToIFrame userInput =" preview_iframe" stepKey =" switchToIframe" />
14
+ <waitForPageLoad stepKey =" waitForPageLoad" />
15
+ </actionGroup >
16
+ </actionGroups >
Original file line number Diff line number Diff line change 51
51
<waitForPageLoad stepKey =" waitForPageLoad11" />
52
52
<click selector =" {{NewsletterWYSIWYGSection.Preview(_defaultNewsletter.name)}}" stepKey =" clickPreview" />
53
53
<switchToWindow stepKey =" switchToWindow" userInput =" action_window" />
54
- <executeJS function =" document.getElementById('preview_iframe').sandbox.add('allow-scripts')" stepKey =" addSandboxValue" />
55
- <switchToIFrame userInput =" preview_iframe" stepKey =" switchToIframe" />
56
- <waitForPageLoad stepKey =" waitForPageLoad9" />
54
+ <actionGroup ref =" SwitchToIframeActionGroup" stepKey =" switchToIframe" />
57
55
<!-- Verify that the text and image are present-->
58
56
<seeElement selector =" {{StorefrontNewsletterSection.mediaDescription}}" stepKey =" assertMediaDescription" />
59
57
<seeElementInDOM selector =" {{StorefrontNewsletterSection.imageSource(ImageUpload3.fileName)}}" stepKey =" assertMediaSource" />
Original file line number Diff line number Diff line change 83
83
<waitForPageLoad stepKey =" waitForPageLoad9" />
84
84
<click selector =" {{NewsletterWYSIWYGSection.Preview(_defaultNewsletter.name)}}" stepKey =" clickPreview1" />
85
85
<switchToWindow userInput =" action_window" stepKey =" switchToWindow1" />
86
- <executeJS function =" document.getElementById('preview_iframe').sandbox.add('allow-scripts')" stepKey =" addSandboxValue" />
87
- <wait time =" 30" stepKey =" waitBeforeSwitchToIframe" />
88
- <switchToIFrame userInput =" preview_iframe" stepKey =" switchToIframe1" />
89
- <waitForPageLoad time =" 30" stepKey =" waitForPageLoad7" />
86
+ <actionGroup ref =" SwitchToIframeActionGroup" stepKey =" switchToIframe" />
90
87
<!-- see Default Variable on Storefront-->
91
88
<see userInput =" {{_defaultVariable.city}}" stepKey =" seeDefaultVariable" />
92
89
<!-- see Custom Variable on Storefront-->
97
94
<amOnPage url =" {{NewsletterTemplateGrid.url}}" stepKey =" amOnTemplateGrid" />
98
95
<click selector =" {{NewsletterWYSIWYGSection.Preview(_defaultNewsletter.name)}}" stepKey =" clickPreview2" />
99
96
<switchToWindow userInput =" action_window" stepKey =" switchToWindow2" />
100
- <executeJS function =" document.getElementById('preview_iframe').sandbox.add('allow-scripts')" stepKey =" addSandboxValue1" />
101
- <switchToIFrame userInput =" preview_iframe" stepKey =" switchToIframe2" />
102
- <wait time =" 10" stepKey =" waitForPageLoad8" />
97
+ <actionGroup ref =" SwitchToIframeActionGroup" stepKey =" switchToIframe1" />
103
98
<!-- see custom variable blank-->
104
99
<dontSee userInput =" {{customVariable.html}}" stepKey =" dontSeeCustomVariableName" />
105
100
<closeTab stepKey =" closeTab" />
Original file line number Diff line number Diff line change 48
48
<waitForPageLoad stepKey =" waitForPageLoad10" />
49
49
<click selector =" {{NewsletterWYSIWYGSection.Preview(_defaultNewsletter.name)}}" stepKey =" clickPreview" />
50
50
<switchToWindow stepKey =" switchToWindow" userInput =" action_window" />
51
- <executeJS function =" document.getElementById('preview_iframe').sandbox.add('allow-scripts')" stepKey =" addSandboxValue" />
52
- <wait time =" 30" stepKey =" waitBeforeSwitchToIframe" />
53
- <switchToIFrame userInput =" preview_iframe" stepKey =" switchToIframe" />
51
+ <actionGroup ref =" SwitchToIframeActionGroup" stepKey =" switchToIframe" />
54
52
<waitForText userInput =" Home page" stepKey =" waitForPageLoad9" />
55
53
<see userInput =" Home page" stepKey =" seeHomePageCMSPage" />
56
54
<closeTab stepKey =" closeTab" />
Original file line number Diff line number Diff line change 42
42
<waitForPageLoad stepKey =" waitForPageLoad3" />
43
43
<click selector =" {{NewsletterWYSIWYGSection.Preview(_defaultNewsletter.name)}}" stepKey =" clickPreview" />
44
44
<switchToWindow stepKey =" switchToWindow" userInput =" action_window" />
45
- <executeJS function =" document.getElementById('preview_iframe').sandbox.add('allow-scripts')" stepKey =" addSandboxValue" />
46
- <wait time =" 30" stepKey =" waitBeforeSwitchToIframe" />
47
- <switchToIFrame userInput =" preview_iframe" stepKey =" switchToIframe" />
45
+ <actionGroup ref =" SwitchToIframeActionGroup" stepKey =" switchToIframe" />
48
46
<waitForText userInput =" Hello World From Newsletter Template!" stepKey =" waitForPageLoad2" />
49
47
<see userInput =" Hello World From Newsletter Template!" stepKey =" seeContent" />
50
48
<closeTab stepKey =" closeTab" />
You can’t perform that action at this time.
0 commit comments