Skip to content

Commit b502108

Browse files
MAGETWO-98656: Purchasing a downloadable product as guest then creating an account on the onepagesuccess step doesn't link product with account
1 parent 068a4ac commit b502108

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

app/code/Magento/Customer/Test/Mftf/Page/StorefrontCustomerDownloadableProductsPage.xml renamed to app/code/Magento/Downloadable/Test/Mftf/Page/StorefrontCustomerDownloadableProductsPage.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
10-
<page name="StorefrontCustomerDownloadableProductsPage" url="downloadable/customer/products/" area="storefront" module="Magento_Customer">
10+
<page name="StorefrontCustomerDownloadableProductsPage" url="downloadable/customer/products/" area="storefront" module="Magento_Downloadable">
1111
<section name="StorefrontCustomerDownloadableProductsSection"/>
1212
</page>
1313
</pages>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="StorefrontCustomerDownloadableProductsSection">
12+
<element name="productName" type="text" selector="//table[@id='my-downloadable-products-table']//strong[contains(@class, 'product-name') and normalize-space(.)='{{productName}}']" parameterized="true"/>
13+
</section>
14+
</sections>

app/code/Magento/Downloadable/Test/Mftf/Test/LinkDownloadableProductFromGuestToCustomerTest.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<title value="Customer should see downloadable products after place order as guest and registering after that"/>
1515
<description value="Verify that in 'My Downloadable Products' section in customer account user can see products."/>
1616
<severity value="AVERAGE"/>
17+
<useCaseId value="MAGETWO-98656"/>
1718
<testCaseId value="MC-16011"/>
1819
</annotations>
1920
<before>
@@ -33,22 +34,23 @@
3334
</after>
3435
<!--Step 1: Go to Storefront as Guest-->
3536
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStorefrontPage"/>
36-
<!--Step 2: Add virtual product to shopping cart-->
37-
<amOnPage url="{{StorefrontProductPage.url($$createProduct.name$$)}}" stepKey="amOnStorefrontProductPage"/>
37+
<!--Step 2: Add downloadable product to shopping cart-->
38+
<amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="amOnStorefrontProductPage"/>
3839
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart">
3940
<argument name="product" value="$$createProduct$$"/>
4041
<argument name="productCount" value="1"/>
4142
</actionGroup>
4243
<!--Step 3: Go to checkout-->
4344
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart" />
44-
<!--Step 4: Checkout select Check/Money Order payment, fill required fields and click Update and Place Order-->
45+
<!--Step 4: Select Check/Money Order payment, fill required fields and click Update and Place Order-->
4546
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrderPayment"/>
4647
<actionGroup ref="GuestCheckoutSelectPaymentAndFillNewBillingAddressActionGroup" stepKey="changeAddress">
4748
<argument name="customerVar" value="Simple_US_Customer_NY"/>
4849
<argument name="customerAddressVar" value="US_Address_NY"/>
4950
<argument name="paymentMethod" value="Check / Money order"/>
5051
</actionGroup>
5152
<click selector="{{CheckoutShippingSection.updateAddress}}" stepKey="saveAddress"/>
53+
<waitForPageLoad stepKey="waitUpdateAddress"/>
5254
<actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="placeOrder">
5355
<argument name="orderNumberMessage" value="CONST.successGuestCheckoutOrderNumberMessage"/>
5456
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" />

0 commit comments

Comments
 (0)