9
9
use Magento \Backend \Test \Page \Adminhtml \Dashboard ;
10
10
use Magento \Mtf \Util \Command \Cli \DeployMode ;
11
11
use Magento \Mtf \TestStep \TestStepFactory ;
12
+ use Magento \User \Test \TestStep \LoginUserOnBackendStep ;
12
13
13
14
/**
14
15
* Verify visibility of form elements on Configuration page.
@@ -53,9 +54,11 @@ public function __inject(
53
54
}
54
55
55
56
/**
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
+ *
57
59
* @param DeployMode $cli
58
60
* @param null $configData
61
+ *
59
62
* @return void
60
63
*/
61
64
public function test (
@@ -64,15 +67,27 @@ public function test(
64
67
) {
65
68
$ this ->configData = $ configData ;
66
69
67
- //Pre-conditions
70
+ //Pre-conditions
68
71
$ cli ->setDeployModeToDeveloper ();
69
- $ this ->objectManager ->create (
72
+ $ this ->stepFactory ->create (
70
73
\Magento \Config \Test \TestStep \SetupConfigurationStep::class,
71
74
['configData ' => $ this ->configData ]
72
75
)->run ();
73
76
74
77
// Steps
75
78
$ 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 ();
77
92
}
78
93
}
0 commit comments