Closed TavoNiievez closed 3 years ago
@TavoNiievez This was released already? Cause I'd suggest to rename followRedirect
to openRedirectedUrl
(or openRedirectedLocation
or openRedirectedPage
). Why?
followRedirect
sounds to me like I'm supposed to somehow pass a redirect into it: followRedirect($redirect)
Questions:
1: It does not startFollowingRedirects? I.e. it just follows the pending redirect from the latest request? => Should be explained explicitly.
2: Talking about "latest": If I stopFollowingRedirects
, then do 5 amOnPage
, then openRedirectedUrl
: Only the redirected URL from the latest amOnPage
will be executed?
2a: But if this redirect yields another 3xx response, that page won't be called (see 1)? But it will produce another pending redirect, so calling it repeatedly does make sense in some situations:
$I->stopFollowingRedirects();
$I->amOnPage(...);
// ...
$I->openRedirectedUrl();
$I->openRedirectedUrl();
$I->openRedirectedUrl();
TODO:
stopFollowingRedirects
stopFollowingRedirects
, mention this oneIt's basically a shortcut for: $location = $I->grabHttpHeader('Location'); // REST module $I->amOnPage($location);
Yes, it was released as 1.4.0 right after merging.
See https://github.com/Codeception/Codeception/discussions/6038 .