-
-
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
[User] Account renewal feature scenarios #4175
Conversation
a39224f
to
3118008
Compare
@TheMadeleine Please rebase, thank you! |
3118008
to
26036ed
Compare
And he had an order | ||
But his account was deleted | ||
|
||
@ui @javascript |
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 need @javascript
for this scenario?
e423689
to
e04c9d4
Compare
@pjedrzejewski @michalmarcinkowski corrections applied. |
@@ -104,4 +106,21 @@ function it_checks_if_account_was_deleted( | |||
|
|||
$this->accountShouldBeDeleted(); | |||
} | |||
|
|||
function it_tries_to_register_new_account( | |||
$registerPage |
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.
Should be in one line. Same as above.
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.
👍
e04c9d4
to
a11cf04
Compare
@@ -19,6 +19,7 @@ | |||
<parameter key="sylius.behat.context.setup.payment.class">Sylius\Behat\Context\Setup\PaymentContext</parameter> | |||
<parameter key="sylius.behat.context.setup.security.class">Sylius\Behat\Context\Setup\SecurityContext</parameter> | |||
<parameter key="sylius.behat.context.setup.user.class">Sylius\Behat\Context\Setup\UserContext</parameter> | |||
<parameter key="sylius.behat.context.setup.order.class">Sylius\Behat\Context\Setup\OrderContext</parameter> |
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.
Why did you add this parameter? It is not used in this file.
a11cf04
to
ad70444
Compare
|
||
if (null === $flashMessage) { | ||
throw new \Exception('Account is not registered.'); | ||
} |
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.
IMO this method should return boolean
. return null !== $flashMessage
and then in the context expect($this->registerPage->wasRegistrationSuccessful)->toBe(true)
like here
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.
👍
5f5f1a4
to
295d293
Compare
{ | ||
$registerPage->wasRegistrationSuccessful()->willReturn(false); | ||
|
||
$this->shouldThrow('PhpSpec\Exception\Example\FailureException')->during('iShouldBeRegistered'); |
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.
FailureException::class
295d293
to
93bde48
Compare
* @param SharedStorageInterface $sharedStorage | ||
* @param UserRepositoryInterface $userRepository | ||
* @param CustomerShowPage $customerShowPage | ||
* @param LoginPage $loginPage | ||
* @param RegisterPage $registerPage |
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.
Since we try to introduce new approach it should be type hinted with an interface. Also check this in spec of this class
93bde48
to
a7f0850
Compare
[User] Account renewal feature scenarios
Thanks Magda! 👍 |
Based on: #4009