|
| 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 | +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> |
| 10 | + |
| 11 | + <!-- Go To Product Page --> |
| 12 | + <actionGroup name="GoToProductPage"> |
| 13 | + <click selector="{{GoToProductPageSection.catalog}}" stepKey="clickOnCatalog" /> |
| 14 | + <waitForPageLoad stepKey="waitForPage"/> |
| 15 | + <click selector="{{GoToProductPageSection.product}}" stepKey="clickToSelectProductsItem" /> |
| 16 | + <waitForPageLoad stepKey="waitForPageProducts"/> |
| 17 | + </actionGroup> |
| 18 | + |
| 19 | + <!-- Create Simple Product --> |
| 20 | + <actionGroup name="CreateSimpleProduct"> |
| 21 | + <arguments> |
| 22 | + <argument name="product" defaultValue="SimpleProduct"/> |
| 23 | + </arguments> |
| 24 | + <click selector="{{GoToProductPageSection.add}}" stepKey="clickToAddProduct"/> |
| 25 | + <waitForPageLoad stepKey="WaitForProductPageIsLoaded"/> |
| 26 | + <fillField selector="{{AdminAddSimpleProductSection.productName}}" userInput="{{product.name}}" stepKey="setNameForProduct"/> |
| 27 | + <fillField selector="{{AdminAddSimpleProductSection.productSku}}" userInput="{{product.sku}}" stepKey="setSKUForProduct"/> |
| 28 | + <fillField selector="{{AdminAddSimpleProductSection.productPrice}}" userInput="{{product.price}}" stepKey="setPriceForProduct"/> |
| 29 | + <fillField selector="{{AdminAddSimpleProductSection.productQuantity}}" userInput="{{product.quantity}}" stepKey="setQuantityForProduct"/> |
| 30 | + <click selector="{{AdminAddSimpleProductSection.searchOptimization}}" stepKey="clickOnSearchEngineOptimization"/> |
| 31 | + <fillField selector="{{AdminAddSimpleProductSection.urlKey}}" userInput="{{product.urlKey}}" stepKey="setSearchUrlForProduct"/> |
| 32 | + <click selector="{{AdminAddSimpleProductSection.saveButton}}" stepKey="clickSaveProduct"/> |
| 33 | + <waitForPageLoad stepKey="WaitForProductSave"/> |
| 34 | + <see userInput="You saved the product." stepKey="seeSaveConfirmation"/> |
| 35 | + </actionGroup> |
| 36 | + |
| 37 | + <!--Create Account --> |
| 38 | + <actionGroup name="StorefrontCreateAccountActionGroup"> |
| 39 | + <click selector="{{StorefrontCreateAccountSection.createAccount}}" stepKey="ClickToCreateAccount"/> |
| 40 | + <waitForPageLoad stepKey="waitForAccountFormIsOpened"/> |
| 41 | + <fillField selector="{{StorefrontCreateAccountSection.firstName}}" userInput="{{CreateUserData.firstName}}" stepKey="TypeFirstName"/> |
| 42 | + <fillField selector="{{StorefrontCreateAccountSection.lastName}}" userInput="{{CreateUserData.lastName}}" stepKey="TypeLastName"/> |
| 43 | + <fillField selector="{{StorefrontCreateAccountSection.email}}" userInput="{{CreateUserData.firstName}}@magento.com" stepKey="TypeEmail"/> |
| 44 | + <fillField selector="{{StorefrontCreateAccountSection.password}}" userInput="{{CreateUserData.password}}" stepKey="TypePassword"/> |
| 45 | + <waitForPageLoad stepKey="waitToConfirmPassword"/> |
| 46 | + <fillField selector="{{StorefrontCreateAccountSection.confirmPass}}" userInput="{{CreateUserData.password}}" stepKey="confirmPassword"/> |
| 47 | + <click selector="{{StorefrontCreateAccountSection.create}}" stepKey="ClickToSaveAccount"/> |
| 48 | + <waitForPageLoad stepKey="waitForAccountPageLoaded"/> |
| 49 | + </actionGroup> |
| 50 | + |
| 51 | + <!--Find and add product to cart--> |
| 52 | + <actionGroup name="FindAndAddProductToCardActionGroup"> |
| 53 | + <!--Navigate to a category page --> |
| 54 | + <amOnPage url="/{{SimpleProduct.name}}.html" stepKey="goToCreatedProductPage"/> |
| 55 | + <waitForPageLoad stepKey="waitForProductPageLoaded"/> |
| 56 | + <click selector="{{StorefrontAddCreatedProductToCartSection.addToCartBtn}}" stepKey="addToCart"/> |
| 57 | + <waitForElementVisible selector="{{StorefrontAddCreatedProductToCartSection.successMessage}}" time="30" stepKey="waitForProductAdded"/> |
| 58 | + <click selector="{{StorefrontAddCreatedProductToCartSection.showCard}}" stepKey="clickToOpenCard"/> |
| 59 | + <waitForPageLoad stepKey="WaitForFormOpened"/> |
| 60 | + <click selector="{{StorefrontAddCreatedProductToCartSection.proceed}}" stepKey="clickToProceedToCheckout"/> |
| 61 | + <waitForPageLoad stepKey="waitForTheFormIsOpened"/> |
| 62 | + <see userInput="Shipping Address" stepKey="seeShippingAddress"/> |
| 63 | + </actionGroup> |
| 64 | + |
| 65 | + <!--Fill shipment form--> |
| 66 | + <actionGroup name="FillShipmentFormActionGroup"> |
| 67 | + <fillField selector="{{ShipmentFormSection.street}}" userInput="{{Account.street}}" stepKey="SetCustomerStreetAddress"/> |
| 68 | + <fillField selector="{{ShipmentFormSection.city}}" userInput="{{Account.city}}" stepKey="SetCustomerCity"/> |
| 69 | + <fillField selector="{{ShipmentFormSection.postcode}}" userInput="{{Account.postcode}}" stepKey="SetCustomerZipCode"/> |
| 70 | + <fillField selector="{{ShipmentFormSection.telephone}}" userInput="{{Account.telephone}}" stepKey="SetCustomerPhoneNumber"/> |
| 71 | + <click selector="{{ShipmentFormSection.region}}" stepKey="clickToSetState"/> |
| 72 | + <click selector="{{ShipmentFormSection.state}}" stepKey="clickToChooseState"/> |
| 73 | + <click selector="{{ShipmentFormSection.stateAlabama}}" stepKey="chooseStateAlabama"/> |
| 74 | + <click selector="{{ShipmentFormSection.next}}" stepKey="clickToSaveShippingInfo"/> |
| 75 | + <waitForPageLoad stepKey="waitForReviewAndPaymentsPageIsLoaded"/> |
| 76 | + </actionGroup> |
| 77 | + |
| 78 | + <!--Mark "My billing and shipping address are the same"--> |
| 79 | + <actionGroup name="MarkMyBillingAndShippingAddressAreTheSame"> |
| 80 | + <conditionalClick selector="{{ShipmentFormSection.billingShippingAddressTheSameCheckbox}}" dependentSelector="{{ShipmentFormSection.placeOrderButton}}" visible="0" stepKey="selectkMyBillingAndShippingAddressAreTheSameCheckbox"/> |
| 81 | + <click stepKey="clickPlaceOrderButton" selector="{{ShipmentFormSection.placeOrderButton}}"/> |
| 82 | + <waitForPageLoad stepKey="waitForCheckoutPageLoaded"/> |
| 83 | + <see stepKey="seeSuccessfulMessage" userInput="Thank you for your purchase!"/> |
| 84 | + </actionGroup> |
| 85 | + |
| 86 | + <!--Go To My Account Page--> |
| 87 | + <actionGroup name="GoToMyAccountPage"> |
| 88 | + <click stepKey="clickCustomerNameItem" selector="{{GoToMyAccountSection.customerName}}"/> |
| 89 | + <click stepKey="clickMyAccountItem" selector="{{GoToMyAccountSection.myAccountItem}}"/> |
| 90 | + <waitForPageLoad stepKey="waitForMyAccountPageLoaded"/> |
| 91 | + </actionGroup> |
| 92 | + |
| 93 | + <!--Assert That Shipping And Billing Address are the same--> |
| 94 | + <actionGroup name="AssertThatShippingAndBillingAddressTheSame"> |
| 95 | + <!--Get shipping and billing addresses--> |
| 96 | + <grabTextFrom selector="{{ShipmentFormSection.shippingAddress}}" stepKey="shippingAddr"/> |
| 97 | + <grabTextFrom selector="{{ShipmentFormSection.billingAddress}}" stepKey="billingAddr"/> |
| 98 | + <!--Make sure that shipping and billing addresses are different--> |
| 99 | + <see userInput="Shipping Address" stepKey="seeShippingAddress"/> |
| 100 | + <see userInput="Billing Address" stepKey="seeBillingAddress"/> |
| 101 | + <assertEquals stepKey="assert" actual="$billingAddr" expected="$shippingAddr"/> |
| 102 | + </actionGroup> |
| 103 | + |
| 104 | + <!-- Delete Created Product --> |
| 105 | + <actionGroup name="DeleteCreatedProduct"> |
| 106 | + <conditionalClick selector="{{DeleteCreatedProductSection.clearAll}}" dependentSelector="{{DeleteCreatedProductSection.clearAll}}" visible="1" stepKey="clickClearAllIfThereIsAnyValue"/> |
| 107 | + <click stepKey="clickFilterButton" selector="{{DeleteCreatedProductSection.filterButton}}"/> |
| 108 | + <waitForElementVisible selector="{{DeleteCreatedProductSection.filterSKUField}}" stepKey="waitForFilterDataLoaded"/> |
| 109 | + <fillField stepKey="searchProductUsingSKUField" selector="{{DeleteCreatedProductSection.filterSKUField}}" userInput="{{SimpleProduct.sku}}"/> |
| 110 | + <click stepKey="clickFiltersApplyButton" selector="{{DeleteCreatedProductSection.filtersApplyButton}}"/> |
| 111 | + <waitForElementNotVisible selector="{{DeleteCreatedProductSection.filterSKUField}}" stepKey="waitForFilterBecomeNotVisible"/> |
| 112 | + <click selector="{{DeleteCreatedProductSection.createdProductID}}" stepKey="selectCreatedProduct"/> |
| 113 | + <wait stepKey="waitSelectCreatedProduct" time="2"/> |
| 114 | + <waitForElementVisible selector="{{DeleteCreatedProductSection.actionSelectBox}}" stepKey="waitToSelectActionVisible"/> |
| 115 | + <click stepKey="clickToSelectAction" selector="{{DeleteCreatedProductSection.actionSelectBox}}"/> |
| 116 | + <waitForElementVisible selector="{{DeleteCreatedProductSection.deleteButton}}" stepKey="waitForDeleteButtonAppeared"/> |
| 117 | + <click selector="{{DeleteCreatedProductSection.deleteButton}}" stepKey="clickToDeleteProduct"/> |
| 118 | + <waitForElementVisible selector="{{DeleteCreatedProductSection.okButton}}" stepKey="waitForOkButtonAppeared"/> |
| 119 | + <click selector="{{DeleteCreatedProductSection.okButton}}" stepKey="clickToConfirm"/> |
| 120 | + <wait stepKey="waitForRecordIsDeleted" time="2"/> |
| 121 | + <see userInput="A total of 1 record(s) have been deleted." stepKey="productDeletedSuccessfully"/> |
| 122 | + <click stepKey="clickClearAllFilterButton" selector="{{DeleteCreatedProductSection.clearAll}}"/> |
| 123 | + <wait stepKey="waitToClearAllFilters" time="2"/> |
| 124 | + </actionGroup> |
| 125 | + |
| 126 | + <!--Delete created Customer --> |
| 127 | + <actionGroup name="DeleteCreatedCustomerActionGroup"> |
| 128 | + <click stepKey="clickCustomerItem" selector="{{DashboardSection.customer}}"/> |
| 129 | + <wait stepKey="WaitForCustomerViewOpened" time="2"/> |
| 130 | + <click stepKey="clickCustomerAllCustomerItem" selector="{{DashboardSection.customerAllCustomer}}"/> |
| 131 | + <waitForPageLoad stepKey="WaitForCustomerPageIsLoaded"/> |
| 132 | + <fillField stepKey="searchToKeyword" selector="{{AdminCustomerAccInformationSection.searchToKeyword}}" userInput="{{CreateUserData.firstName}}"/> |
| 133 | + <click stepKey="clickSearchButton" selector="{{AdminCustomerAccInformationSection.searchButton}}"/> |
| 134 | + <waitForElementVisible stepKey="waitForFiltering" selector="{{AdminCustomerAccInformationSection.selectCustomer}}"/> |
| 135 | + <click selector="{{AdminCustomerAccInformationSection.selectCustomer}}" stepKey="ClickOnCustomer"/> |
| 136 | + <click selector="{{AdminCustomerAccInformationSection.actions}}" stepKey="ClickOnActions"/> |
| 137 | + <waitForElementVisible selector="{{AdminCustomerAccInformationSection.delete}}" stepKey="waitForDeleteButtonAppeared"/> |
| 138 | + <click selector="{{AdminCustomerAccInformationSection.delete}}" stepKey="ClickOnDelete"/> |
| 139 | + <waitForElementVisible selector="{{AdminCustomerAccInformationSection.confirm}}" stepKey="waitForConfirmButtonAppeared"/> |
| 140 | + <click selector="{{AdminCustomerAccInformationSection.confirm}}" stepKey="ClickToConfirm"/> |
| 141 | + <waitForPageLoad stepKey="waitClickToConfirmButton"/> |
| 142 | + <click stepKey="clickClearAllFilterButton" selector="{{DeleteCreatedProductSection.clearAll}}"/> |
| 143 | + <wait stepKey="waitToClearAllFilters" time="2"/> |
| 144 | + </actionGroup> |
| 145 | + |
| 146 | +</actionGroups> |
0 commit comments