Skip to content

Commit 39ba713

Browse files
committed
MAGETWO-90301: Extend MFTF tests to check Checkout Success page
1 parent 8a56b29 commit 39ba713

File tree

5 files changed

+10
-16
lines changed

5 files changed

+10
-16
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutShippingMethodsSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1111
<section name="CheckoutShippingMethodsSection">
12-
<element name="next" type="button" selector="button.button.action.continue.primary"/>
12+
<element name="next" type="button" selector="button.button.action.continue.primary" timeout="30"/>
1313
<element name="firstShippingMethod" type="radio" selector="//*[@id='checkout-shipping-method-load']//input[@class='radio']"/>
1414
<element name="shippingMethodRow" type="text" selector=".form.methods-shipping table tbody tr"/>
1515
<element name="checkShippingMethodByName" type="radio" selector="//div[@id='checkout-shipping-method-load']//td[contains(., '{{var1}}')]/..//input" parameterized="true"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutShippingSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<element name="region" type="select" selector="select[name=region_id]"/>
2121
<element name="postcode" type="input" selector="input[name=postcode]"/>
2222
<element name="telephone" type="input" selector="input[name=telephone]"/>
23-
<element name="next" type="button" selector="button.button.action.continue.primary"/>
23+
<element name="next" type="button" selector="button.button.action.continue.primary" timeout="30"/>
2424
<element name="firstShippingMethod" type="radio" selector="//*[@id='checkout-shipping-method-load']//input[@class='radio']"/>
2525
</section>
2626
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutSuccessMainSection.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
<element name="success" type="text" selector="div.checkout-success"/>
1414
<element name="orderNumber" type="text" selector="div.checkout-success > p:nth-child(1) > span"/>
1515
<element name="orderNumber22" type="text" selector=".order-number>strong"/>
16-
<element name="orderLink" type="text" selector="a[href*=order_id].order-number"/>
16+
<element name="orderLink" type="text" selector="a[href*=order_id].order-number" timeout="30"/>
1717
<element name="orderNumberText" type="text" selector=".checkout-success > p:nth-child(1)"/>
18-
<element name="continueShoppingButton" type="button" selector=".action.primary.continue"/>
19-
<element name="printLink" type="button" selector=".print"/>
18+
<element name="continueShoppingButton" type="button" selector=".action.primary.continue" timeout="30"/>
19+
<element name="printLink" type="button" selector=".print" timeout="30"/>
2020
</section>
2121
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/CheckoutSuccessRegisterSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
<section name="CheckoutSuccessRegisterSection">
1212
<element name="registerMessage" type="text" selector="#registration p:nth-child(1)"/>
1313
<element name="customerEmail" type="text" selector="#registration p:nth-child(2)"/>
14-
<element name="createAccountButton" type="button" selector="#registration form input[type='submit']"/>
14+
<element name="createAccountButton" type="button" selector="#registration form input[type='submit']" timeout="30"/>
1515
</section>
1616
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/CheckCheckoutSuccessPageTest.xml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,11 @@
5959

6060
<!--Click Place Order button-->
6161
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/>
62-
<waitForElement selector="{{CheckoutSuccessMainSection.success}}" time="30" stepKey="waitForLoadSuccessPage"/>
6362
<see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="seeSuccessTitle"/>
6463
<see selector="{{CheckoutSuccessMainSection.orderNumberText}}" userInput="Your order number is: " stepKey="seeOrderNumber"/>
6564
<see selector="{{CheckoutSuccessMainSection.success}}" userInput="We'll email you an order confirmation with details and tracking info." stepKey="seeSuccessNotify"/>
6665

6766
<click selector="{{CheckoutSuccessMainSection.orderLink}}" stepKey="clickOrderLink"/>
68-
<waitForElement selector="{{StorefrontCustomerOrderViewSection.orderTitle}}" stepKey="waitOrderViewPage"/>
6967
<seeInCurrentUrl url="{{StorefrontCustomerOrderPage.url}}" stepKey="seeMyOrderPage"/>
7068

7169
<!--Go to product page-->
@@ -87,9 +85,8 @@
8785

8886
<!--Click Place Order button-->
8987
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder2"/>
90-
<waitForElement selector="{{CheckoutSuccessMainSection.success}}" time="30" stepKey="waitForLoadSuccessPage2"/>
88+
<see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage2"/>
9189
<click selector="{{CheckoutSuccessMainSection.continueShoppingButton}}" stepKey="clickContinueShoppingButton"/>
92-
<waitForElement selector="{{StorefrontCMSPageSection.mainTitle}}" stepKey="waitHomePage"/>
9390
<see userInput="Home Page" selector="{{StorefrontCMSPageSection.mainTitle}}" stepKey="seeHomePageTitle"/>
9491
<seeCurrentUrlEquals url="{{_ENV.MAGENTO_BASE_URL}}" stepKey="seeHomePageUrl"/>
9592

@@ -112,7 +109,7 @@
112109

113110
<!--Click Place Order button-->
114111
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder3"/>
115-
<waitForElement selector="{{CheckoutSuccessMainSection.success}}" time="30" stepKey="waitForLoadSuccessPage3"/>
112+
<see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage3"/>
116113

117114
<!--Check "Print Receipt" button is presented (desktop only)-->
118115
<seeElement selector="{{CheckoutSuccessMainSection.printLink}}" stepKey="seeVisiblePrint"/>
@@ -123,7 +120,6 @@
123120

124121
<!--See print page-->
125122
<click selector="{{CheckoutSuccessMainSection.printLink}}" stepKey="clickPrintLink"/>
126-
<waitForPageLoad stepKey="waitPrintPage"/>
127123
<switchToWindow stepKey="switchToWindow"/>
128124
<switchToNextTab stepKey="switchToTab"/>
129125
<seeInCurrentUrl url="sales/order/print/order_id" stepKey="seePrintPage"/>
@@ -169,7 +165,7 @@
169165

170166
<!--Click Place Order button-->
171167
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/>
172-
<waitForElement selector="{{CheckoutSuccessMainSection.success}}" time="30" stepKey="waitForLoadSuccessPage"/>
168+
<see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage"/>
173169

174170
<!--See success messages-->
175171
<see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="seeSuccessTitle"/>
@@ -181,7 +177,6 @@
181177
<see selector="{{CheckoutSuccessRegisterSection.customerEmail}}" userInput="Email Address: {{CustomerEntityOne.email}}" stepKey="seeCustomerEmail"/>
182178
<seeElement selector="{{CheckoutSuccessRegisterSection.createAccountButton}}" stepKey="seeVisibleCreateAccountButton"/>
183179
<click selector="{{CheckoutSuccessRegisterSection.createAccountButton}}" stepKey="clickCreateAccountButton"/>
184-
<waitForElement selector="{{StorefrontCMSPageSection.mainTitle}}" stepKey="waitAccountPage"/>
185180
<seeInCurrentUrl url="{{StorefrontCustomerCreatePage.url}}" stepKey="seeCreateAccountPage"/>
186181
<see userInput="Create New Customer Account" selector="{{StorefrontCMSPageSection.mainTitle}}" stepKey="seeCreateAccountPageTitle"/>
187182

@@ -203,11 +198,10 @@
203198

204199
<!--Click Place Order button-->
205200
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder2"/>
206-
<waitForElement selector="{{CheckoutSuccessMainSection.success}}" time="30" stepKey="waitForLoadSuccessPage2"/>
201+
<see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage2"/>
207202

208203
<!--Continue shopping-->
209204
<click selector="{{CheckoutSuccessMainSection.continueShoppingButton}}" stepKey="clickContinueShoppingButton"/>
210-
<waitForElement selector="{{StorefrontCMSPageSection.mainTitle}}" stepKey="waitHomePage"/>
211205
<seeCurrentUrlEquals url="{{_ENV.MAGENTO_BASE_URL}}" stepKey="seeHomePageUrl"/>
212206
<see userInput="Home Page" selector="{{StorefrontCMSPageSection.mainTitle}}" stepKey="seeHomePageTitle"/>
213207
</test>

0 commit comments

Comments
 (0)