Skip to content

Commit 981b180

Browse files
MTO-102: [Test] Captcha on register customer
- Stabilization.
1 parent 166bab6 commit 981b180

File tree

5 files changed

+50
-2
lines changed

5 files changed

+50
-2
lines changed

dev/tests/functional/tests/app/Magento/Captcha/Test/Block/Form/LoginWithCaptcha.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,14 @@ public function isVisibleCaptchaReloadButton()
4848
{
4949
return $this->_rootElement->find($this->captchaReload, Locator::SELECTOR_CSS)->isVisible();
5050
}
51+
52+
/**
53+
* Click on reload captcha button.
54+
*
55+
* @return void
56+
*/
57+
public function reloadCaptcha()
58+
{
59+
$this->_rootElement->find($this->captchaReload, Locator::SELECTOR_CSS)->click();
60+
}
5161
}

dev/tests/functional/tests/app/Magento/Captcha/Test/Repository/ConfigData.xml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,5 +164,43 @@
164164
<item name="value" xsi:type="number">0</item>
165165
</field>
166166
</dataset>
167+
168+
<dataset name="captcha_backend_login">
169+
<field name="admin/captcha/enable" xsi:type="array">
170+
<item name="scope_id" xsi:type="number">0</item>
171+
<item name="label" xsi:type="string">Yes</item>
172+
<item name="value" xsi:type="number">1</item>
173+
</field>
174+
<field name="admin/captcha/forms" xsi:type="array">
175+
<item name="scope_id" xsi:type="number">0</item>
176+
<item name="label" xsi:type="string">Admin Login</item>
177+
<item name="value" xsi:type="string">backend_login</item>
178+
</field>
179+
<field name="admin/captcha/mode" xsi:type="array">
180+
<item name="scope_id" xsi:type="number">0</item>
181+
<item name="label" xsi:type="string">Always</item>
182+
<item name="value" xsi:type="string">always</item>
183+
</field>
184+
<field name="admin/captcha/length" xsi:type="array">
185+
<item name="scope" xsi:type="string">admin</item>
186+
<item name="scope_id" xsi:type="number">1</item>
187+
<item name="label" xsi:type="string"/>
188+
<item name="value" xsi:type="number">3</item>
189+
</field>
190+
<field name="admin/captcha/symbols" xsi:type="array">
191+
<item name="scope" xsi:type="string">admin</item>
192+
<item name="scope_id" xsi:type="number">1</item>
193+
<item name="label" xsi:type="string"/>
194+
<item name="value" xsi:type="number">1</item>
195+
</field>
196+
</dataset>
197+
<dataset name="captcha_backend_login_rollback">
198+
<field name="admin/captcha/enable" xsi:type="array">
199+
<item name="scope" xsi:type="string">default</item>
200+
<item name="scope_id" xsi:type="number">1</item>
201+
<item name="label" xsi:type="string">No</item>
202+
<item name="value" xsi:type="number">0</item>
203+
</field>
204+
</dataset>
167205
</repository>
168206
</config>

dev/tests/functional/tests/app/Magento/Captcha/Test/TestCase/CaptchaOnStoreFrontLoginTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function test(
116116

117117
$this->customerAccountLogin->open();
118118
$this->assertCaptcha->processAssert($this->customerAccountLogin);
119-
$this->customerAccountLogin->getLoginBlockWithCaptcha()->clickReloadCaptchaButton();
119+
$this->customerAccountLogin->getLoginBlockWithCaptcha()->reloadCaptcha();
120120
$this->customerAccountLogin->getLoginBlockWithCaptcha()->login($customer);
121121
}
122122

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View/CustomOptions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
/**
1616
* Class CustomOptions
1717
* Form of custom options product
18+
* @SuppressWarnings(PHPMD.TooManyFields)
1819
*/
1920
class CustomOptions extends Form
2021
{

dev/tests/functional/tests/app/Magento/Customer/Test/Block/Adminhtml/Edit/CustomerForm.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ public function getJsErrors()
171171
return $jsErrors;
172172
}
173173

174-
175174
/**
176175
* Get personal information.
177176
*

0 commit comments

Comments
 (0)