|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright 2025 Adobe |
| 5 | + * All Rights Reserved. |
| 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="StorefrontVerifyOrderDashboardTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Sales"/> |
| 14 | + <stories value="Recent Orders appearing on Dashboard"/> |
| 15 | + <title value="Verify recent Orders appearing in other store view if the orders are created on another store view"/> |
| 16 | + <description value="Verify recent Orders appearing in other store view if the orders are created on another store view"/> |
| 17 | + <testCaseId value="ACP2E-3807"/> |
| 18 | + <useCaseId value="ACP2E-3807"/> |
| 19 | + <severity value="MINOR"/> |
| 20 | + <group value="Sales"/> |
| 21 | + </annotations> |
| 22 | + |
| 23 | + <before> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 25 | + <!-- Create customer --> |
| 26 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 27 | + <!-- Create store view --> |
| 28 | + <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView"> |
| 29 | + <argument name="customStore" value="customStore"/> |
| 30 | + </actionGroup> |
| 31 | + <!-- Create product --> |
| 32 | + <createData entity="SimpleProduct2" stepKey="createProduct"/> |
| 33 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexInvalidatedIndices"> |
| 34 | + <argument name="indices" value=""/> |
| 35 | + </actionGroup> |
| 36 | + </before> |
| 37 | + <after> |
| 38 | + <!-- Customer log out --> |
| 39 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> |
| 40 | + <!-- Delete customer --> |
| 41 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 42 | + <!-- Delete product --> |
| 43 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 44 | + <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView"> |
| 45 | + <argument name="customStore" value="customStore"/> |
| 46 | + </actionGroup> |
| 47 | + <!-- Admin log out --> |
| 48 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 49 | + </after> |
| 50 | + <!-- Login as customer --> |
| 51 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> |
| 52 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 53 | + </actionGroup> |
| 54 | + <!-- 2. Switch store view --> |
| 55 | + <amOnPage url="{{StorefrontProductPage.url($createProduct.custom_attributes[url_key]$)}}" stepKey="goToStore2ProductPage"/> |
| 56 | + <actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="SwitchStoreView"> |
| 57 | + <argument name="storeView" value="customStore"/> |
| 58 | + </actionGroup> |
| 59 | + <waitForPageLoad time="10" stepKey="waitForProductPageLoad"/> |
| 60 | + <!-- Add product to cart --> |
| 61 | + <click selector="{{StorefrontProductPageSection.addToCart}}" stepKey="addToCart"/> |
| 62 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> |
| 63 | + <actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRate"/> |
| 64 | + <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToReview"/> |
| 65 | + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrder"/> |
| 66 | + <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"> |
| 67 | + <argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage"/> |
| 68 | + <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/> |
| 69 | + </actionGroup> |
| 70 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> |
| 71 | + <actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchToDefaultStoreView"> |
| 72 | + <argument name="storeView" value="_defaultStore"/> |
| 73 | + </actionGroup> |
| 74 | + <amOnPage url="{{StorefrontCustomerDashboardPage.url}}" stepKey="navigateToCustomerDashboardPage"/> |
| 75 | + <waitForPageLoad stepKey="waitForPageLoad2"/> |
| 76 | + <scrollTo selector="{{StorefrontCustomerResentOrdersSection.blockResentOrders}}" stepKey="scrollToResent"/> |
| 77 | + <seeElement selector="{{StorefrontCustomerResentOrdersSection.viewOrder({$grabOrderNumber})}}" stepKey="seeOrderInGrid"/> |
| 78 | + </test> |
| 79 | +</tests> |
0 commit comments