diff --git a/Features/Context/Users.php b/Features/Context/Users.php index cc68404b6..ec57f4629 100644 --- a/Features/Context/Users.php +++ b/Features/Context/Users.php @@ -69,9 +69,14 @@ public function iCreateUser(TableNode $users = null) */ public function goToUserPage($username) { + $user = $this->userService->loadUserByLogin($username); + $userObject = $this->contentService->loadContent($user->getUserId()); + $firstName = $userObject->getFieldValue('first_name'); + $lastName = $userObject->getFieldValue('last_name'); + $this->iAmOnPage('Users'); $this->waitWhileLoading(); - $this->clickOnTreePath("$username $username"); + $this->clickOnTreePath("$firstName $lastName"); $this->sleep(); //safeguard for application delays } @@ -84,6 +89,7 @@ public function editUserUser($username) $userObject = $this->contentService->loadContent($user->getUserId()); $firstName = $userObject->getFieldValue('first_name'); $lastName = $userObject->getFieldValue('last_name'); + $this->clickOnTreePath("$firstName $lastName"); $this->sleep(); //safeguard for application delays $this->waitWhileLoading();