Skip to content

Commit 66f8cbc

Browse files
author
Stas Puga
committed
MC-24241: [MFTF Test] Uploading a Transactional Emails logo
1 parent 103d43f commit 66f8cbc

File tree

5 files changed

+16
-13
lines changed

5 files changed

+16
-13
lines changed

app/code/Magento/Email/Test/Mftf/ActionGroup/AdminUploadTransactionEmailsImageActionGroup.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
</annotations>
1515
<arguments>
1616
<argument name="image" type="string" defaultValue="{{MagentoLogo.file}}"/>
17-
<argument name="width" type="string"/>
18-
<argument name="height" type="string"/>
17+
<argument name="width" type="string" defaultValue="200"/>
18+
<argument name="height" type="string" defaultValue="100"/>
1919
</arguments>
2020

21-
<conditionalClick selector="{{AdminDesignConfigSection.logoSectionHeader}}" dependentSelector="{{AdminDesignConfigSection.logoWrapperOpen}}" visible="true" stepKey="openTab"/>
21+
<conditionalClick selector="{{AdminDesignConfigSection.transactionalEmailSectionHeader}}" dependentSelector="{{AdminDesignConfigSection.transactionalEmailSectionBody}}" visible="false" stepKey="openTransactionalEmailSection"/>
2222
<waitForElementVisible selector="{{AdminDesignConfigSection.logoImageAlt}}" stepKey="waitVisibleUploadLogo"/>
2323
<attachFile selector="{{AdminDesignConfigSection.logoUpload}}" userInput="{{image}}" stepKey="attachLogo"/>
2424
<waitForElementVisible selector="{{AdminDesignConfigSection.logoPreview}}" stepKey="waitingForLogoToUpload"/>
25-
<seeElement selector="{{AdminDesignConfigSection.logoPreview}}" stepKey="LogoPreviewIsVisible"/>
25+
<seeElement selector="{{AdminDesignConfigSection.logoPreview}}" stepKey="logoPreviewIsVisible"/>
2626
<fillField selector="{{AdminDesignConfigSection.logoImageAlt}}" userInput="{{image}}" stepKey="fillFieldImageAlt"/>
2727
<fillField selector="{{AdminDesignConfigSection.logoImageWidth}}" userInput="{{width}}" stepKey="fillFieldImageWidth"/>
2828
<fillField selector="{{AdminDesignConfigSection.logoImageHeight}}" userInput="{{height}}" stepKey="fillFieldImageHeight"/>

app/code/Magento/Email/Test/Mftf/Test/TransactionalEmailsLogoUploadTest.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616
<description value="Transactional Emails Logo should be able to be uploaded in the admin and previewed"/>
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MC-27620"/>
19-
<useCaseId value="MC-24241"/>
20-
<group value="logoUpload"/>
19+
<useCaseId value="MC-10932"/>
20+
<group value="theme"/>
21+
<group value="email"/>
2122
</annotations>
2223
<before>
2324
<!--Login to Admin Area-->
@@ -35,8 +36,8 @@
3536
<amOnPage url="{{DesignConfigPage.url}}" stepKey="navigateToDesignConfigPage" />
3637
<waitForPageLoad stepKey="waitForPageLoadToViewDesignConfigPage"/>
3738
<actionGroup ref="AdminGridFilterSearchResultsBySelectActionGroup" stepKey="filterThemeDesignConfiguration">
38-
<argument name="selectorAttr" value="store_id"/>
39-
<argument name="store" value="{{_defaultStore.name}}"/>
39+
<argument name="attributeSelector" value="store_id"/>
40+
<argument name="attributeValue" value="{{_defaultStore.name}}"/>
4041
</actionGroup>
4142
<click selector="{{AdminDesignConfigSection.scopeRow('1')}}" stepKey="editStoreView"/>
4243
<waitForPageLoad stepKey="waitForPageLoadToOpenStoreViewEditPage"/>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,7 @@
3737
<element name="imageWatermarkType" type="text" selector="//div[contains(@class, 'fieldset-wrapper-title')]//span[contains(text(), '{{watermarkType}}')]" parameterized="true"/>
3838
<element name="appliedTheme" type="select" selector="select[name='theme_theme_id']"/>
3939
<element name="scopeEditLinkByName" type="button" selector="//tr//td[count(//div[@data-role='grid-wrapper']//tr//th[normalize-space(.)= '{{scope}}']/preceding-sibling::th)+1][contains(.,'{{scopeName}}')]/..//a[contains(@class, 'action-menu-item')]" timeout="30" parameterized="true"/>
40+
<element name="transactionalEmailSectionHeader" type="button" selector="[data-index='email'] .fieldset-wrapper-title" timeout="30"/>
41+
<element name="transactionalEmailSectionBody" type="block" selector="[data-index='email'] .admin__fieldset-wrapper-content" timeout="30"/>
4042
</section>
4143
</sections>

app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminGridFilterSearchResultsBySelectActionGroup.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
<description>Filters an Admin Grid page using the provided Filter Selector and Search Value.</description>
1414
</annotations>
1515
<arguments>
16-
<argument name="selectorAttr" type="string"/>
17-
<argument name="store" type="string"/>
16+
<argument name="attributeSelector" type="string"/>
17+
<argument name="attributeValue" type="string"/>
1818
</arguments>
1919

2020
<conditionalClick selector="{{AdminGridFilterControls.clearAll}}" dependentSelector="{{AdminGridFilterControls.clearAll}}" visible="true" stepKey="clearTheFiltersIfPresent"/>
21-
<waitForPageLoad time="30" stepKey="waitForPageLoad"/>
21+
<waitForPageLoad time="30" stepKey="waitForFilterApplied"/>
2222
<click selector="{{AdminGridFilterControls.filters}}" stepKey="clickOnFilters"/>
23-
<selectOption selector="{{AdminDataGridFilterSection.selectFieldByNameAttrInGrid(selectorAttr)}}" userInput="{{store}}" stepKey="selectStoreView"/>
23+
<selectOption selector="{{AdminDataGridFilterSection.filterSelectFieldByName(attributeSelector)}}" userInput="{{attributeValue}}" stepKey="selectFieldByName"/>
2424
<click selector="{{AdminGridFilterControls.applyFilters}}" stepKey="clickOnApplyFilters"/>
2525
</actionGroup>
2626
</actionGroups>

app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridFilterSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<element name="filterExpand" type="button" selector="//div[@class='admin__data-grid-header'][(not(ancestor::*[@class='sticky-header']) and not(contains(@style,'visibility: hidden'))) or (ancestor::*[@class='sticky-header' and not(contains(@style,'display: none'))])]//button[@data-action='grid-filter-expand']" />
1414
<element name="inputFieldByNameAttr" type="input" selector="//*[@data-part='filter-form']//input[@name='{{inputNameAttr}}']" parameterized="true" />
1515
<element name="inputFieldByNameAttrInGrid" type="input" selector="//*[@data-role='filter-form']//input[@name='{{inputNameAttr}}']" parameterized="true"/>
16-
<element name="selectFieldByNameAttrInGrid" type="select" selector="//*[@data-part='filter-form']//select[@name='{{selectNameAttr}}']" parameterized="true"/>
16+
<element name="filterSelectFieldByName" type="select" selector="//*[@data-part='filter-form']//select[@name='{{fieldName}}']" parameterized="true"/>
1717
<element name="apply" type="button" selector="//*[@data-part='filter-form']//button[@data-action='grid-filter-apply']" />
1818
<element name="clear" type="button" selector=".admin__data-grid-header [data-action='grid-filter-reset']" />
1919
</section>

0 commit comments

Comments
 (0)