Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Forwardport] magento/magento2#15255 unlock customer after password reset #33

Merged
merged 16 commits into from
Jun 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/code/Magento/Customer/Model/AccountManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ public function resetPassword($email, $resetToken, $newPassword)
$customerSecure->setRpToken(null);
$customerSecure->setRpTokenCreatedAt(null);
$customerSecure->setPasswordHash($this->createPasswordHash($newPassword));
$this->getAuthentication()->unlock($customer->getId());
$this->sessionManager->destroy();
$this->destroyCustomerSessions($customer->getId());
$this->customerRepository->save($customer);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@
<see selector="{{AdminCategoryContentSection.imageFileName}}" userInput="{{image.file}}" stepKey="seeImage"/>
</actionGroup>

<!-- Action to navigate to Media Gallery. Used in tests to cleanup uploaded images -->
<actionGroup name="navigateToMediaGallery">
<amOnPage url="{{AdminCategoryPage.url}}" stepKey="amOnAdminCategoryPage"/>
<waitForElementVisible selector="{{AdminCategoryContentSection.sectionHeader}}" stepKey="waitForContentSection"/>
<conditionalClick selector="{{AdminCategoryContentSection.sectionHeader}}" dependentSelector="{{AdminCategoryContentSection.uploadButton}}" visible="false" stepKey="openContentSection"/>
<waitForPageLoad stepKey="waitForPageLoad1"/>
<waitForElementVisible selector="{{AdminCategoryContentSection.selectFromGalleryButton}}" stepKey="waitForSelectFromGalleryButton"/>
<click selector="{{AdminCategoryContentSection.selectFromGalleryButton}}" stepKey="clickSelectFromGalleryButton"/>
<waitForPageLoad stepKey="waitForPageLoad2"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
</actionGroup>

<!--Actions to check if a category exists on StoreFront-->
<actionGroup name="CheckCategoryOnStorefront">
<arguments>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,22 @@
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
<actionGroup name="DeleteImageFromStorageActionGroup">
<arguments>
<argument name="Image" defaultValue="" />
<argument name="Image"/>
</arguments>
<click selector="//small[contains(text(),'{{Image.value}}')]" stepKey="selectImage" />
<see selector="{{MediaGallerySection.DeleteSelectedBtn}}" userInput="Delete Selected" stepKey="seeDeleteBtn"/>
<click selector="{{MediaGallerySection.DeleteSelectedBtn}}" stepKey="clickDeleteSelected" />
<waitForText userInput="OK" stepKey="waitForConfirm" />
<click selector="{{MediaGallerySection.confirmDelete}}" stepKey="confirmDelete" />
<waitForElementNotVisible selector="{{MediaGallerySection.image(ImageUpload.file)}}" stepKey="waitForImageDeleted" />
<dontSeeElement selector="{{MediaGallerySection.image(ImageUpload.file)}}" stepKey="dontSeeImage" />
<waitForElementVisible selector="{{MediaGallerySection.imageOrImageCopy(Image.fileName, Image.extension)}}" stepKey="waitForInitialImages"/>
<grabMultiple selector="{{MediaGallerySection.imageOrImageCopy(Image.fileName, Image.extension)}}" stepKey="initialImages"/>
<click selector="{{MediaGallerySection.imageOrImageCopy(Image.fileName, Image.extension)}}" stepKey="selectImage"/>
<waitForElementVisible selector="{{MediaGallerySection.DeleteSelectedBtn}}" stepKey="waitForDeleteBtn"/>
<click selector="{{MediaGallerySection.DeleteSelectedBtn}}" stepKey="clickDeleteSelected"/>
<waitForPageLoad stepKey="waitForPageLoad1"/>
<waitForElementVisible selector="{{MediaGallerySection.confirmDelete}}" stepKey="waitForConfirmBtn"/>
<click selector="{{MediaGallerySection.confirmDelete}}" stepKey="clickConfirmBtn"/>
<waitForPageLoad stepKey="waitForPageLoad2"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
<grabMultiple selector="{{MediaGallerySection.imageOrImageCopy(Image.fileName, Image.extension)}}" stepKey="newImages"/>
<assertLessThan stepKey="assertLessImages">
<expectedResult type="variable">initialImages</expectedResult>
<actualResult type="variable">newImages</actualResult>
</assertLessThan>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
<actionGroup name="NavigateToMediaFolderActionGroup">
<arguments>
<argument name="FolderName" type="string" defaultValue="" />
<argument name="FolderName" type="string"/>
</arguments>
<conditionalClick selector="{{MediaGallerySection.StorageRootArrow}}" dependentSelector="{{MediaGallerySection.checkIfArrowExpand}}" stepKey="clickArrowIfClosed" visible="true"/>
<waitForText userInput="{{FolderName}}" stepKey="waitForNewFolder" />
<click userInput="{{FolderName}}" stepKey="clickOnCreatedFolder" />
<waitForLoadingMaskToDisappear stepKey="waitForLoading5" />
<waitForText userInput="{{FolderName}}" stepKey="waitForNewFolder"/>
<click userInput="{{FolderName}}" stepKey="clickOnCreatedFolder"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoading"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
</actionGroup>
<actionGroup name="attachImage">
<arguments>
<argument name="Image" defaultValue=""/>
<argument name="Image"/>
</arguments>
<attachFile selector="{{MediaGallerySection.BrowseUploadImage}}" userInput="{{Image.value}}" stepKey="uploadImage1"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoading6" />
<waitForElementVisible selector="{{MediaGallerySection.image(Image.value)}}" stepKey="waitForUploadImage1" />
<seeElement selector="{{MediaGallerySection.imageSelected(Image.value)}}" stepKey="seeImageSelected" />
<attachFile selector="{{MediaGallerySection.BrowseUploadImage}}" userInput="{{Image.value}}" stepKey="uploadImage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
<waitForElementVisible selector="{{MediaGallerySection.imageOrImageCopy(Image.fileName, Image.extension)}}" stepKey="waitForUploadImage"/>
</actionGroup>
<actionGroup name="deleteImage">
<see selector="{{MediaGallerySection.DeleteSelectedBtn}}" userInput="Delete Selected" stepKey="seeDeleteBtn"/>
Expand All @@ -53,8 +53,9 @@
<dontSeeElement selector="{{MediaGallerySection.image(ImageUpload.file)}}" stepKey="dontSeeImage" />
</actionGroup>
<actionGroup name="saveImage">
<click selector="{{MediaGallerySection.InsertFile}}" stepKey="clickInsertBtn" />
<waitForPageLoad stepKey="waitForPageLoad2"/>
<click selector="{{MediaGallerySection.InsertFile}}" stepKey="clickInsertBtn"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
</actionGroup>
<actionGroup name="fillOutUploadImagePopup">
<waitForElementVisible selector="{{MediaGallerySection.OkBtn}}" stepKey="waitForOkBtn" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<element name="Browse" type="button" selector=".mce-i-browse"/>
<element name="BrowseUploadImage" type="file" selector=".fileupload" />
<element name="image" type="text" selector="//small[text()='{{var1}}']" parameterized="true"/>
<element name="imageOrImageCopy" type="text" selector="//img[contains(@alt, '{{arg1}}.{{arg2}}')]|//img[contains(@alt,'{{arg1}}_') and contains(@alt,'.{{arg2}}')]" parameterized="true"/>
<element name="imageSelected" type="text" selector="//small[text()='{{var1}}']/parent::*[@class='filecnt selected']" parameterized="true"/>
<element name="ImageSource" type="input" selector=".mce-combobox.mce-abs-layout-item.mce-last.mce-has-open" />
<element name="ImageDescription" type="input" selector=".mce-textbox.mce-abs-layout-item.mce-last" />
Expand Down