|
15 | 15 | <title value="Verify that Catalog Price Rule and Customer Group Membership are persisted under long-term cookie"/>
|
16 | 16 | <description value="Verify that Catalog Price Rule and Customer Group Membership are persisted under long-term cookie"/>
|
17 | 17 | <severity value="CRITICAL"/>
|
18 |
| - <testCaseId value="MAGETWO-69455"/> |
| 18 | + <testCaseId value="MC-27571"/> |
19 | 19 | <group value="persistent"/>
|
20 | 20 | </annotations>
|
21 | 21 | <before>
|
22 |
| - <createData entity="PersistentConfigEnabled" stepKey="enablePersistent"/> |
23 |
| - <createData entity="PersistentLogoutClearDisable" stepKey="persistentLogoutClearDisable"/> |
| 22 | + |
| 23 | + <createData entity="PersistentConfigSettings" stepKey="enablePersistent"/> |
24 | 24 | <createData entity="_defaultCategory" stepKey="createCategory"/>
|
25 |
| - <createData entity="_defaultProduct" stepKey="createProduct"> |
| 25 | + <createData entity="productWithHTMLEntityOne" stepKey="createProduct"> |
26 | 26 | <requiredEntity createDataKey="createCategory"/>
|
27 |
| - <field key="price">50</field> |
28 |
| - </createData> |
29 |
| - <createData entity="Simple_US_Customer" stepKey="createCustomer"> |
30 |
| - <field key="group_id">1</field> |
31 | 27 | </createData>
|
| 28 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 29 | + |
| 30 | + <!--Delete all Catalog Price Rule if exist--> |
| 31 | + <actionGroup ref="LoginAsAdmin" stepKey="loginToAdminPanel"/> |
| 32 | + <actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogPriceRule"/> |
| 33 | + |
32 | 34 |
|
33 |
| - <actionGroup ref="LoginAsAdmin" stepKey="login"/> |
34 | 35 | <!--Create Catalog Rule-->
|
35 |
| - <actionGroup ref="NewCatalogPriceRuleByUIWithConditionIsCategoryActionGroup" stepKey="createCatalogPriceRule"> |
36 |
| - <argument name="catalogRule" value="_defaultCatalogRule"/> |
37 |
| - <argument name="categoryId" value="$$createCategory.id$$"/> |
| 36 | + <actionGroup ref="AdminOpenNewCatalogPriceRuleFormPageActionGroup" stepKey="startCreatingFirstPriceRule"/> |
| 37 | + <actionGroup ref="AdminCatalogPriceRuleFillMainInfoActionGroup" stepKey="fillMainInfoForFirstPriceRule"> |
| 38 | + <argument name="groups" value="'General'"/> |
| 39 | + </actionGroup> |
| 40 | + <actionGroup ref="AdminFillCatalogRuleConditionActionGroup" stepKey="createCatalogPriceRule"> |
| 41 | + <argument name="conditionValue" value="$createCategory.id$"/> |
38 | 42 | </actionGroup>
|
39 |
| - <actionGroup ref="SelectGeneralCustomerGroupActionGroup" stepKey="selectCustomerGroup"/> |
40 |
| - <click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="clickSaveAndApplyRules"/> |
41 |
| - <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the rule." stepKey="assertSuccess"/> |
42 |
| - <magentoCLI command="indexer:reindex" stepKey="reindex"/> |
43 |
| - <magentoCLI command="cache:flush" stepKey="flushCache"/> |
| 43 | + <actionGroup ref="AdminCatalogPriceRuleFillActionsActionGroup" stepKey="fillActionsForThirdPriceRule"/> |
| 44 | + <actionGroup ref="AdminCatalogPriceRuleSaveAndApplyActionGroup" stepKey="clickSaveAndApplyRule"/> |
| 45 | + |
| 46 | + <!-- Perform reindex --> |
| 47 | + <magentoCLI command="indexer:reindex" arguments="catalogrule_rule" stepKey="reindex"/> |
44 | 48 | </before>
|
45 | 49 | <after>
|
46 |
| - <!-- Delete the rule --> |
47 |
| - <amOnPage url="{{CatalogRulePage.url}}" stepKey="goToCatalogPriceRulePage"/> |
48 |
| - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deletePriceRule"> |
49 |
| - <argument name="name" value="{{_defaultCatalogRule.name}}"/> |
50 |
| - <argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/> |
51 |
| - </actionGroup> |
52 |
| - <actionGroup ref="logout" stepKey="logout"/> |
53 | 50 | <createData entity="PersistentConfigDefault" stepKey="setDefaultPersistentState"/>
|
54 | 51 | <createData entity="PersistentLogoutClearEnabled" stepKey="persistentLogoutClearEnabled"/>
|
55 | 52 | <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
|
56 | 53 | <deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
|
57 | 54 | <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
|
| 55 | + <!-- Delete the rule --> |
| 56 | + <actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogPriceRule"/> |
| 57 | + <actionGroup ref="logout" stepKey="logout"/> |
58 | 58 | </after>
|
59 | 59 |
|
60 | 60 | <!--Go to category and check price-->
|
61 |
| - <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onStorefrontCategoryPage"/> |
62 |
| - <see selector="{{StorefrontCategoryProductSection.ProductPriceByNumber('1')}}" userInput="$$createProduct.price$$" stepKey="checkPriceSimpleProduct"/> |
| 61 | + <actionGroup ref="AssertStorefrontProductPriceInCategoryPageActionGroup" stepKey="assertProductPriceInCategoryPage"> |
| 62 | + <argument name="categoryUrl" value="$createCategory.custom_attributes[url_key]$"/> |
| 63 | + <argument name="productName" value="$createProduct.name$"/> |
| 64 | + </actionGroup> |
63 | 65 |
|
64 | 66 | <!--Login to storefront from customer and check price-->
|
65 | 67 | <actionGroup ref="LoginToStorefrontActionGroup" stepKey="logInFromCustomer">
|
66 |
| - <argument name="Customer" value="$$createCustomer$$"/> |
| 68 | + <argument name="Customer" value="$createCustomer$"/> |
| 69 | + </actionGroup> |
| 70 | + <actionGroup ref="AssertCustomerWelcomeMessageActionGroup" stepKey="seeWelcomeMessageForJohnDoeCustomer"> |
| 71 | + <argument name="customerFullName" value="{{Simple_Customer_Without_Address.fullname}}"/> |
| 72 | + </actionGroup> |
| 73 | + |
| 74 | + <!--Go to category and check special price--> |
| 75 | + <actionGroup ref="AssertStorefrontProductSpecialPriceInCategoryPageActionGroup" stepKey="assertProductSpecialPriceInCategoryPage"> |
| 76 | + <argument name="categoryUrl" value="$createCategory.custom_attributes[url_key]$"/> |
| 77 | + <argument name="productName" value="$createProduct.name$"/> |
67 | 78 | </actionGroup>
|
68 |
| - <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onStorefrontCategoryPage2"/> |
69 |
| - <see userInput="Welcome, $$createCustomer.firstname$$ $$createCustomer.lastname$$!" selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeCheckWelcome"/> |
70 |
| - <see selector="{{StorefrontCategoryProductSection.ProductSpecialPriceByNumber('1')}}" userInput="45.00" stepKey="checkPriceSimpleProduct2"/> |
71 | 79 |
|
72 |
| - <!--Click *Sign Out* and check the price of the Simple Product--> |
| 80 | + |
| 81 | + <!--Click *Sign Out*--> |
73 | 82 | <actionGroup ref="StorefrontSignOutActionGroup" stepKey="storefrontSignOut"/>
|
74 |
| - <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onStorefrontCategoryPage3"/> |
75 |
| - <see userInput="Welcome, $$createCustomer.firstname$$ $$createCustomer.lastname$$!" selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeCheckWelcome2"/> |
76 |
| - <seeElement selector="{{StorefrontPanelHeaderSection.notYouLink}}" stepKey="checkLinkNotYoy"/> |
77 |
| - <see selector="{{StorefrontCategoryProductSection.ProductSpecialPriceByNumber('1')}}" userInput="45.00" stepKey="checkPriceSimpleProduct3"/> |
| 83 | + <actionGroup ref="StorefrontAssertPersistentCustomerWelcomeMessageActionGroup" stepKey="seeWelcomeForJohnDoeCustomer"> |
| 84 | + <argument name="customerFullName" value="{{Simple_Customer_Without_Address.fullname}}"/> |
| 85 | + </actionGroup> |
| 86 | + |
| 87 | + <!--Go to category and check special price--> |
| 88 | + <actionGroup ref="AssertStorefrontProductSpecialPriceInCategoryPageActionGroup" stepKey="assertProductSpecialPriceInCategoryPageAfterLogout"> |
| 89 | + <argument name="categoryUrl" value="$createCategory.custom_attributes[url_key]$"/> |
| 90 | + <argument name="productName" value="$createProduct.name$"/> |
| 91 | + </actionGroup> |
78 | 92 |
|
79 | 93 | <!--Click the *Not you?* link and check the price for Simple Product-->
|
80 |
| - <click selector="{{StorefrontPanelHeaderSection.notYouLink}}" stepKey="clickNext"/> |
81 |
| - <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onStorefrontCategoryPage4"/> |
82 |
| - <see userInput="Default welcome msg!" selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeCheckWelcome3"/> |
83 |
| - <see selector="{{StorefrontCategoryProductSection.ProductPriceByNumber('1')}}" userInput="$$createProduct.price$$" stepKey="checkPriceSimpleProduct4"/> |
| 94 | + <click selector="{{StorefrontPanelHeaderSection.notYouLink}}" stepKey="clickNotYouLink"/> |
| 95 | + <actionGroup ref="AssertStorefrontDefaultWelcomeMessageActionGroup" stepKey="seeWelcomeMessageForJohnDoeCustomerAfterLogout"/> |
| 96 | + <actionGroup ref="AssertStorefrontProductPriceInCategoryPageActionGroup" stepKey="assertProductPriceInCategoryPageAfterLogout"> |
| 97 | + <argument name="categoryUrl" value="$createCategory.custom_attributes[url_key]$"/> |
| 98 | + <argument name="productName" value="$createProduct.name$"/> |
| 99 | + </actionGroup> |
| 100 | + <dontSeeElement selector="{{StorefrontCategoryProductSection.ProductCatalogRuleSpecialPriceTitleByName($createProduct.name$)}}" stepKey="dontSeeSpecialPrice"/> |
84 | 101 | </test>
|
85 | 102 | </tests>
|
0 commit comments