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

Commit

Permalink
[Behat] Fix User page sentence fetches the first and last name of the…
Browse files Browse the repository at this point in the history
… User to select from the conten tree
  • Loading branch information
Miguel committed May 2, 2016
1 parent 98a533b commit daaff8e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Features/Context/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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();
Expand Down

0 comments on commit daaff8e

Please sign in to comment.