Skip to content
This repository was archived by the owner on May 3, 2022. It is now read-only.

Commit d6e839d

Browse files
author
Miguel
committed
Improved logout
1 parent cae6c52 commit d6e839d

1 file changed

Lines changed: 5 additions & 15 deletions

File tree

Features/Context/SubContext/Authentication.php

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ trait Authentication
2525
/**
2626
* @Given I go to homepage
2727
*/
28-
public function goToPlatformUi()
28+
public function goToPlatformUi($url = '')
2929
{
30-
$this->visit($this->platformUiUri);
30+
$this->visit($this->platformUiUri . $url);
3131
}
3232

3333
/**
@@ -65,6 +65,8 @@ public function loggedAsAdminPlatformUi()
6565
public function iLogout()
6666
{
6767
$this->shouldBeLoggedIn = false;
68+
$this->goToPlatformUi('#/dashboard');
69+
$this->waitForJs();
6870
$this->iClickAtLink("Logout");
6971
}
7072

@@ -81,19 +83,7 @@ public function iShouldBeLoggedIn()
8183
}
8284

8385
/**
84-
* Checks if the user is still logged in
85-
*
86-
* @AfterStep
87-
*/
88-
public function runAfterStep()
89-
{
90-
if ($this->shouldBeLoggedIn) {
91-
$this->iShouldBeLoggedIn();
92-
}
93-
}
94-
95-
/**
96-
* Checks if the user is still logged in
86+
* Logs the user out
9787
*
9888
* @AfterScenario
9989
*/

0 commit comments

Comments
 (0)