Skip to content

Commit 6927cd2

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-69192-Upgrade-Tests' into 2.2-develop-pr
2 parents d456434 + 85ac65f commit 6927cd2

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

dev/tests/functional/lib/Magento/Mtf/App/State/State1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class State1 extends AbstractState
4444
public function __construct(
4545
ObjectManager $objectManager,
4646
CurlTransport $curlTransport,
47-
array $arguments
47+
array $arguments = []
4848
) {
4949
parent::__construct($objectManager, $arguments);
5050
$this->objectManager = $objectManager;

dev/tests/functional/tests/app/Magento/Setup/Test/TestCase/UpgradeSystemTest.php

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,31 @@ class UpgradeSystemTest extends Injectable
3131
protected $adminDashboard;
3232

3333
/**
34-
* Injection data.
35-
*
34+
* @var \Magento\Analytics\Mtf\App\State\NotificationTimeHandler
35+
*/
36+
private $analyticsNotificationHandler;
37+
38+
/**
39+
* @var \Magento\Mtf\Util\Iterator\ApplicationState
40+
*/
41+
private $applicationStateIterator;
42+
43+
/**
3644
* @param Dashboard $adminDashboard
3745
* @param SetupWizard $setupWizard
38-
* @return void
46+
* @param \Magento\Analytics\Mtf\App\State\NotificationTimeHandler $analyticsNotificationHandler
47+
* @param \Magento\Mtf\Util\Iterator\ApplicationState $applicationStateIterator
3948
*/
4049
public function __inject(
4150
Dashboard $adminDashboard,
42-
SetupWizard $setupWizard
51+
SetupWizard $setupWizard,
52+
\Magento\Analytics\Mtf\App\State\NotificationTimeHandler $analyticsNotificationHandler,
53+
\Magento\Mtf\Util\Iterator\ApplicationState $applicationStateIterator
4354
) {
4455
$this->adminDashboard = $adminDashboard;
4556
$this->setupWizard = $setupWizard;
57+
$this->analyticsNotificationHandler = $analyticsNotificationHandler;
58+
$this->applicationStateIterator = $applicationStateIterator;
4659
}
4760

4861
/**
@@ -128,6 +141,11 @@ public function test(
128141

129142
$assertSuccessMessage->processAssert($this->setupWizard, $upgrade['package']);
130143

144+
// Disable promotion popup for Analytics module
145+
$appStateMetadata = $this->applicationStateIterator->current();
146+
$appState = \Magento\Mtf\ObjectManager::getInstance()->get($appStateMetadata['class']);
147+
$this->analyticsNotificationHandler->execute($appState);
148+
131149
// Check application version
132150
$this->adminDashboard->open();
133151
$assertApplicationVersion->processAssert($this->adminDashboard, $version);

dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Model3
5959
\Magento\TestModule2\Service\V1\Entity\ItemBuilder
6060
\Magento\TestModule4\Service\V1\Entity\DataObjectResponse
6161
\Magento\TestModule4\Service\V1\Entity\DataObjectRequest
62+
\Magento\Mtf\ObjectManager
6263
\Magento\Mtf\ObjectManager\Config\Mapper\Dom
6364
\Magento\Mtf\Data\Argument\Interpreter\Constant
6465
\Magento\Mtf\Data\Argument\Interpreter\Boolean

0 commit comments

Comments
 (0)