-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Behat] Changing my account password with token I received scenario #9742
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, I've found just some minor issues :)
private function prepareUserPasswordResetToken(UserInterface $user) | ||
{ | ||
$token = 'itotallyforgotmypassword'; | ||
$this->sharedStorage->set('password_reset_token', $token); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need shared storage here if in When I follow link on my email to reset my password
step we would get the User model and take the password reset token from there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we keep this following code with storage on setup context ?
$this->sharedStorage->set('password_reset_token', $token);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's no longer needed then.
use Behat\Mink\Exception\ElementNotFoundException; | ||
use Sylius\Behat\Page\SymfonyPage; | ||
|
||
class RequestPasswordRequestResetPage extends SymfonyPage implements RequestPasswordResetPageInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a doubled Request
in the class name, shouldn't it be RequestPasswordResetPage
(esp. because of the interface name)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol yeah, it's a mistake :)
* | ||
* @return bool | ||
*/ | ||
public function checkValidationMessageFor($element, $message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use typehints both for arguments and the return value in this interface.
Thank you, Loic! 🥇 🎉 |
I've changed a behat page and its interface cause I've renamed an existing one... If you have a better idea, I'm opened. But the old name was confusing with missing one.