Skip to content

Commit

Permalink
Merge pull request #3620 from magento-arcticfoxes/pr
Browse files Browse the repository at this point in the history
[arcticfoxes] 2.3.1 PRs
  • Loading branch information
joanhe authored Jan 23, 2019
2 parents 8faa1f4 + 0f0af51 commit b954e0f
Show file tree
Hide file tree
Showing 40 changed files with 71 additions and 178 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@
<element name="widgets" type="button" selector="#nav li[data-ui-id='menu-magento-widget-cms-widget-instance']"/>
<element name="stores" type="button" selector="#menu-magento-backend-stores"/>
<element name="configuration" type="button" selector="#nav li[data-ui-id='menu-magento-config-system-config']"/>
<element name="dashboard" type="button" selector="//li[@id='menu-magento-backend-dashboard']"/>
<element name="sales" type="button" selector="//li[@id='menu-magento-sales-sales']"/>
<element name="marketing" type="button" selector="//li[@id='menu-magento-backend-marketing']"/>
<element name="system" type="button" selector="//li[@id='menu-magento-backend-system']"/>
<element name="findPartners" type="button" selector="//li[@id='menu-magento-marketplace-partners']"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">

<actionGroup name="AdminOrderBraintreeFillActionGroup">
<!--Select Braintree Payment method on Admin Order Create Page-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!-- GoTo ConfigureBraintree fields -->
<click stepKey="clickOnSTORES" selector="{{AdminMenuSection.stores}}"/>
<waitForPageLoad stepKey="waitForConfiguration" time="2"/>
<click stepKey="clickOnConfigurations" selector="{{StoresSubmenuSection.configuration}}" />
<click stepKey="clickOnConfigurations" selector="{{AdminMenuSection.configuration}}" />
<waitForPageLoad stepKey="waitForSales" time="2"/>
<click stepKey="clickOnSales" selector="{{ConfigurationListSection.sales}}" />
<waitForPageLoad stepKey="waitForPaymentMethods" time="2"/>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

23 changes: 0 additions & 23 deletions app/code/Magento/Braintree/Test/Mftf/Section/AdminMenuSection.xml

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
* See COPYING.txt for license details.
*/
-->
<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">
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="BraintreeConfiguraionSection">
<element name="titleForBraintreeSettings" type="input" selector="//input[@id='payment_us_braintree_section_braintree_braintree_required_title']"/>
<element name="environment" type="select" selector="//select[@id='payment_us_braintree_section_braintree_braintree_required_environment']"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,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">
<section name="ConfigurationPaymentSection">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="ConfigurationPaymentSection">
<element name="configureButton" type="button" selector="//button[@id='payment_us_braintree_section_braintree-head']"/>
</section>
</sections>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
<actionGroup ref="useBraintreeForMasterCard" stepKey="selectCardWithBraintree"/>

<click stepKey="submitOrder" selector="{{NewOrderSection.submitOrder}}"/>
<waitForPageLoad stepKey="waitForSaveConfig" time="5"/>
<waitForElementVisible selector="{{NewOrderSection.successMessage}}" stepKey="waitForSuccessMessage" time="1"/>
<waitForPageLoad stepKey="waitForSaveConfig"/>
<waitForElementVisible selector="{{NewOrderSection.successMessage}}" stepKey="waitForSuccessMessage"/>

<after>
<!-- Disable BrainTree -->
Expand Down
19 changes: 10 additions & 9 deletions app/code/Magento/Catalog/Block/Adminhtml/Rss/NotifyStock.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/**
* Class NotifyStock
*
* @package Magento\Catalog\Block\Adminhtml\Rss
*/
class NotifyStock extends \Magento\Backend\Block\AbstractBlock implements DataProviderInterface
Expand Down Expand Up @@ -41,7 +42,7 @@ public function __construct(
}

/**
* @return void
* @inheritdoc
*/
protected function _construct()
{
Expand All @@ -50,12 +51,12 @@ protected function _construct()
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function getRssData()
{
$newUrl = $this->rssUrlBuilder->getUrl(['_secure' => true, '_nosecret' => true, 'type' => 'notifystock']);
$title = __('Low Stock Products');
$newUrl = $this->rssUrlBuilder->getUrl(['_secure' => true, '_nosecret' => true, 'type' => 'notifystock']);
$title = __('Low Stock Products')->render();
$data = ['title' => $title, 'description' => $title, 'link' => $newUrl, 'charset' => 'UTF-8'];

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

return $data;
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function getCacheLifetime()
{
return 600;
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function isAllowed()
{
return true;
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function getFeeds()
{
return [];
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function isAuthRequired()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
<actionGroup name="CreateNewProductActionGroup">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="CreateNewProductActionGroup">

<click stepKey="openCatalog" selector="{{AdminMenuSection.catalog}}"/>
<waitForPageLoad stepKey="waitForCatalogSubmenu" time="5"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="DeleteProductActionGroup">
<arguments>
<argument name="productName" defaultValue=""/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->

<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
<entity name="NewProductData" type="braintree_config_state">
<data key="ProductName">ProductTest</data>
<data key="Price">100</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->

<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">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="CatalogSubmenuSection">
<element name="products" type="button" selector="//li[@id='menu-magento-catalog-catalog']//li[@data-ui-id='menu-magento-catalog-catalog-products']"/>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->

<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">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="NewProductPageSection">
<element name="productName" type="input" selector="//input[@name='product[name]']"/>
<element name="sku" type="input" selector="//input[@name='product[sku]']"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->

<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">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="ProductsPageSection">
<element name="addProductButton" type="button" selector="//button[@id='add_new_product-button']"/>
<element name="checkboxForProduct" type="button" selector="//*[contains(text(),'{{args}}')]/parent::td/preceding-sibling::td/label[@class='data-grid-checkbox-cell-inner']" parameterized="true"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ public function testGetRssData()
$this->urlBuilder->expects($this->once())->method('getUrl')
->with('catalog/product/edit', ['id' => 1, '_secure' => true, '_nosecret' => true])
->will($this->returnValue('http://magento.com/catalog/product/edit/id/1'));
$this->assertEquals($this->rssFeed, $this->block->getRssData());

$data = $this->block->getRssData();
$this->assertTrue(is_string($data['title']));
$this->assertTrue(is_string($data['description']));
$this->assertTrue(is_string($data['entries'][0]['description']));
$this->assertEquals($this->rssFeed, $data);
}

public function testGetCacheLifetime()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="CreateCustomerActionGroup">
<click stepKey="openCustomers" selector="{{AdminMenuSection.customers}}"/>
<waitForAjaxLoad stepKey="waitForCatalogSubmenu" time="5"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">

xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<!--Sign out-->
<actionGroup name="SignOut">
<click selector="{{SignOutSection.admin}}" stepKey="clickToAdminProfile"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->

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

0 comments on commit b954e0f

Please sign in to comment.