diff --git a/settings/js/users/users.js b/settings/js/users/users.js index d00423a99f30c..b8d002e86de32 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -88,7 +88,7 @@ var UserList = { /** * add username and displayname to row (in data and visible markup) */ - $tr.data('uid', user.name); + $tr.attr('data-uid', user.name); $tr.data('displayname', user.displayname); $tr.data('mailAddress', user.email); $tr.data('restoreDisabled', user.isRestoreDisabled); diff --git a/tests/acceptance/features/bootstrap/UsersSettingsContext.php b/tests/acceptance/features/bootstrap/UsersSettingsContext.php index 59d40d7e86fa0..b39f29a2aa339 100644 --- a/tests/acceptance/features/bootstrap/UsersSettingsContext.php +++ b/tests/acceptance/features/bootstrap/UsersSettingsContext.php @@ -71,7 +71,7 @@ public static function createNewUserButton() { * @return Locator */ public static function rowForUser($user) { - return Locator::forThe()->xpath("//table[@id = 'userlist']//tr[normalize-space() = '$user']/..")-> + return Locator::forThe()->xpath("//table[@id = 'userlist']//tr[@data-uid = '$user']/..")-> describedAs("Row for user $user in Users Settings"); }