Skip to content

Commit 1f63846

Browse files
author
Joan He
committed
Merge remote-tracking branch 'upstream/2.3-develop' into MC-5648
2 parents 7dee745 + 8e2ca94 commit 1f63846

File tree

63 files changed

+584
-491
lines changed

Some content is hidden

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

63 files changed

+584
-491
lines changed

app/code/Magento/Backend/Test/Mftf/Section/AdminMenuSection.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,10 @@
1616
<element name="widgets" type="button" selector="#nav li[data-ui-id='menu-magento-widget-cms-widget-instance']"/>
1717
<element name="stores" type="button" selector="#menu-magento-backend-stores"/>
1818
<element name="configuration" type="button" selector="#nav li[data-ui-id='menu-magento-config-system-config']"/>
19+
<element name="dashboard" type="button" selector="//li[@id='menu-magento-backend-dashboard']"/>
20+
<element name="sales" type="button" selector="//li[@id='menu-magento-sales-sales']"/>
21+
<element name="marketing" type="button" selector="//li[@id='menu-magento-backend-marketing']"/>
22+
<element name="system" type="button" selector="//li[@id='menu-magento-backend-system']"/>
23+
<element name="findPartners" type="button" selector="//li[@id='menu-magento-marketplace-partners']"/>
1924
</section>
2025
</sections>

app/code/Magento/Braintree/Test/Mftf/ActionGroup/AdminOrderBraintreeFillActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1010

1111
<actionGroup name="AdminOrderBraintreeFillActionGroup">
1212
<!--Select Braintree Payment method on Admin Order Create Page-->

app/code/Magento/Braintree/Test/Mftf/ActionGroup/ConfigureBraintreeActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<!-- GoTo ConfigureBraintree fields -->
1313
<click stepKey="clickOnSTORES" selector="{{AdminMenuSection.stores}}"/>
1414
<waitForPageLoad stepKey="waitForConfiguration" time="2"/>
15-
<click stepKey="clickOnConfigurations" selector="{{StoresSubmenuSection.configuration}}" />
15+
<click stepKey="clickOnConfigurations" selector="{{AdminMenuSection.configuration}}" />
1616
<waitForPageLoad stepKey="waitForSales" time="2"/>
1717
<click stepKey="clickOnSales" selector="{{ConfigurationListSection.sales}}" />
1818
<waitForPageLoad stepKey="waitForPaymentMethods" time="2"/>

app/code/Magento/Braintree/Test/Mftf/Section/AdminEditRoleInfoSection.xml

Lines changed: 0 additions & 21 deletions
This file was deleted.

app/code/Magento/Braintree/Test/Mftf/Section/AdminEditUserRoleSection.xml

Lines changed: 0 additions & 17 deletions
This file was deleted.

app/code/Magento/Braintree/Test/Mftf/Section/AdminEditUserSection.xml

Lines changed: 0 additions & 28 deletions
This file was deleted.

app/code/Magento/Braintree/Test/Mftf/Section/AdminMenuSection.xml

Lines changed: 0 additions & 23 deletions
This file was deleted.

app/code/Magento/Braintree/Test/Mftf/Section/AdminRoleGridSection.xml

Lines changed: 0 additions & 17 deletions
This file was deleted.

app/code/Magento/Braintree/Test/Mftf/Section/BraintreeConfiguraionSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
8+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
910
<section name="BraintreeConfiguraionSection">
1011
<element name="titleForBraintreeSettings" type="input" selector="//input[@id='payment_us_braintree_section_braintree_braintree_required_title']"/>
1112
<element name="environment" type="select" selector="//select[@id='payment_us_braintree_section_braintree_braintree_required_environment']"/>

app/code/Magento/Braintree/Test/Mftf/Section/ConfigurationPaymentSection.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
-->
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11-
<section name="ConfigurationPaymentSection">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="ConfigurationPaymentSection">
1212
<element name="configureButton" type="button" selector="//button[@id='payment_us_braintree_section_braintree-head']"/>
1313
</section>
1414
</sections>

app/code/Magento/Braintree/Test/Mftf/Section/StoresSubmenuSection.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.

app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest1.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@
7474
<actionGroup ref="useBraintreeForMasterCard" stepKey="selectCardWithBraintree"/>
7575

7676
<click stepKey="submitOrder" selector="{{NewOrderSection.submitOrder}}"/>
77-
<waitForPageLoad stepKey="waitForSaveConfig" time="5"/>
78-
<waitForElementVisible selector="{{NewOrderSection.successMessage}}" stepKey="waitForSuccessMessage" time="1"/>
77+
<waitForPageLoad stepKey="waitForSaveConfig"/>
78+
<waitForElementVisible selector="{{NewOrderSection.successMessage}}" stepKey="waitForSuccessMessage"/>
7979

8080
<after>
8181
<!-- Disable BrainTree -->

app/code/Magento/Catalog/Block/Adminhtml/Rss/NotifyStock.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
/**
1111
* Class NotifyStock
12+
*
1213
* @package Magento\Catalog\Block\Adminhtml\Rss
1314
*/
1415
class NotifyStock extends \Magento\Backend\Block\AbstractBlock implements DataProviderInterface
@@ -41,7 +42,7 @@ public function __construct(
4142
}
4243

4344
/**
44-
* @return void
45+
* @inheritdoc
4546
*/
4647
protected function _construct()
4748
{
@@ -50,12 +51,12 @@ protected function _construct()
5051
}
5152

5253
/**
53-
* {@inheritdoc}
54+
* @inheritdoc
5455
*/
5556
public function getRssData()
5657
{
57-
$newUrl = $this->rssUrlBuilder->getUrl(['_secure' => true, '_nosecret' => true, 'type' => 'notifystock']);
58-
$title = __('Low Stock Products');
58+
$newUrl = $this->rssUrlBuilder->getUrl(['_secure' => true, '_nosecret' => true, 'type' => 'notifystock']);
59+
$title = __('Low Stock Products')->render();
5960
$data = ['title' => $title, 'description' => $title, 'link' => $newUrl, 'charset' => 'UTF-8'];
6061

6162
foreach ($this->rssModel->getProductsCollection() as $item) {
@@ -65,39 +66,39 @@ public function getRssData()
6566
['id' => $item->getId(), '_secure' => true, '_nosecret' => true]
6667
);
6768
$qty = 1 * $item->getQty();
68-
$description = __('%1 has reached a quantity of %2.', $item->getName(), $qty);
69+
$description = __('%1 has reached a quantity of %2.', $item->getName(), $qty)->render();
6970
$data['entries'][] = ['title' => $item->getName(), 'link' => $url, 'description' => $description];
7071
}
7172

7273
return $data;
7374
}
7475

7576
/**
76-
* {@inheritdoc}
77+
* @inheritdoc
7778
*/
7879
public function getCacheLifetime()
7980
{
8081
return 600;
8182
}
8283

8384
/**
84-
* {@inheritdoc}
85+
* @inheritdoc
8586
*/
8687
public function isAllowed()
8788
{
8889
return true;
8990
}
9091

9192
/**
92-
* {@inheritdoc}
93+
* @inheritdoc
9394
*/
9495
public function getFeeds()
9596
{
9697
return [];
9798
}
9899

99100
/**
100-
* {@inheritdoc}
101+
* @inheritdoc
101102
*/
102103
public function isAuthRequired()
103104
{

app/code/Magento/Braintree/Test/Mftf/ActionGroup/CreateNewProductActionGroup.xml renamed to app/code/Magento/Catalog/Test/Mftf/ActionGroup/CreateNewProductActionGroup.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
*/
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10-
<actionGroup name="CreateNewProductActionGroup">
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="CreateNewProductActionGroup">
1111

1212
<click stepKey="openCatalog" selector="{{AdminMenuSection.catalog}}"/>
1313
<waitForPageLoad stepKey="waitForCatalogSubmenu" time="5"/>

app/code/Magento/Braintree/Test/Mftf/ActionGroup/DeleteProductActionGroup.xml renamed to app/code/Magento/Catalog/Test/Mftf/ActionGroup/DeleteProductActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1010
<actionGroup name="DeleteProductActionGroup">
1111
<arguments>
1212
<argument name="productName" defaultValue=""/>

app/code/Magento/Braintree/Test/Mftf/Data/NewProductData.xml renamed to app/code/Magento/Catalog/Test/Mftf/Data/NewProductData.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
1111
<entity name="NewProductData" type="braintree_config_state">
1212
<data key="ProductName">ProductTest</data>
1313
<data key="Price">100</data>

app/code/Magento/Braintree/Test/Mftf/Section/CatalogSubmenuSection.xml renamed to app/code/Magento/Catalog/Test/Mftf/Section/CatalogSubmenuSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="CatalogSubmenuSection">
1212
<element name="products" type="button" selector="//li[@id='menu-magento-catalog-catalog']//li[@data-ui-id='menu-magento-catalog-catalog-products']"/>
1313
</section>

app/code/Magento/Braintree/Test/Mftf/Section/NewProductPageSection.xml renamed to app/code/Magento/Catalog/Test/Mftf/Section/NewProductPageSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="NewProductPageSection">
1212
<element name="productName" type="input" selector="//input[@name='product[name]']"/>
1313
<element name="sku" type="input" selector="//input[@name='product[sku]']"/>

app/code/Magento/Braintree/Test/Mftf/Section/ProductsPageSection.xml renamed to app/code/Magento/Catalog/Test/Mftf/Section/ProductsPageSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="ProductsPageSection">
1212
<element name="addProductButton" type="button" selector="//button[@id='add_new_product-button']"/>
1313
<element name="checkboxForProduct" type="button" selector="//*[contains(text(),'{{args}}')]/parent::td/preceding-sibling::td/label[@class='data-grid-checkbox-cell-inner']" parameterized="true"/>

app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Rss/NotifyStockTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,12 @@ public function testGetRssData()
9696
$this->urlBuilder->expects($this->once())->method('getUrl')
9797
->with('catalog/product/edit', ['id' => 1, '_secure' => true, '_nosecret' => true])
9898
->will($this->returnValue('http://magento.com/catalog/product/edit/id/1'));
99-
$this->assertEquals($this->rssFeed, $this->block->getRssData());
99+
100+
$data = $this->block->getRssData();
101+
$this->assertTrue(is_string($data['title']));
102+
$this->assertTrue(is_string($data['description']));
103+
$this->assertTrue(is_string($data['entries'][0]['description']));
104+
$this->assertEquals($this->rssFeed, $data);
100105
}
101106

102107
public function testGetCacheLifetime()

app/code/Magento/Braintree/Test/Mftf/ActionGroup/CreateCustomerActionGroup.xml renamed to app/code/Magento/Customer/Test/Mftf/ActionGroup/CreateCustomerActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1010
<actionGroup name="CreateCustomerActionGroup">
1111
<click stepKey="openCustomers" selector="{{AdminMenuSection.customers}}"/>
1212
<waitForAjaxLoad stepKey="waitForCatalogSubmenu" time="5"/>

app/code/Magento/Braintree/Test/Mftf/ActionGroup/SwitchAccountActionGroup.xml renamed to app/code/Magento/Customer/Test/Mftf/ActionGroup/SwitchAccountActionGroup.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
*/
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10-
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1110
<!--Sign out-->
1211
<actionGroup name="SignOut">
1312
<click selector="{{SignOutSection.admin}}" stepKey="clickToAdminProfile"/>

app/code/Magento/Braintree/Test/Mftf/Data/NewCustomerData.xml renamed to app/code/Magento/Customer/Test/Mftf/Data/NewCustomerData.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
1111
<entity name="NewCustomerData" type="braintree_config_state">
1212
<data key="FirstName">Abgar</data>
1313
<data key="LastName">Abgaryan</data>

0 commit comments

Comments
 (0)