|
| 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="StorefrontNewsletterSubscriptionWithEnabledNeedToConfirmConfigTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Newsletter Subscription"/> |
| 14 | + <stories value="Subscribe To Newsletter Subscription on Storefront With Enabled Need To Confirm Config"/> |
| 15 | + <title value="Storefront Newsletter Subscription with enabled Need To Confirm Config"/> |
| 16 | + <description value="Customers and guests should receive correct notification if Need To Confirm Config is enabled for newsletter subscription"/> |
| 17 | + <severity value="MINOR"/> |
| 18 | + <group value="newsletter"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <magentoCLI command="config:set {{SetNeedToConfirmEnabledConfigData.path}} {{SetNeedToConfirmEnabledConfigData.value}}" stepKey="enableNeedToConfirmConfig"/> |
| 22 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 23 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches"> |
| 24 | + <argument name="tags" value="config full_page"/> |
| 25 | + </actionGroup> |
| 26 | + </before> |
| 27 | + <after> |
| 28 | + <deleteData createDataKey="createCustomer" stepKey="deleteCreatedCustomer"/> |
| 29 | + <magentoCLI command="config:set {{SetNeedToConfirmDisabledConfigData.path}} {{SetNeedToConfirmDisabledConfigData.value}}" stepKey="disableNeedToConfirmConfig"/> |
| 30 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleaInvalidatedCaches"> |
| 31 | + <argument name="tags" value="config full_page"/> |
| 32 | + </actionGroup> |
| 33 | + </after> |
| 34 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStorefrontPage"/> |
| 35 | + <actionGroup ref="StorefrontCreateNewsletterSubscriberActionGroup" stepKey="createSubscription"> |
| 36 | + <argument name="email" value="{{_defaultNewsletter.senderEmail}}"/> |
| 37 | + </actionGroup> |
| 38 | + <actionGroup ref="AssertStorefrontCustomerMessagesActionGroup" stepKey="assertTheMessage"> |
| 39 | + <argument name="message" value="The confirmation request has been sent."/> |
| 40 | + </actionGroup> |
| 41 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> |
| 42 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 43 | + </actionGroup> |
| 44 | + <actionGroup ref="StorefrontCustomerNavigateToNewsletterPageActionGroup" stepKey="navigateToNewsletterPage"/> |
| 45 | + <actionGroup ref="StorefrontCustomerUpdateGeneralSubscriptionActionGroup" stepKey="subscribeToNewsletter"/> |
| 46 | + <actionGroup ref="AssertStorefrontCustomerMessagesActionGroup" stepKey="assertMessage"> |
| 47 | + <argument name="message" value="A confirmation request has been sent."/> |
| 48 | + </actionGroup> |
| 49 | + </test> |
| 50 | +</tests> |
0 commit comments