Skip to content

Commit 8199598

Browse files
author
Joan He
committed
Merge remote-tracking branch 'honey/honey-bugs-pr' into pr
2 parents 209b5d1 + f697741 commit 8199598

File tree

4 files changed

+46
-34
lines changed

4 files changed

+46
-34
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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@
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>

dev/tests/integration/testsuite/Magento/MessageQueue/Model/Cron/ConsumersRunnerTest.php

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -109,29 +109,13 @@ protected function setUp()
109109
});
110110
}
111111

112-
/**
113-
* Checks that pid files are created
114-
*
115-
* @return void
116-
*/
117-
public function testCheckThatPidFilesWasCreated()
118-
{
119-
$this->markTestSkipped('MC-5904: Test Fails randomly,');
120-
$this->consumersRunner->run();
121-
foreach ($this->consumerConfig->getConsumers() as $consumer) {
122-
$this->waitConsumerPidFile($consumer->getName());
123-
}
124-
}
125-
126112
/**
127113
* Tests running of specific consumer and his re-running when it is working
128114
*
129115
* @return void
130116
*/
131117
public function testSpecificConsumerAndRerun()
132118
{
133-
$this->markTestSkipped('MC-5904: Test Fails randomly,');
134-
135119
$specificConsumer = 'quoteItemCleaner';
136120
$pidFilePath = $this->getPidFileName($specificConsumer);
137121
$config = $this->config;
@@ -188,23 +172,6 @@ public function testCronJobDisabled()
188172
}
189173
}
190174

191-
/**
192-
* @param string $consumerName
193-
* @return void
194-
*/
195-
private function waitConsumerPidFile($consumerName)
196-
{
197-
$pidFileFullPath = $this->getPidFileFullPath($consumerName);
198-
$i = 0;
199-
do {
200-
sleep(1);
201-
} while (!file_exists($pidFileFullPath) && ($i++ < 60));
202-
203-
if (!file_exists($pidFileFullPath)) {
204-
$this->fail($consumerName . ' pid file does not exist.');
205-
}
206-
}
207-
208175
/**
209176
* @return array
210177
*/

0 commit comments

Comments
 (0)