|
| 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="AdminCustomerWishListShareOptionsInputValidationTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Wishlist"/> |
| 14 | + <stories value="MAGETWO-8709"/> |
| 15 | + <group value="wishlist"/> |
| 16 | + <title value="When user tries to set the Email Text Length Limit higher then 10,000 then validation message occurs"/> |
| 17 | + <description value="When user tries to set the Email Text Length Limit higher then 10,000 then validation message occurs"/> |
| 18 | + <severity value="AVERAGE"/> |
| 19 | + <testCaseId value="N/a"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> |
| 23 | + </before> |
| 24 | + <after> |
| 25 | + <actionGroup ref="setEmailTextLengthLimitActionGroup" stepKey="rollbackEmailTextLengthLimit"> |
| 26 | + <argument name="emailTextLengthLimit" value="{{Wishlist.default_email_text_length_limit}}"/> |
| 27 | + </actionGroup> |
| 28 | + <checkOption selector="{{WishListShareOptionsSection.useSystemValueForWishListEmailTextLimit}}" stepKey="checkUseSystemValueForWishListEmailTextLimit"/> |
| 29 | + <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> |
| 30 | + </after> |
| 31 | + |
| 32 | + <actionGroup ref="setEmailTextLengthLimitActionGroup" stepKey="setEmailTextLengthLimitToMin"> |
| 33 | + <argument name="emailTextLengthLimit" value="{{Wishlist.min_email_text_length_limit}}"/> |
| 34 | + </actionGroup> |
| 35 | + <see selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccessMessageForMinimum"/> |
| 36 | + <grabValueFrom selector="{{WishListShareOptionsSection.emailTextLengthLimitInput}}" stepKey="minimumWishListTextLengthLimit"/> |
| 37 | + <assertEquals stepKey="AssertMinimumTextLengthLimitIsApplied"> |
| 38 | + <expectedResult type="string">{{Wishlist.min_email_text_length_limit}}</expectedResult> |
| 39 | + <actualResult type="variable">minimumWishListTextLengthLimit</actualResult> |
| 40 | + </assertEquals> |
| 41 | + |
| 42 | + <actionGroup ref="setEmailTextLengthLimitActionGroup" stepKey="setEmailTextLengthLimitToMax"> |
| 43 | + <argument name="emailTextLengthLimit" value="{{Wishlist.max_email_text_length_limit}}"/> |
| 44 | + </actionGroup> |
| 45 | + <see selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccessMessageForMaximum"/> |
| 46 | + <grabValueFrom selector="{{WishListShareOptionsSection.emailTextLengthLimitInput}}" stepKey="maximumWishListTextLengthLimit"/> |
| 47 | + <assertEquals stepKey="AssertMaximumTextLengthLimitIsApplied"> |
| 48 | + <expectedResult type="string">{{Wishlist.max_email_text_length_limit}}</expectedResult> |
| 49 | + <actualResult type="variable">maximumWishListTextLengthLimit</actualResult> |
| 50 | + </assertEquals> |
| 51 | + |
| 52 | + <actionGroup ref="setEmailTextLengthLimitActionGroup" stepKey="setEmailTextLengthLimitToLowerThanMin"> |
| 53 | + <argument name="emailTextLengthLimit" value="0"/> |
| 54 | + </actionGroup> |
| 55 | + <dontSee selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="dontSeeSuccessMessageForLowerThanMinimum"/> |
| 56 | + <grabTextFrom selector="{{WishListShareOptionsSection.emailTextLengthLimitMessage}}" stepKey="enterWishListTextLengthLimitLowerThanMinimum"/> |
| 57 | + <assertEquals stepKey="AssertTextLengthLimitIsNotAppliedWhenLowerThanMinimum"> |
| 58 | + <expectedResult type="string">The value is not within the specified range.</expectedResult> |
| 59 | + <actualResult type="variable">enterWishListTextLengthLimitLowerThanMinimum</actualResult> |
| 60 | + </assertEquals> |
| 61 | + |
| 62 | + <actionGroup ref="setEmailTextLengthLimitActionGroup" stepKey="setEmailTextLengthLimitToHigherThanMaximum"> |
| 63 | + <argument name="emailTextLengthLimit" value="10001"/> |
| 64 | + </actionGroup> |
| 65 | + <dontSee selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="dontSeeSuccessMessageForHigherThanMaximum"/> |
| 66 | + <grabTextFrom selector="{{WishListShareOptionsSection.emailTextLengthLimitMessage}}" stepKey="enterWishListTextLengthLimitHigherThanMaximum"/> |
| 67 | + <assertEquals stepKey="AssertTextLengthLimitIsNotAppliedWhenHigherThanMaximum"> |
| 68 | + <expectedResult type="string">The value is not within the specified range.</expectedResult> |
| 69 | + <actualResult type="variable">enterWishListTextLengthLimitHigherThanMaximum</actualResult> |
| 70 | + </assertEquals> |
| 71 | + </test> |
| 72 | +</tests> |
0 commit comments