Skip to content

Commit 48400ae

Browse files
authored
Merge pull request #3207 from magento-qwerty/2.3-bugfixes-150918
[Qwerty] Bugfixes
2 parents 09cfa64 + 7729695 commit 48400ae

File tree

25 files changed

+632
-812
lines changed

25 files changed

+632
-812
lines changed

app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<% if (data.items.length) { %>
4343
<% _.each(data.items, function(value){ %>
4444
<li class="item"
45-
<%- data.optionData(value) %>
45+
<%= data.optionData(value) %>
4646
>
4747
<a href="<%- value.url %>" class="title"><%- value.name %></a>
4848
<span class="type"><%- value.type %></span>

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<% } %>
1515
<ul data-mage-init='{"menu":[]}'>
1616
<% _.each(data.items, function(value) { %>
17-
<li <%- data.optionData(value) %>><a href="#"><%- value.label %></a></li>
17+
<li <%= data.optionData(value) %>><a href="#"><%- value.label %></a></li>
1818
<% }); %>
1919
</ul>
2020
<% if (!data.term && data.items.length && !data.allShown()) { %>

app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerOrderSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontCustomerOrderSection">
12+
<element name="isMyOrdersSection" type="text" selector="//*[@class='page-title']//*[contains(text(), 'My Orders')]"/>
1213
<element name="productCustomOptions" type="text" selector="//strong[contains(@class, 'product-item-name') and normalize-space(.)='{{var1}}']/following-sibling::*[contains(@class, 'item-options')]/dt[normalize-space(.)='{{var2}}']/following-sibling::dd[normalize-space(.)='{{var3}}']" parameterized="true"/>
1314
<element name="productCustomOptionsFile" type="text" selector="//strong[contains(@class, 'product-item-name') and normalize-space(.)='{{var1}}']/following-sibling::*[contains(@class, 'item-options')]/dt[normalize-space(.)='{{var2}}']/following-sibling::dd[contains(.,'{{var3}}')]" parameterized="true"/>
1415
<element name="productCustomOptionsLink" type="text" selector="//strong[contains(@class, 'product-item-name') and normalize-space(.)='{{var1}}']/following-sibling::*[contains(@class, 'item-options')]/dt[normalize-space(.)='{{var2}}']/following-sibling::dd//a[text() = '{{var3}}']" parameterized="true"/>

app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerOrderViewSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
<element name="myOrdersTable" type="text" selector="#my-orders-table"/>
1414
<element name="subtotal" type="text" selector=".subtotal .amount"/>
1515
<element name="paymentMethod" type="text" selector=".payment-method dt"/>
16+
<element name="printOrderLink" type="text" selector="a.action.print" timeout="30"/>
1617
</section>
1718
</sections>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="CreateOrderToPrintPageActionGroup">
12+
<arguments>
13+
<argument name="Category"/>
14+
</arguments>
15+
<amOnPage url="{{StorefrontCategoryPage.url(Category.name)}}" stepKey="onCategoryPage"/>
16+
<waitForPageLoad stepKey="waitForPageLoad1"/>
17+
<moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverProduct"/>
18+
<click selector="{{StorefrontCategoryMainSection.AddToCartBtn}}" stepKey="addToCart"/>
19+
<waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForProductAdded"/>
20+
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/>
21+
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout"/>
22+
<waitForPageLoad stepKey="waitForPageLoad2"/>
23+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
24+
<click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/>
25+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask2"/>
26+
<waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForNextButton"/>
27+
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext"/>
28+
<waitForElement selector="{{CheckoutPaymentSection.placeOrder}}" time="30" stepKey="waitForPlaceOrderButton"/>
29+
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/>
30+
<click selector="{{CheckoutSuccessMainSection.orderLink}}" stepKey="clickOrderLink"/>
31+
<click selector="{{StorefrontCustomerOrderViewSection.printOrderLink}}" stepKey="clickPrintOrderLink"/>
32+
</actionGroup>
33+
</actionGroups>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
11+
<page name="StorefrontCustomerSignOutPage" url="/customer/account/logout/" area="storefront" module="Magento_Customer"/>
12+
</pages>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
11+
<page name="StorefrontSalesOrderPrintPage" url="/sales/order/print/order_id/{{var1}}/" parameterized="true"
12+
area="storefront" module="Magento_Sales">
13+
<section name="SalesOrderPrintSection"/>
14+
</page>
15+
</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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="SalesOrderPrintSection">
12+
<element name="isOrderPrintPage" type="block" selector=".preview-area"/>
13+
</section>
14+
</sections>
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<test name="StorefrontRedirectToOrderHistory">
12+
<annotations>
13+
<features value="Redirection Rules"/>
14+
<title value="Create Invoice"/>
15+
<description
16+
value="Check while order printing URL with an id of not relevant order redirects to order history"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MAGETWO-92854"/>
19+
<group value="sales"/>
20+
</annotations>
21+
<before>
22+
<createData entity="_defaultCategory" stepKey="createCategory"/>
23+
<createData entity="_defaultProduct" stepKey="createProduct">
24+
<requiredEntity createDataKey="createCategory"/>
25+
</createData>
26+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
27+
<createData entity="Simple_US_Customer" stepKey="createCustomer2"/>
28+
</before>
29+
<after>
30+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
31+
<deleteData createDataKey="createCustomer2" stepKey="deleteCustomer2"/>
32+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
33+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
34+
</after>
35+
36+
<!--Log in to Storefront as Customer 1 -->
37+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="signUp">
38+
<argument name="Customer" value="$$createCustomer$$"/>
39+
</actionGroup>
40+
41+
<!--Create an order at Storefront as Customer 1 -->
42+
<actionGroup ref="CreateOrderToPrintPageActionGroup" stepKey="createOrderToPrint">
43+
<argument name="Category" value="$$createCategory$$"/>
44+
</actionGroup>
45+
46+
<!--Go to 'print order' page by grabbed order id-->
47+
<grabFromCurrentUrl regex="~/order_id/(\d+)/~" stepKey="grabOrderIdFromURL"/>
48+
<switchToNextTab stepKey="switchToPrintPage"/>
49+
<waitForElement selector="{{SalesOrderPrintSection.isOrderPrintPage}}" stepKey="checkPrintPage"/>
50+
<openNewTab stepKey="openNewTab"/>
51+
<switchToNextTab stepKey="switchForward"/>
52+
<amOnPage url="{{StorefrontSalesOrderPrintPage.url({$grabOrderIdFromURL})}}" stepKey="duplicatePrintPage"/>
53+
54+
<!--Log out as customer 1-->
55+
<switchToNextTab stepKey="switchForward2"/>
56+
<openNewTab stepKey="openNewTab2"/>
57+
<amOnPage url="{{StorefrontCustomerSignOutPage.url}}" stepKey="signOut"/>
58+
<waitForLoadingMaskToDisappear stepKey="waitSignOutPage"/>
59+
60+
<!--Log in to Storefront as Customer 2 -->
61+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="signUp2">
62+
<argument name="Customer" value="$$createCustomer2$$"/>
63+
</actionGroup>
64+
65+
<!--Create an order at Storefront as Customer 2 -->
66+
<actionGroup ref="CreateOrderToPrintPageActionGroup" stepKey="createOrderToPrint2">
67+
<argument name="Category" value="$$createCategory$$"/>
68+
</actionGroup>
69+
70+
<!--Try to load 'print order' page with not relevant order id to be redirected to 'order history' page-->
71+
<switchToNextTab stepKey="switchToPrintPage2"/>
72+
<waitForElement selector="{{SalesOrderPrintSection.isOrderPrintPage}}" stepKey="checkPrintPage2"/>
73+
<openNewTab stepKey="openNewTab3"/>
74+
<switchToNextTab stepKey="switchForward4"/>
75+
<amOnPage url="{{StorefrontSalesOrderPrintPage.url({$grabOrderIdFromURL})}}" stepKey="duplicatePrintPage2"/>
76+
<seeElement selector="{{StorefrontCustomerOrderSection.isMyOrdersSection}}" stepKey="waitOrderHistoryPage"/>
77+
</test>
78+
</tests>

app/code/Magento/Sales/view/frontend/layout/sales_guest_print.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,20 @@
1212
<body>
1313
<attribute name="class" value="sales-guest-view"/>
1414
<referenceContainer name="page.main.title">
15-
<block class="Magento\Sales\Block\Order\PrintShipment" name="order.status" template="Magento_Sales::order/order_status.phtml" />
16-
<block class="Magento\Sales\Block\Order\PrintShipment" name="order.date" template="Magento_Sales::order/order_date.phtml" />
15+
<block class="Magento\Sales\Block\Order\PrintShipment"
16+
name="order.status"
17+
template="Magento_Sales::order/order_status.phtml"
18+
cacheable="false" />
19+
<block class="Magento\Sales\Block\Order\PrintShipment"
20+
name="order.date"
21+
template="Magento_Sales::order/order_date.phtml"
22+
cacheable="false" />
1723
</referenceContainer>
1824
<referenceContainer name="content">
19-
<block class="Magento\Sales\Block\Order\PrintShipment" name="sales.order.print" template="Magento_Sales::order/view.phtml">
25+
<block class="Magento\Sales\Block\Order\PrintShipment"
26+
name="sales.order.print"
27+
template="Magento_Sales::order/view.phtml"
28+
cacheable="false">
2029
<block class="Magento\Sales\Block\Order\PrintShipment" name="order_items" template="Magento_Sales::order/items.phtml">
2130
<block class="Magento\Framework\View\Element\RendererList" name="sales.order.print.renderers" as="renderer.list" />
2231
<block class="Magento\Sales\Block\Order\Totals" name="order_totals" template="Magento_Sales::order/totals.phtml">

0 commit comments

Comments
 (0)