Skip to content

Commit 66678e0

Browse files
committed
MAGETWO-97526: [FT] Magento\Backend\Test\TestCase\LoginAfterJSMinificationTest unstable on Jenkins
1 parent 6b69fa1 commit 66678e0

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/LoginAfterJSMinificationTest.php

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Magento\Backend\Test\Page\Adminhtml\Dashboard;
1010
use Magento\Mtf\Util\Command\Cli\DeployMode;
1111
use Magento\Mtf\TestStep\TestStepFactory;
12+
use Magento\User\Test\TestStep\LoginUserOnBackendStep;
1213

1314
/**
1415
* Verify visibility of form elements on Configuration page.
@@ -53,9 +54,11 @@ public function __inject(
5354
}
5455

5556
/**
56-
* Admin login test after JS minification is turned on in production mode
57+
* Admin login test after JS minification is turned on in production mode.
58+
*
5759
* @param DeployMode $cli
5860
* @param null $configData
61+
*
5962
* @return void
6063
*/
6164
public function test(
@@ -64,15 +67,27 @@ public function test(
6467
) {
6568
$this->configData = $configData;
6669

67-
//Pre-conditions
70+
//Pre-conditions
6871
$cli->setDeployModeToDeveloper();
69-
$this->objectManager->create(
72+
$this->stepFactory->create(
7073
\Magento\Config\Test\TestStep\SetupConfigurationStep::class,
7174
['configData' => $this->configData]
7275
)->run();
7376

7477
// Steps
7578
$cli->setDeployModeToProduction();
76-
$this->adminDashboardPage->open();
79+
//$this->adminDashboardPage->open();
80+
$this->stepFactory->create(LoginUserOnBackendStep::class)->run();
81+
}
82+
83+
/**
84+
* @inheritdoc
85+
*/
86+
protected function tearDown()
87+
{
88+
$this->stepFactory->create(
89+
\Magento\Config\Test\TestStep\SetupConfigurationStep::class,
90+
['configData' => $this->configData]
91+
)->cleanup();
7792
}
7893
}

0 commit comments

Comments
 (0)