Skip to content

Commit cd85f24

Browse files
MC-5602: CAPTCHA doesn't appear in login popup after refreshing page.
1 parent 4593b70 commit cd85f24

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

app/code/Magento/Captcha/CustomerData/Captcha.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Magento\Customer\CustomerData\SectionSourceInterface;
1212

1313
/**
14-
* Cart source
14+
* Captcha section
1515
*/
1616
class Captcha extends \Magento\Framework\DataObject implements SectionSourceInterface
1717
{

app/code/Magento/Captcha/Model/DefaultModel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ private function getTargetForms()
486486
/**
487487
* Get captcha word
488488
*
489-
* @return string
489+
* @return string|null
490490
*/
491491
public function getWord()
492492
{
@@ -497,7 +497,7 @@ public function getWord()
497497
/**
498498
* Get captcha words
499499
*
500-
* @return string
500+
* @return string|null
501501
*/
502502
private function getWords()
503503
{

app/code/Magento/Captcha/Test/Mftf/Test/CaptchaFormsDisplayingTest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,18 @@
8484
</createData>
8585
</before>
8686
<after>
87-
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
88-
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct1"/>
8987
<magentoCLI command="config:set checkout/options/guest_checkout 1" stepKey="enableGuestCheckout"/>
9088
<magentoCLI command="config:set customer/captcha/failed_attempts_login 3" stepKey="increaseLoginAttempt"/>
89+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
90+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct1"/>
9191
</after>
9292
<amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.sku$$)}}" stepKey="openProductPage"/>
9393
<waitForPageLoad stepKey="waitForPageLoad"/>
9494
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addToCart" />
9595
<waitForText userInput="You added $$createSimpleProduct.name$$ to your shopping cart." stepKey="waitForText"/>
9696
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/>
9797
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout"/>
98+
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.email}}" stepKey="waitEmailFieldVisible"/>
9899
<fillField selector="{{StorefrontCustomerSignInPopupFormSection.email}}" userInput="{{Simple_US_Customer.email}}" stepKey="fillCustomerEmail"/>
99100
<fillField selector="{{StorefrontCustomerSignInPopupFormSection.password}}" userInput="incorrectPassword" stepKey="fillIncorrectCustomerPassword"/>
100101
<click selector="{{StorefrontCustomerSignInPopupFormSection.signIn}}" stepKey="clickSignIn"/>

0 commit comments

Comments
 (0)