Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
p-bystritsky committed Nov 28, 2019
1 parent e62c675 commit d26e7b8
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
<element name="messageError" type="text" selector=".messages div.message-error"/>
<element name="validationStrategy" type="select" selector="#basic_behaviorvalidation_strategy"/>
<element name="allowedErrorsCount" type="input" selector="#basic_behavior_allowed_error_count"/>
<element name="importImagesFileDirNote" type="input" selector="#import_images_file_dir-note"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminImagesFileDirectoryCorrectExplanationTest">
<annotations>
<features value="Import/Export"/>
<stories value="Import CSV file"/>
<title value="Images file directory correct explanation test"/>
<description value="Check correct explanation for the 'Images File Directory' option."/>
<severity value="MINOR"/>
<group value="importExport"/>
</annotations>
<before>
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
</before>
<after>
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
</after>
<amOnPage url="{{AdminImportIndexPage.url}}" stepKey="goToImportIndexPage"/>
<waitForPageLoad stepKey="adminImportMainSectionLoad"/>
<selectOption selector="{{AdminImportMainSection.entityType}}" userInput="Products" stepKey="selectProductsOption"/>
<waitForElementVisible selector="{{AdminImportMainSection.importBehavior}}" stepKey="waitForImportBehaviorElementVisible"/>

<see selector="{{AdminImportMainSection.importImagesFileDirNote}}" userInput='For Type "Local Server" use relative path to &lt;Magento root directory&gt;/var/import/images, e.g. ' stepKey="seeCorrectExplanation"/>
</test>
</tests>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
<page name="AdminNewsletterSubscriberPage" url="newsletter/subscriber/index/" area="admin" module="Magento_Newsletter">
<section name="AdminNewsletterSubscriberGridSection"/>
</page>
</pages>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminNewsletterSubscriberGridSection">
<element name="email" type="text" selector="//table[contains(@class, 'data-grid')]/tbody/tr[{{row}}][@data-role='row']/td[@data-column='email']" parameterized="true"/>
<element name="type" type="text" selector="//table[contains(@class, 'data-grid')]/tbody/tr[{{row}}][@data-role='row']/td[@data-column='type']" parameterized="true"/>
<element name="firstName" type="text" selector="//table[contains(@class, 'data-grid')]/tbody/tr[{{row}}][@data-role='row']/td[@data-column='firstname']" parameterized="true"/>
<element name="lastName" type="text" selector="//table[contains(@class, 'data-grid')]/tbody/tr[{{row}}][@data-role='row']/td[@data-column='lastname']" parameterized="true"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminNameEmptyForGuestTest">
<annotations>
<features value="Newsletter"/>
<group value="Newsletter"/>
<title value="Empty name for Guest Customer"/>
<description value="'Customer First Name' and 'Customer Last Name' should be empty for Guest Customer in Newsletter Subscribers Grid"/>
<severity value="MINOR"/>
</annotations>

<before>
<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
</before>

<after>
<actionGroup ref="logout" stepKey="adminLogout"/>
</after>

<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStorefrontPage"/>
<waitForPageLoad stepKey="waitForCustomerPage"/>
<scrollTo selector="{{StorefrontCustomerFooterSection.footerBlock}}" stepKey="scrollToFooter"/>
<fillField userInput="{{Simple_US_Customer.email}}" selector="{{StorefrontCustomerFooterSection.formSubscribe}}"
stepKey="giveEmail"/>
<click selector="{{StorefrontCustomerFooterSection.buttonSubscribe}}" stepKey="clickSubscribeButton"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<see selector="{{StorefrontCustomerMessagesSection.successMessage}}"
userInput="Thank you for your subscription." stepKey="checkSuccessMessage"/>

<amOnPage url="{{AdminNewsletterSubscriberPage.url}}" stepKey="amOnNewsletterSubscribersPage"/>
<see selector="{{AdminNewsletterSubscriberGridSection.email('1')}}" userInput="{{Simple_US_Customer.email}}"
stepKey="checkEmail"/>
<see selector="{{AdminNewsletterSubscriberGridSection.type('1')}}" userInput="Guest" stepKey="checkType"/>
<see selector="{{AdminNewsletterSubscriberGridSection.firstName('1')}}" userInput="" stepKey="checkFirstName"/>
<see selector="{{AdminNewsletterSubscriberGridSection.lastName('1')}}" userInput="" stepKey="checkLastName"/>
</test>
</tests>

0 comments on commit d26e7b8

Please sign in to comment.