Some methods needed in Framework modules are missing in InnerBrowser #6038
Replies: 7 comments
-
|
Beta Was this translation helpful? Give feedback.
-
So how do i use $I->amOnPage('/register');
$I->stopFollowingRedirects();
$I->submitForm('form=name[register_form]', [
'register_form[email]' => 'john_doe@gmail.com',
'register_form[password]' => '123456'
]);
$I->seeEmailIsSent(1);
// I can't make the following assertions because i stopped the redirect.
$I->expect('to be redirected to the login page');
$I->seeResponseCodeIsSuccessful();
$I->seeCurrentUrlEquals('/login');
$I->see('Login');
|
Beta Was this translation helpful? Give feedback.
-
Well, nobody asked for that until now. followRedirects doesn't make much sense in context of REST module and I wasn't aware that somebody is using stopRedirects for Symfony email assertions. |
Beta Was this translation helpful? Give feedback.
-
I wrote that start/stop FollowingRedirects should be in InnerBrowser 5 years ago: #2598 (comment) |
Beta Was this translation helpful? Give feedback.
-
For PhpBrowser and Frameworks module I don't assume that someone needs to stop redirects. That's why. In REST you may have more control over requests. Yeah, I'm also not so sure that this is the huge issue we should discuss. But if you know a better idea on how to restructurize the code , I'm open to it. |
Beta Was this translation helpful? Give feedback.
-
The easiest way would be to make which would allow anyone to execute the non-wrapper methods that they need... The other solution would involve creating wrappers for That would be enough to close this discussion. |
Beta Was this translation helpful? Give feedback.
-
In Symfony, for emails assertions including
seeEmailIsSent
you need to stop the redirects:So...
1. Why are
stopFollowingRedirects
andstartFollowingRedirects
functions specific to the REST module?2. These two simple call functions are duplicated in both modules...?:
setServerParameters()
[InnerBrowser | REST]haveServerParameter()
[InnerBrowser | REST]3. The following methods are relevant to Framework modules and are not in InnerBrowser:
If use
stopFollowingRedirects
to stop the redirect, i don't have available the function that allows me to fire that redirect after executing my assertions.startFollowingRedirects
simply re-enables the next redirect that might occur, but does not execute the pending one. This function is performed byfollowRedirect
.Codeception offers a method to go to the previous page 'moveBack()'... But then it is not possible for me to go forward in the history.
See related issue: Repeat latest request in functional test? lib-innerbrowser#33
4. Which ones are really missing and which ones can be contributed?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions