mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
fixed behat test failure between two scenarios if not logged out
This commit is contained in:
parent
29d99e884f
commit
53acf56c00
@ -139,6 +139,7 @@ class LoginContext extends BehatContext
|
|||||||
// If no login form, go to /security/login page
|
// If no login form, go to /security/login page
|
||||||
if(!$visibleForm) {
|
if(!$visibleForm) {
|
||||||
$c = $this->getMainContext();
|
$c = $this->getMainContext();
|
||||||
|
$this->getSession()->visit($c->joinUrlParts($c->getBaseUrl(), 'Security/logout'));
|
||||||
$loginUrl = $c->joinUrlParts($c->getBaseUrl(), $c->getLoginUrl());
|
$loginUrl = $c->joinUrlParts($c->getBaseUrl(), $c->getLoginUrl());
|
||||||
$this->getSession()->visit($loginUrl);
|
$this->getSession()->visit($loginUrl);
|
||||||
$page = $this->getSession()->getPage();
|
$page = $this->getSession()->getPage();
|
||||||
|
Loading…
Reference in New Issue
Block a user