|
10 | 10 | xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
|
11 | 11 | <test name="StorefrontCustomerCheckoutTest">
|
12 | 12 | <annotations>
|
13 |
| - <features value="Checkout"/> |
14 |
| - <stories value="Checkout via the Admin"/> |
15 |
| - <title value="Customer Checkout via the Admin"/> |
| 13 | + <features value="Customer Checkout"/> |
| 14 | + <stories value="Checkout via Storefront"/> |
| 15 | + <title value="Customer Checkout via Storefront"/> |
16 | 16 | <description value="Should be able to place an order as a customer."/>
|
17 | 17 | <severity value="CRITICAL"/>
|
18 |
| - <testCaseId value="MC-5922"/> |
| 18 | + <testCaseId value="MC-30274"/> |
19 | 19 | <group value="checkout"/>
|
20 |
| - <skip> |
21 |
| - <issueId value="MC-30111"/> |
22 |
| - </skip> |
23 | 20 | </annotations>
|
24 | 21 | <before>
|
25 |
| - <createData entity="SimpleSubCategory" stepKey="simplecategory"/> |
26 |
| - <createData entity="SimpleProduct" stepKey="simpleproduct1"> |
27 |
| - <requiredEntity createDataKey="simplecategory"/> |
| 22 | + <createData entity="SimpleSubCategory" stepKey="createCategory"/> |
| 23 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct"> |
| 24 | + <requiredEntity createDataKey="createCategory"/> |
28 | 25 | </createData>
|
29 |
| - <createData entity="Simple_US_Customer" stepKey="simpleuscustomer"/> |
| 26 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 27 | + <magentoCLI command="indexer:reindex" stepKey="reindex"/> |
30 | 28 | </before>
|
31 | 29 | <after>
|
32 |
| - <!--Clear filters--> |
33 |
| - <amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/> |
34 |
| - <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearExistingCustomerFilters"/> |
35 |
| - |
36 |
| - <actionGroup ref="logout" stepKey="logout"/> |
37 |
| - <deleteData createDataKey="simpleproduct1" stepKey="deleteProduct1"/> |
38 |
| - <deleteData createDataKey="simplecategory" stepKey="deleteCategory"/> |
| 30 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 31 | + <deleteData createDataKey="createCategory" stepKey="deleteSimpleCategory"/> |
| 32 | + <deleteData createDataKey="createCustomer" stepKey="deleteUsCustomer"/> |
| 33 | + <actionGroup ref="AdminClearCustomersFiltersActionGroup" stepKey="resetCustomerFilters"/> |
| 34 | + <actionGroup ref="logout" stepKey="logoutFromAdmin"/> |
| 35 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> |
39 | 36 | </after>
|
40 | 37 |
|
41 |
| - <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> |
42 |
| - <argument name="Customer" value="$$simpleuscustomer$$" /> |
| 38 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomerLogin"> |
| 39 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 40 | + </actionGroup> |
| 41 | + |
| 42 | + <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="navigateToCategoryPage"> |
| 43 | + <argument name="category" value="$$createCategory$$"/> |
43 | 44 | </actionGroup>
|
44 | 45 |
|
45 |
| - <amOnPage url="{{StorefrontCategoryPage.url($$simplecategory.name$$)}}" stepKey="onCategoryPage"/> |
46 | 46 | <waitForPageLoad stepKey="waitForCatalogPageLoad"/>
|
47 |
| - <moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverProduct"/> |
48 |
| - <click selector="{{StorefrontCategoryMainSection.AddToCartBtn}}" stepKey="addToCart"/> |
49 |
| - <waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForProductAdded"/> |
50 |
| - <see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added $$simpleproduct1.name$$ to your shopping cart." stepKey="seeAddedToCartMessage"/> |
51 |
| - <see selector="{{StorefrontMinicartSection.quantity}}" userInput="1" stepKey="seeCartQuantity"/> |
52 |
| - <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart" /> |
53 | 47 |
|
54 |
| - <click stepKey="s35" selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}"/> |
55 |
| - <waitForElement stepKey="s36" selector="{{CheckoutShippingMethodsSection.next}}" time="30"/> |
56 |
| - <click stepKey="s37" selector="{{CheckoutShippingMethodsSection.next}}" /> |
57 |
| - <!-- Checkout select Check/Money Order payment --> |
58 |
| - <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/> |
59 |
| - <waitForPageLoad stepKey="s39"/> |
60 |
| - <waitForElement stepKey="s41" selector="{{CheckoutPaymentSection.placeOrder}}" time="30" /> |
61 |
| - <see stepKey="s47" selector="{{CheckoutPaymentSection.billingAddress}}" userInput="{{US_Address_TX.street[0]}}" /> |
62 |
| - <click stepKey="s49" selector="{{CheckoutPaymentSection.placeOrder}}" /> |
63 |
| - <waitForPageLoad stepKey="s51"/> |
64 |
| - <grabTextFrom stepKey="s53" selector="{{CheckoutSuccessMainSection.orderNumber22}}"/> |
65 |
| - <see stepKey="s55" selector="{{CheckoutSuccessMainSection.success}}" userInput="Your order number is:" /> |
| 48 | + <actionGroup ref="StorefrontAddCategoryProductToCartActionGroup" stepKey="addProductToCart"> |
| 49 | + <argument name="product" value="$$createSimpleProduct$$"/> |
| 50 | + <argument name="productCount" value="CONST.one"/> |
| 51 | + </actionGroup> |
| 52 | + |
| 53 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> |
| 54 | + <actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRate"/> |
| 55 | + <actionGroup ref="StorefrontCheckoutForwardFromShippingStepActionGroup" stepKey="goToReview"/> |
| 56 | + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrder"/> |
| 57 | + <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"> |
| 58 | + <argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage"/> |
| 59 | + <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/> |
| 60 | + </actionGroup> |
66 | 61 |
|
67 |
| - <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> |
| 62 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="orderNumber"/> |
68 | 63 |
|
69 |
| - <amOnPage stepKey="s67" url="{{AdminOrdersPage.url}}"/> |
70 |
| - <waitForPageLoad stepKey="s75"/> |
71 |
| - <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearFiltersIfPresent"/> |
72 |
| - <fillField stepKey="s77" selector="{{AdminOrdersGridSection.search}}" userInput="{$s53}" /> |
73 |
| - <waitForPageLoad stepKey="s78"/> |
| 64 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
74 | 65 |
|
75 |
| - <click stepKey="s81" selector="{{AdminOrdersGridSection.submitSearch22}}" /> |
76 |
| - <waitForPageLoad stepKey="s831"/> |
77 |
| - <click stepKey="s84" selector="{{AdminOrdersGridSection.firstRow}}" /> |
78 |
| - <waitForPageLoad stepKey="waitForOrderToLoad"/> |
79 |
| - <see stepKey="s85" selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Pending" /> |
80 |
| - <see stepKey="s87" selector="{{AdminOrderDetailsInformationSection.accountInformation}}" userInput="Customer" /> |
81 |
| - <see stepKey="s89" selector="{{AdminOrderDetailsInformationSection.accountInformation}}" userInput="$$simpleuscustomer.email$$" /> |
82 |
| - <see stepKey="s91" selector="{{AdminOrderDetailsInformationSection.billingAddress}}" userInput="{{US_Address_TX.street[0]}}" /> |
83 |
| - <see stepKey="s93" selector="{{AdminOrderDetailsInformationSection.shippingAddress}}" userInput="{{US_Address_TX.street[0]}}" /> |
84 |
| - <see stepKey="s95" selector="{{AdminOrderDetailsInformationSection.itemsOrdered}}" userInput="$$simpleproduct1.name$$" /> |
| 66 | + <actionGroup ref="OpenOrderByIdActionGroup" stepKey="addFilterToGridAndOpenOrder"> |
| 67 | + <argument name="orderId" value="{$orderNumber}"/> |
| 68 | + </actionGroup> |
| 69 | + |
| 70 | + <see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Pending" stepKey="verifyOrderStatus"/> |
| 71 | + <see selector="{{AdminOrderDetailsInformationSection.accountInformation}}" userInput="Customer" stepKey="verifyAccountInformation"/> |
| 72 | + <see selector="{{AdminOrderDetailsInformationSection.accountInformation}}" userInput="$$createCustomer.email$$" stepKey="verifyCustomerEmail"/> |
| 73 | + <see selector="{{AdminOrderDetailsInformationSection.billingAddress}}" userInput="{{US_Address_TX.street[0]}}" stepKey="verifyBillingAddress"/> |
| 74 | + <see selector="{{AdminOrderDetailsInformationSection.shippingAddress}}" userInput="{{US_Address_TX.street[0]}}" stepKey="verifyShippingAddress"/> |
| 75 | + <see selector="{{AdminOrderDetailsInformationSection.itemsOrdered}}" userInput="$$createSimpleProduct.name$$" stepKey="verifyProductName"/> |
| 76 | + |
| 77 | + <actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openCustomerEditPage"> |
| 78 | + <argument name="customer" value="$$createCustomer$$"/> |
| 79 | + </actionGroup> |
85 | 80 |
|
86 |
| - <amOnPage stepKey="s96" url="{{AdminCustomerPage.url}}"/> |
87 |
| - <waitForPageLoad stepKey="s97"/> |
88 |
| - <waitForElementVisible selector="{{AdminCustomerFiltersSection.filtersButton}}" time="30" stepKey="waitFiltersButton"/> |
89 |
| - <click stepKey="s98" selector="{{AdminCustomerFiltersSection.filtersButton}}"/> |
90 |
| - <fillField stepKey="s99" selector="{{AdminCustomerFiltersSection.emailInput}}" userInput="$$simpleuscustomer.email$$"/> |
91 |
| - <click stepKey="s100" selector="{{AdminCustomerFiltersSection.apply}}"/> |
92 |
| - <click stepKey="s101" selector="{{AdminCustomerGridSection.firstRowEditLink}}"/> |
93 |
| - <click stepKey="s102" selector="{{AdminEditCustomerInformationSection.orders}}"/> |
94 |
| - <see stepKey="s103" selector="{{AdminEditCustomerOrdersSection.orderGrid}}" userInput="$$simpleuscustomer.firstname$$ $$simpleuscustomer.lastname$$" /> |
| 81 | + <click selector="{{AdminEditCustomerInformationSection.orders}}" stepKey="navigateToOrdersTab"/> |
| 82 | + <waitForElementVisible selector="{{AdminEditCustomerOrdersSection.orderGrid}}" stepKey="waitForOrdersGridVisible"/> |
| 83 | + <see selector="{{AdminEditCustomerOrdersSection.orderGrid}}" userInput="$$createCustomer.firstname$$ $$createCustomer.lastname$$" stepKey="verifyOrder"/> |
95 | 84 | </test>
|
96 | 85 | <test name="StorefrontCustomerCheckoutTestWithMultipleAddressesAndTaxRates">
|
97 | 86 | <annotations>
|
|
0 commit comments