Skip to content

Commit aed7cb2

Browse files
committed
MQE-655: Deliver changes to Magento mainline with bug fixes
- mark user as notified about new release
1 parent d8e0100 commit aed7cb2

File tree

5 files changed

+73
-0
lines changed

5 files changed

+73
-0
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddImageToWYSIWYGBlockCest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<description value="You should be able to add image to WYSIWYG Editor Block"/>
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-84376"/>
19+
<group value="skip" />
1920
</annotations>
2021
<before>
2122
<createData entity="_defaultCmsPage" stepKey="createCMSPage" />

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGBlockCest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<description value="You should be able to add widget to WYSIWYG Editor Block"/>
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-84654"/>
19+
<group value="skip" />
1920
</annotations>
2021
<before>
2122
<createData entity="_defaultCmsPage" stepKey="createCMSPage" />

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockCest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<description value="Admin see TinyMCEv4.6 is native WYSIWYG on Block"/>
1818
<severity value="CRITICAL"/>
1919
<testCaseId value="MAGETWO-84184 "/>
20+
<group value="skip" />
2021
</annotations>
2122
<before>
2223
<createData entity="_defaultCmsPage" stepKey="createCMSPage" />
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\ReleaseNotification\Mtf\App\State;
8+
9+
use Magento\Mtf\App\State\AbstractState;
10+
use Magento\Mtf\Config\DataInterface;
11+
use Magento\Mtf\App\State\StateHandlerInterface;
12+
use Magento\Mtf\Util\Protocol\CurlTransport;
13+
use Magento\Mtf\Util\Protocol\CurlTransport\BackendDecorator;
14+
15+
/**
16+
* Class NotificationHandler
17+
*/
18+
class NotificationHandler implements StateHandlerInterface
19+
{
20+
/**
21+
* @var DataInterface
22+
*/
23+
private $configuration;
24+
25+
/**
26+
* NotificationHandler constructor.
27+
*
28+
* @param DataInterface $configuration
29+
*/
30+
public function __construct(DataInterface $configuration)
31+
{
32+
$this->configuration = $configuration;
33+
}
34+
35+
/**
36+
* Mark admin user as notified about release notes.
37+
*
38+
* @param AbstractState $state
39+
* @return bool
40+
* @throws \Exception
41+
*/
42+
public function execute(AbstractState $state)
43+
{
44+
$url = $_ENV['app_backend_url'] . 'admin/releaseNotification/notification/markUserNotified/?isAjax=true';
45+
$curl = new BackendDecorator(new CurlTransport(), $this->configuration);
46+
$curl->write($url, []);
47+
$response = json_decode($curl->read(), true);
48+
$curl->close();
49+
if (isset($response['success'])) {
50+
return $response['success'];
51+
}
52+
return false;
53+
}
54+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Magento/Mtf/ObjectManager/etc/config.xsd">
9+
<type name="Magento\Mtf\App\State\AbstractState">
10+
<arguments>
11+
<argument name="arguments" xsi:type="array">
12+
<item name="disable-notification" xsi:type="string">Magento\ReleaseNotification\Mtf\App\State\NotificationHandler</item>
13+
</argument>
14+
</arguments>
15+
</type>
16+
</config>

0 commit comments

Comments
 (0)