11 use Magento\Mtf\Fixture\FixtureFactory;
12 use Magento\Mtf\TestCase\Injectable;
13 use Magento\Mtf\TestStep\TestStepFactory;
15 use Magento\User\Test\Page\Adminhtml\UserLocks;
103 public function test(
113 $this->testStepFactory->create(
114 \
Magento\Config\Test\TestStep\SetupConfigurationStep::class,
117 $customAdmin->persist();
119 $incorrectUser = $this->fixtureFactory->createByCode(
121 [
'data' => [
'username' => $customAdmin->getUsername(),
'password' => $incorrectPassword]]
123 for (
$i = 0;
$i < $attempts;
$i++) {
124 $this->adminAuth->open();
125 $this->adminAuth->getLoginBlock()->fill($incorrectUser);
126 $this->adminAuth->getLoginBlock()->submit();
130 $this->userLocks->open();
131 $this->userLocks->getLockedUsersGrid()->massaction([[
'username' => $customAdmin->getUsername()]],
'Unlock');
133 return [
'user' => $customAdmin];
143 $this->testStepFactory->create(
144 \
Magento\Config\Test\TestStep\SetupConfigurationStep::class,
145 [
'configData' => $this->configData,
'rollback' =>
true]
__inject(TestStepFactory $testStepFactory, AdminAuthLogin $adminAuth, FixtureFactory $fixtureFactory, UserLocks $userLocks)