Skip to content

Commit 5f596a7

Browse files
committed
ACP2E-2693: [Cloud] Frontend not loading due to issue in newsletter template
1 parent b8aa453 commit 5f596a7

File tree

2 files changed

+94
-18
lines changed

2 files changed

+94
-18
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertStoreFrontCMSPageContentActionGroup">
12+
<annotations>
13+
<description>Validates that the provided CMS Page Title, Content and Heading are present and correct on a Storefront CMS Page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="cmsContent" type="string"/>
17+
</arguments>
18+
19+
<see selector="{{StorefrontCMSPageSection.mainContent}}" userInput="{{cmsContent}}" stepKey="seeContent"/>
20+
</actionGroup>
21+
</actionGroups>

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

Lines changed: 73 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,86 @@
2525
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2626
</before>
2727
<after>
28+
<!-- Clear Homepage -->
29+
<actionGroup ref="AdminEditCMSPageContentActionGroup" stepKey="clearRecentlyViewedWidgetsFromCMSContent">
30+
<argument name="content" value="{{CmsHomePageContent.content}}"/>
31+
<argument name="pageId" value="{{CmsHomePageContent.page_id}}"/>
32+
</actionGroup>
33+
2834
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
2935
</after>
30-
<!--Go to New CMS Page page-->
31-
<actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="navigateToCreateNewPage"/>
32-
<actionGroup ref="FillOutCMSPageContent" stepKey="fillBasicPageData"/>
33-
<actionGroup ref="AdminFillCMSPageContentFieldActionGroup" stepKey="fillContentField">
36+
37+
<!-- Add Subscribe block to HomePage -->
38+
<actionGroup ref="AdminEditCMSPageContentActionGroup" stepKey="addSubscribeBlockToHomePage">
3439
<argument name="content" value="{{block class=&apos;Magento\Newsletter\Block\Subscribe&apos; name=&apos;home.form.subscribe&apos; template=&apos;Magento_Newsletter::subscribe.phtml&apos;}}"/>
40+
<argument name="pageId" value="{{CmsHomePageContent.page_id}}"/>
3541
</actionGroup>
36-
<actionGroup ref="AdminSelectCMSPageStoreViewActionGroup" stepKey="selectCMSPageStoreViewForPageWithBlock">
37-
<argument name="storeViewName" value="Default Store View"/>
42+
43+
<!-- Verify page with Subscribe block on frontend -->
44+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnHomePage"/>
45+
<actionGroup ref="AssertStoreFrontCMSPageContentActionGroup" stepKey="verifySubscribeBlockToHomePage">
46+
<argument name="cmsContent" value="Subscribe"/>
3847
</actionGroup>
39-
<!--Verify successfully saved-->
40-
<actionGroup ref="SaveCmsPageActionGroup" stepKey="savePageWithBlock"/>
41-
<!--verify page on frontend-->
42-
<actionGroup ref="StorefrontGoToCMSPageActionGroup" stepKey="navigateToPageOnStoreFront">
43-
<argument name="identifier" value="{{_duplicatedCMSPage.identifier}}"/>
48+
49+
<!-- Add Contact block to HomePage -->
50+
<actionGroup ref="AdminEditCMSPageContentActionGroup" stepKey="addContactBlockToHomePage">
51+
<argument name="content" value="{{block class=&apos;Magento\Contact\Block\ContactForm&apos; name=&apos;home.form.contact&apos; template=&apos;Magento_Contact::form.phtml&apos;}}"/>
52+
<argument name="pageId" value="{{CmsHomePageContent.page_id}}"/>
4453
</actionGroup>
45-
<actionGroup ref="AssertStoreFrontCMSPageActionGroup" stepKey="verifyPageWithBlockDataOnFrontend">
46-
<argument name="cmsTitle" value="{{_duplicatedCMSPage.title}}"/>
47-
<argument name="cmsContent" value="Subscribe"/>
48-
<argument name="cmsContentHeading" value="{{_duplicatedCMSPage.content_heading}}"/>
54+
55+
<!-- Verify page with Contact block on frontend -->
56+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnHomePage2"/>
57+
<actionGroup ref="AssertStoreFrontCMSPageContentActionGroup" stepKey="verifyContactBlockToHomePage">
58+
<argument name="cmsContent" value="Phone"/>
59+
</actionGroup>
60+
61+
<!-- Add Forgot Password block to HomePage -->
62+
<actionGroup ref="AdminEditCMSPageContentActionGroup" stepKey="addForgotPasswordBlockToHomePage">
63+
<argument name="content" value="{{block class=&apos;Magento\Customer\Block\Account\Forgotpassword&apos; name=&apos;home.form.forgotpassword&apos; template=&apos;Magento_Customer::form/forgotpassword.phtml&apos;}}"/>
64+
<argument name="pageId" value="{{CmsHomePageContent.page_id}}"/>
65+
</actionGroup>
66+
67+
<!-- Verify page with Forgot Password block on frontend -->
68+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnHomePage3"/>
69+
<actionGroup ref="AssertStoreFrontCMSPageContentActionGroup" stepKey="verifyForgotPasswordBlockToHomePage">
70+
<argument name="cmsContent" value="password"/>
71+
</actionGroup>
72+
73+
<!-- Add Login block to HomePage -->
74+
<actionGroup ref="AdminEditCMSPageContentActionGroup" stepKey="addLoginBlockToHomePage">
75+
<argument name="content" value="{{block class=&apos;Magento\Customer\Block\Form\Login&apos; name=&apos;home.form.login&apos; template=&apos;Magento_Customer::form/login.phtml&apos;}}"/>
76+
<argument name="pageId" value="{{CmsHomePageContent.page_id}}"/>
77+
</actionGroup>
78+
79+
<!-- Verify page with Login block on frontend -->
80+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnHomePage4"/>
81+
<actionGroup ref="AssertStoreFrontCMSPageContentActionGroup" stepKey="verifyLoginBlockToHomePage">
82+
<argument name="cmsContent" value="Registered"/>
83+
</actionGroup>
84+
85+
<!-- Add Register block to HomePage -->
86+
<actionGroup ref="AdminEditCMSPageContentActionGroup" stepKey="addRegisterBlockToHomePage">
87+
<argument name="content" value="{{block class=&apos;Magento\Customer\Block\Form\Register&apos; name=&apos;home.form.register&apos; template=&apos;Magento_Customer::form/register.phtml&apos;}}"/>
88+
<argument name="pageId" value="{{CmsHomePageContent.page_id}}"/>
89+
</actionGroup>
90+
91+
<!-- Verify page with Register block on frontend -->
92+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnHomePage5"/>
93+
<actionGroup ref="AssertStoreFrontCMSPageContentActionGroup" stepKey="verifyRegisterBlockToHomePage">
94+
<argument name="cmsContent" value="Personal"/>
95+
</actionGroup>
96+
97+
<!-- Add Send To Friend block to HomePage -->
98+
<actionGroup ref="AdminEditCMSPageContentActionGroup" stepKey="addSendToFriendBlockToHomePage">
99+
<argument name="content" value="{{block class=&apos;Magento\SendFriend\Block\Send&apos; name=&apos;home.form.send&apos; template=&apos;Magento_SendFriend::send.phtml&apos;}}"/>
100+
<argument name="pageId" value="{{CmsHomePageContent.page_id}}"/>
49101
</actionGroup>
50-
<!--Delete page with block-->
51-
<actionGroup ref="DeletePageByUrlKeyActionGroup" stepKey="deletePageWithBlock">
52-
<argument name="UrlKey" value="{{_duplicatedCMSPage.identifier}}"/>
102+
103+
<!-- Verify page with Send To Friend block on frontend -->
104+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnHomePage6"/>
105+
<actionGroup ref="AssertStoreFrontCMSPageContentActionGroup" stepKey="verifySendToFriendBlockToHomePage">
106+
<argument name="cmsContent" value="Sender"/>
53107
</actionGroup>
108+
54109
</test>
55110
</tests>

0 commit comments

Comments
 (0)