Skip to content

Commit ee514f8

Browse files
committed
Merge remote-tracking branch 'trigger/MC-10932-Error-when-uploading-a-Transactional-Emails-logo2' into honey-bugs-pr
2 parents b435857 + e130ff6 commit ee514f8

File tree

3 files changed

+48
-1
lines changed

3 files changed

+48
-1
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="TransactionalEmailsLogoUploadTest">
12+
<annotations>
13+
<features value="Email"/>
14+
<stories value="Email"/>
15+
<title value="MC-13908: Uploading a Transactional Emails logo"/>
16+
<description value="Transactional Emails Logo should be able to be uploaded in the admin and previewed"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-13908"/>
19+
<group value="LogoUpload"/>
20+
</annotations>
21+
<!--Login to Admin Area-->
22+
<before>
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginToAdminArea"/>
24+
</before>
25+
<!--Logout from Admin Area-->
26+
<after>
27+
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
28+
</after>
29+
<!--Navigate to content->Design->Config page-->
30+
<amOnPage url="{{DesignConfigPage.url}}" stepKey="navigateToDesignConfigPage" />
31+
<waitForPageLoad stepKey="waitForPageloadToViewDesignConfigPage"/>
32+
<click selector="{{AdminDesignConfigSection.scopeRow('3')}}" stepKey="editStoreView"/>
33+
<waitForPageLoad stepKey="waitForPageLoadToOpenStoreViewEditPage"/>
34+
<!--Click Upload logo in Transactional Emails and upload the image and preview it-->
35+
<click selector="{{AdminDesignConfigSection.logoWrapperOpen}}" stepKey="openTab" />
36+
<attachFile selector="{{AdminDesignConfigSection.logoUpload}}" userInput="{{MagentoLogo.file}}" stepKey="attachLogo"/>
37+
<wait time="5" stepKey="waitingForLogoToUpload" />
38+
<seeElement selector="{{AdminDesignConfigSection.logoPreview}}" stepKey="LogoPreviewIsVisible"/>
39+
</test>
40+
</tests>

app/code/Magento/Email/view/adminhtml/ui_component/design_config_form.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<collapsible>true</collapsible>
1414
<label translate="true">Transactional Emails</label>
1515
</settings>
16-
<field name="email_logo" formElement="fileUploader">
16+
<field name="email_logo" formElement="imageUploader">
1717
<settings>
1818
<notice translate="true">To optimize logo for high-resolution displays, upload an image that is 3x normal size and then specify 1x dimensions in the width/height fields below.</notice>
1919
<label translate="true">Logo Image</label>

app/code/Magento/Theme/Test/Mftf/Section/AdminDesignConfigSection.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,12 @@
1414
<element name="watermarkSection" type="text" selector="[data-index='watermark'] .admin__fieldset-wrapper-content"/>
1515
<element name="imageUploadInputByFieldsetName" type="input" selector="//*[contains(@class,'fieldset-wrapper')][child::*[contains(@class,'fieldset-wrapper-title')]//*[contains(text(),'{{arg1}}')]]//*[contains(@class,'file-uploader')]//input" parameterized="true"/>
1616
<element name="imageUploadPreviewByFieldsetName" type="input" selector="//*[contains(@class,'fieldset-wrapper')][child::*[contains(@class,'fieldset-wrapper-title')]//*[contains(text(),'{{arg1}}')]]//*[contains(@class,'file-uploader-preview')]//img" parameterized="true"/>
17+
<element name="logoSectionHeader" type="text" selector="[data-index='email']"/>
18+
<element name="logoSection" type="text" selector="[data-index='email'] .admin__fieldset-wrapper-content"/>
19+
<element name="logoUpload" type ="input" selector="[name='email_logo']" />
20+
<element name="logoWrapperOpen" type ="text" selector="[data-index='email'] [data-state-collapsible ='closed']"/>
21+
<element name="logoPreview" type ="text" selector="[alt ='magento-logo.png']"/>
1722
</section>
1823
</sections>
24+
25+

0 commit comments

Comments
 (0)