Skip to content

Commit e05cfbe

Browse files
authored
Merge pull request #4063 from magento-performance/MC-15779
[performance] MC-15779: Create coupon test functionality for our benchmark
2 parents 6cc245b + ccdaff5 commit e05cfbe

File tree

26 files changed

+1096
-61
lines changed

26 files changed

+1096
-61
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ switch ($type = $block->getType()) {
169169
<?php if ($type == 'related' && $canItemsAddToCart): ?>
170170
<div class="block-actions">
171171
<?= /* @escapeNotVerified */ __('Check items to add to the cart or') ?>
172-
<button type="button" class="action select" role="select-all"><span><?= /* @escapeNotVerified */ __('select all') ?></span></button>
172+
<button type="button" class="action select" role="button"><span><?= /* @escapeNotVerified */ __('select all') ?></span></button>
173173
</div>
174174
<?php endif; ?>
175175
<div class="products wrapper grid products-grid products-<?= /* @escapeNotVerified */ $type ?>">

app/code/Magento/Catalog/view/frontend/web/js/related-products.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ define([
1717
relatedProductsField: '#related-products-field', // Hidden input field that stores related products.
1818
selectAllMessage: $.mage.__('select all'),
1919
unselectAllMessage: $.mage.__('unselect all'),
20-
selectAllLink: '[role="select-all"]',
20+
selectAllLink: '[role="button"]',
2121
elementsSelector: '.item.product'
2222
},
2323

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingGuestInfoSection.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="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="CheckoutShippingGuestInfoSection">
12-
<element name="email" type="input" selector="#customer-email"/>
12+
<element name="email" type="input" selector="#checkout-customer-email"/>
1313
<element name="firstName" type="input" selector="input[name=firstname]"/>
1414
<element name="lastName" type="input" selector="input[name=lastname]"/>
1515
<element name="street" type="input" selector="input[name='street[0]']"/>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<element name="editAddressButton" type="button" selector=".action-edit-address" timeout="30"/>
1616
<element name="addressDropdown" type="select" selector="[name=billing_address_id]"/>
1717
<element name="newAddressButton" type="button" selector=".action-show-popup" timeout="30"/>
18-
<element name="email" type="input" selector="#customer-email"/>
18+
<element name="email" type="input" selector="#checkout-customer-email"/>
1919
<element name="firstName" type="input" selector="input[name=firstname]"/>
2020
<element name="lastName" type="input" selector="input[name=lastname]"/>
2121
<element name="company" type="input" selector="input[name=company]"/>

app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -84,20 +84,20 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
8484
<?php endif; ?>
8585
<td class="col qty" data-th="<?= $block->escapeHtml(__('Qty')) ?>">
8686
<div class="field qty">
87-
<label class="label" for="cart-<?= /* @escapeNotVerified */ $_item->getId() ?>-qty">
88-
<span><?= /* @escapeNotVerified */ __('Qty') ?></span>
89-
</label>
9087
<div class="control qty">
91-
<input id="cart-<?= /* @escapeNotVerified */ $_item->getId() ?>-qty"
92-
name="cart[<?= /* @escapeNotVerified */ $_item->getId() ?>][qty]"
93-
data-cart-item-id="<?= $block->escapeHtml($_item->getSku()) ?>"
94-
value="<?= /* @escapeNotVerified */ $block->getQty() ?>"
95-
type="number"
96-
size="4"
97-
title="<?= $block->escapeHtml(__('Qty')) ?>"
98-
class="input-text qty"
99-
data-validate="{required:true,'validate-greater-than-zero':true}"
100-
data-role="cart-item-qty"/>
88+
<label for="cart-<?= /* @escapeNotVerified */ $_item->getId() ?>-qty">
89+
<span class="label"><?= /* @escapeNotVerified */ __('Qty') ?></span>
90+
<input id="cart-<?= /* @escapeNotVerified */ $_item->getId() ?>-qty"
91+
name="cart[<?= /* @escapeNotVerified */ $_item->getId() ?>][qty]"
92+
data-cart-item-id="<?= $block->escapeHtml($_item->getSku()) ?>"
93+
value="<?= /* @escapeNotVerified */ $block->getQty() ?>"
94+
type="number"
95+
size="4"
96+
title="<?= $block->escapeHtml(__('Qty')) ?>"
97+
class="input-text qty"
98+
data-validate="{required:true,'validate-greater-than-zero':true}"
99+
data-role="cart-item-qty"/>
100+
</label>
101101
</div>
102102
</div>
103103
</td>

app/code/Magento/Checkout/view/frontend/web/template/authentication.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
<div class="block block-customer-login"
3232
data-bind="attr: {'data-label': $t('or')}">
3333
<div class="block-title">
34-
<strong id="block-customer-login-heading"
35-
role="heading"
36-
aria-level="2"
37-
data-bind="i18n: 'Sign In'"></strong>
34+
<strong id="block-customer-login-heading-checkout"
35+
role="heading"
36+
aria-level="2"
37+
data-bind="i18n: 'Sign In'"></strong>
3838
</div>
3939
<!-- ko foreach: getRegion('messages') -->
4040
<!-- ko template: getTemplate() --><!-- /ko -->
4141
<!--/ko-->
42-
<div class="block-content" aria-labelledby="block-customer-login-heading">
42+
<div class="block-content" aria-labelledby="block-customer-login-heading-checkout">
4343
<form data-role="login"
4444
data-bind="submit:login"
4545
method="post">

app/code/Magento/Checkout/view/frontend/web/template/form/element/email.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
method="post">
1515
<fieldset id="customer-email-fieldset" class="fieldset" data-bind="blockLoader: isLoading">
1616
<div class="field required">
17-
<label class="label" for="customer-email">
17+
<label class="label" for="checkout-customer-email">
1818
<span data-bind="i18n: 'Email Address'"></span>
1919
</label>
2020
<div class="control _with-tooltip">
@@ -26,7 +26,7 @@
2626
mageInit: {'mage/trim-input':{}}"
2727
name="username"
2828
data-validate="{required:true, 'validate-email':true}"
29-
id="customer-email" />
29+
id="checkout-customer-email" />
3030
<!-- ko template: 'ui/form/element/helper/tooltip' --><!-- /ko -->
3131
<span class="note" data-bind="fadeVisible: isPasswordVisible() == false"><!-- ko i18n: 'You can create an account after checkout.'--><!-- /ko --></span>
3232
</div>

app/code/Magento/Checkout/view/frontend/web/template/summary/cart-items.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
-->
77
<div class="block items-in-cart" data-bind="mageInit: {'collapsible':{'openedState': 'active', 'active': isItemsBlockExpanded()}}">
88
<div class="title" data-role="title">
9-
<strong role="heading">
9+
<strong role="heading" aria-level="1">
1010
<translate args="maxCartItemsToDisplay" if="maxCartItemsToDisplay < getCartLineItemsCount()"/>
1111
<translate args="'of'" if="maxCartItemsToDisplay < getCartLineItemsCount()"/>
1212
<span data-bind="text: getCartLineItemsCount()"></span>

app/code/Magento/Elasticsearch/Model/ResourceModel/Fulltext/Collection/SearchCriteriaResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function resolve(): SearchCriteria
7979
$this->builder->setPageSize($this->size);
8080
$searchCriteria = $this->builder->create();
8181
$searchCriteria->setRequestName($this->searchRequestName);
82-
$searchCriteria->setSortOrders($this->orders);
82+
$searchCriteria->setSortOrders(array_merge(['relevance' => 'DESC'], $this->orders));
8383
$searchCriteria->setCurrentPage($this->currentPage - 1);
8484

8585
return $searchCriteria;

app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,24 @@
1919
data-mage-init='{"validation": {"errorClass": "mage-error"}}'
2020
id="newsletter-validate-detail">
2121
<div class="field newsletter">
22-
<label class="label" for="newsletter"><span><?= $block->escapeHtml(__('Sign Up for Our Newsletter:')) ?></span></label>
2322
<div class="control">
24-
<input name="email" type="email" id="newsletter"
25-
placeholder="<?= $block->escapeHtml(__('Enter your email address')) ?>"
26-
data-mage-init='{"mage/trim-input":{}}'
27-
data-validate="{required:true, 'validate-email':true}"/>
23+
<label for="newsletter">
24+
<span class="label">
25+
<?= $block->escapeHtml(__('Sign Up for Our Newsletter:')) ?>
26+
</span>
27+
<input name="email" type="email" id="newsletter"
28+
placeholder="<?= $block->escapeHtml(__('Enter your email address')) ?>"
29+
data-mage-init='{"mage/trim-input":{}}'
30+
data-validate="{required:true, 'validate-email':true}"
31+
/>
32+
</label>
2833
</div>
2934
</div>
3035
<div class="actions">
31-
<button class="action subscribe primary" title="<?= $block->escapeHtmlAttr(__('Subscribe')) ?>" type="submit">
36+
<button class="action subscribe primary sr-only"
37+
title="<?= $block->escapeHtmlAttr(__('Subscribe')) ?>"
38+
type="submit"
39+
aria-label="Subscribe">
3240
<span><?= $block->escapeHtml(__('Subscribe')) ?></span>
3341
</button>
3442
</div>

0 commit comments

Comments
 (0)