Skip to content

Commit b5ba5b9

Browse files
committed
Merge remote-tracking branch 'origin/2.3-develop' into MC-13844
2 parents 6a87bfe + 61e17e5 commit b5ba5b9

File tree

47 files changed

+1960
-401
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1960
-401
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoryActionGroup.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,4 +263,15 @@
263263
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategory"/>
264264
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccessMessage"/>
265265
</actionGroup>
266+
267+
<actionGroup name="AdminAssignProductToCategory">
268+
<arguments>
269+
<argument name="productId" type="string"/>
270+
<argument name="categoryName" type="string"/>
271+
</arguments>
272+
<amOnPage url="{{AdminProductEditPage.url(productId)}}" stepKey="amOnPage"/>
273+
<searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[{{categoryName}}]" stepKey="selectCategory"/>
274+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickOnSaveButton"/>
275+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the product." stepKey="seeSaveProductMessage"/>
276+
</actionGroup>
266277
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="RelatedProductLink" type="product_link">
12+
<var key="sku" entityKey="sku" entityType="product2"/>
13+
<var key="linked_product_sku" entityKey="sku" entityType="product"/>
14+
<data key="link_type">related</data>
15+
<data key="linked_product_type">simple</data>
16+
<data key="position">1</data>
17+
<requiredEntity type="product_link_extension_attribute">Qty1000</requiredEntity>
18+
</entity>
19+
</entities>
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="OneRelatedProductLink" type="product_links">
12+
<requiredEntity type="product_link">RelatedProductLink</requiredEntity>
13+
</entity>
14+
</entities>
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="ProductLinkWidget" extends="ProductsListWidget">
12+
<data key="type">Catalog Product Link</data>
13+
<data key="template">Product Link Block Template</data>
14+
</entity>
15+
</entities>
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11+
<page name="AdminNewWidgetPage" url="admin/widget_instance/new/" area="admin" module="Magento_Widget">
12+
<section name="AdminNewWidgetSelectProductPopupSection"/>
13+
</page>
14+
</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="AdminNewWidgetSection">
12+
<element name="selectProduct" type="button" selector=".btn-chooser" timeout="30"/>
13+
</section>
14+
</sections>
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminNewWidgetSelectProductPopupSection">
12+
<element name="filterBySku" type="input" selector=".data-grid-filters input[name='chooser_sku']"/>
13+
<element name="firstRow" type="select" selector=".even>td" timeout="20"/>
14+
</section>
15+
</sections>

app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/AdminCreateApiConfigurableProductActionGroup.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,17 @@
6262
<requiredEntity createDataKey="createConfigChildProduct2"/>
6363
</createData>
6464
</actionGroup>
65+
66+
<!-- Create the configurable product, children are not visible individually -->
67+
<actionGroup name="AdminCreateApiConfigurableProductWithHiddenChildActionGroup" extends="AdminCreateApiConfigurableProductActionGroup">
68+
<!-- Create the 2 children that will be a part of the configurable product -->
69+
<createData entity="ApiSimpleOneHidden" stepKey="createConfigChildProduct1">
70+
<requiredEntity createDataKey="createConfigProductAttribute"/>
71+
<requiredEntity createDataKey="getConfigAttributeOption1"/>
72+
</createData>
73+
<createData entity="ApiSimpleTwoHidden" stepKey="createConfigChildProduct2">
74+
<requiredEntity createDataKey="createConfigProductAttribute"/>
75+
<requiredEntity createDataKey="getConfigAttributeOption2"/>
76+
</createData>
77+
</actionGroup>
6578
</actionGroups>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Fedex\Plugin\Block\DataProviders\Tracking;
8+
9+
use Magento\Fedex\Model\Carrier;
10+
use Magento\Shipping\Model\Tracking\Result\Status;
11+
use Magento\Shipping\Block\DataProviders\Tracking\DeliveryDateTitle as Subject;
12+
13+
/**
14+
* Plugin to change delivery date title with FedEx customized value
15+
*/
16+
class ChangeTitle
17+
{
18+
/**
19+
* Title modification in case if FedEx used as carrier
20+
*
21+
* @param Subject $subject
22+
* @param \Magento\Framework\Phrase|string $result
23+
* @param Status $trackingStatus
24+
* @return \Magento\Framework\Phrase|string
25+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
26+
*/
27+
public function afterGetTitle(Subject $subject, $result, Status $trackingStatus)
28+
{
29+
if ($trackingStatus->getCarrier() === Carrier::CODE) {
30+
$result = __('Expected Delivery:');
31+
}
32+
return $result;
33+
}
34+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Fedex\Plugin\Block\Tracking;
8+
9+
use Magento\Shipping\Block\Tracking\Popup;
10+
use Magento\Fedex\Model\Carrier;
11+
use Magento\Shipping\Model\Tracking\Result\Status;
12+
13+
/**
14+
* Plugin to update delivery date value in case if Fedex used
15+
*/
16+
class PopupDeliveryDate
17+
{
18+
/**
19+
* Show only date for expected delivery in case if Fedex is a carrier
20+
*
21+
* @param Popup $subject
22+
* @param string $result
23+
* @param string $date
24+
* @param string $time
25+
* @return string
26+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
27+
*/
28+
public function afterFormatDeliveryDateTime(Popup $subject, $result, $date, $time)
29+
{
30+
if ($this->getCarrier($subject) === Carrier::CODE) {
31+
$result = $subject->formatDeliveryDate($date);
32+
}
33+
return $result;
34+
}
35+
36+
/**
37+
* Retrieve carrier name from tracking info
38+
*
39+
* @param Popup $subject
40+
* @return string
41+
*/
42+
private function getCarrier(Popup $subject): string
43+
{
44+
foreach ($subject->getTrackingInfo() as $trackingData) {
45+
foreach ($trackingData as $trackingInfo) {
46+
if ($trackingInfo instanceof Status) {
47+
$carrier = $trackingInfo->getCarrier();
48+
return $carrier;
49+
}
50+
}
51+
}
52+
return '';
53+
}
54+
}

0 commit comments

Comments
 (0)