|
82 | 82 | <click stepKey="s102" selector="{{AdminEditCustomerInformationSection.orders}}"/>
|
83 | 83 | <see stepKey="s103" selector="{{AdminEditCustomerOrdersSection.orderGrid}}" userInput="$$simpleuscustomer.firstname$$ $$simpleuscustomer.lastname$$" />
|
84 | 84 | </test>
|
| 85 | + <test name="StorefrontCustomerCheckoutTestWithMultipleAddressesAndTaxRates"> |
| 86 | + <annotations> |
| 87 | + <title value="Customer Checkout with multiple addresses and tax rates"/> |
| 88 | + <description value="Should be able to place an order as a customer with multiple addresses and tax rates."/> |
| 89 | + <testCaseId value="MAGETWO-93109"/> |
| 90 | + </annotations> |
| 91 | + <before> |
| 92 | + <createData entity="SimpleSubCategory" stepKey="simplecategory"/> |
| 93 | + <createData entity="SimpleProduct" stepKey="simpleproduct1"> |
| 94 | + <requiredEntity createDataKey="simplecategory"/> |
| 95 | + </createData> |
| 96 | + <createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="multiple_address_customer"/> |
| 97 | + |
| 98 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 99 | + |
| 100 | + <!-- Go to tax rule page --> |
| 101 | + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulePage"/> |
| 102 | + <waitForPageLoad stepKey="waitForTaxRatePage"/> |
| 103 | + <click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/> |
| 104 | + <fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/> |
| 105 | + |
| 106 | + <!-- Add NY and CA tax rules --> |
| 107 | + <actionGroup ref="addNewTaxRateNoZip" stepKey="addNYTaxRate"> |
| 108 | + <argument name="taxCode" value="SimpleTaxNY"/> |
| 109 | + </actionGroup> |
| 110 | + |
| 111 | + <actionGroup ref="addNewTaxRateNoZip" stepKey="addCATaxRate"> |
| 112 | + <argument name="taxCode" value="SimpleTaxCA"/> |
| 113 | + </actionGroup> |
| 114 | + |
| 115 | + <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/> |
| 116 | + </before> |
| 117 | + <after> |
| 118 | + <!-- Go to the tax rule page and delete the row we created--> |
| 119 | + <amOnPage url="{{AdminTaxRuleGridPage.url}}" stepKey="goToTaxRulesPage"/> |
| 120 | + <waitForPageLoad stepKey="waitForRulesPage"/> |
| 121 | + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule"> |
| 122 | + <argument name="name" value="SampleRule"/> |
| 123 | + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> |
| 124 | + </actionGroup> |
| 125 | + |
| 126 | + <!-- Go to the tax rate page --> |
| 127 | + <amOnPage url="{{AdminTaxRateGridPage.url}}" stepKey="goToTaxRatesPage"/> |
| 128 | + <waitForPageLoad stepKey="waitForRatesPage"/> |
| 129 | + <!-- Delete the two tax rates that were created --> |
| 130 | + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate"> |
| 131 | + <argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/> |
| 132 | + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> |
| 133 | + </actionGroup> |
| 134 | + |
| 135 | + <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate"> |
| 136 | + <argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/> |
| 137 | + <argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/> |
| 138 | + </actionGroup> |
| 139 | + <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> |
| 140 | + <deleteData createDataKey="simpleproduct1" stepKey="deleteProduct1"/> |
| 141 | + <deleteData createDataKey="simplecategory" stepKey="deleteCategory"/> |
| 142 | + <deleteData createDataKey="multiple_address_customer" stepKey="deleteCustomer"/> |
| 143 | + </after> |
| 144 | + |
| 145 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> |
| 146 | + <argument name="Customer" value="$$multiple_address_customer$$" /> |
| 147 | + </actionGroup> |
| 148 | + |
| 149 | + <amOnPage url="{{StorefrontCategoryPage.url($$simplecategory.name$$)}}" stepKey="onCategoryPage1"/> |
| 150 | + <waitForPageLoad stepKey="waitForCatalogPageLoad1"/> |
| 151 | + <moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverProduct1"/> |
| 152 | + <click selector="{{StorefrontCategoryMainSection.AddToCartBtn}}" stepKey="addToCart1"/> |
| 153 | + <waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForProductAdded1"/> |
| 154 | + <see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added $$simpleproduct1.name$$ to your shopping cart." stepKey="seeAddedToCartMessage1"/> |
| 155 | + <see selector="{{StorefrontMinicartSection.quantity}}" userInput="1" stepKey="seeCartQuantity1"/> |
| 156 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart1" /> |
| 157 | + |
| 158 | + <click stepKey="selectFirstShippingMethod1" selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}"/> |
| 159 | + <waitForElement stepKey="waitForShippingMethodSelect1" selector="{{CheckoutShippingMethodsSection.next}}" time="30"/> |
| 160 | + <click stepKey="clickNextOnShippingMethodLoad1" selector="{{CheckoutShippingMethodsSection.next}}" /> |
| 161 | + <waitForPageLoad stepKey="waitForPaymentLoad1"/> |
| 162 | + <waitForElement stepKey="waitForPlaceOrderButton1" selector="{{CheckoutPaymentSection.placeOrder}}" time="30" /> |
| 163 | + <see stepKey="seeBillingAddressIsCorrect1" selector="{{CheckoutPaymentSection.billingAddress}}" userInput="{{US_Address_NY.street[0]}}" /> |
| 164 | + <click stepKey="clickPlaceOrderButton1" selector="{{CheckoutPaymentSection.placeOrder}}" /> |
| 165 | + <waitForPageLoad stepKey="waitForOrderSuccessPage1"/> |
| 166 | + <see stepKey="seeSuccessMessage1" selector="{{CheckoutSuccessMainSection.success}}" userInput="Your order number is:" /> |
| 167 | + |
| 168 | + <amOnPage url="{{StorefrontCategoryPage.url($$simplecategory.name$$)}}" stepKey="onCategoryPage2"/> |
| 169 | + <waitForPageLoad stepKey="waitForCatalogPageLoad2"/> |
| 170 | + <moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverProduct2"/> |
| 171 | + <click selector="{{StorefrontCategoryMainSection.AddToCartBtn}}" stepKey="addToCart2"/> |
| 172 | + <waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForProductAdded2"/> |
| 173 | + <see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added $$simpleproduct1.name$$ to your shopping cart." stepKey="seeAddedToCartMessage2"/> |
| 174 | + <see selector="{{StorefrontMinicartSection.quantity}}" userInput="1" stepKey="seeCartQuantity2"/> |
| 175 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart2" /> |
| 176 | + |
| 177 | + <click stepKey="changeShippingAddress" selector="{{CheckoutShippingMethodsSection.shipHereButton}}"/> |
| 178 | + <waitForElementVisible stepKey="waitForShippingMethodLoaderVisible" selector="{{CheckoutShippingMethodsSection.shippingMethodLoader}}" time="30"/> |
| 179 | + <waitForElementNotVisible stepKey="waitForShippingMethodLoaderNotVisible" selector="{{CheckoutShippingMethodsSection.shippingMethodLoader}}" time="30"/> |
| 180 | + <click stepKey="selectFirstShippingMethod2" selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}"/> |
| 181 | + <waitForElement stepKey="waitForShippingMethodSelect2" selector="{{CheckoutShippingMethodsSection.next}}" time="30"/> |
| 182 | + <click stepKey="clickNextOnShippingMethodLoad2" selector="{{CheckoutShippingMethodsSection.next}}" /> |
| 183 | + <waitForPageLoad stepKey="waitForPaymentLoad2"/> |
| 184 | + <waitForElement stepKey="waitForPlaceOrderButton2" selector="{{CheckoutPaymentSection.placeOrder}}" time="30" /> |
| 185 | + <see stepKey="seeBillingAddressIsCorrect2" selector="{{CheckoutPaymentSection.billingAddress}}" userInput="{{UK_Not_Default_Address.street[0]}}" /> |
| 186 | + <click stepKey="clickPlaceOrderButton2" selector="{{CheckoutPaymentSection.placeOrder}}" /> |
| 187 | + <waitForPageLoad stepKey="waitForOrderSuccessPage2"/> |
| 188 | + <see stepKey="seeSuccessMessage2" selector="{{CheckoutSuccessMainSection.success}}" userInput="Your order number is:" /> |
| 189 | + </test> |
85 | 190 | </tests>
|
0 commit comments