From 6e6d75c90be6eab284975ab0c65a923daadbd3af Mon Sep 17 00:00:00 2001 From: Rashmi Kulkarni Date: Mon, 24 Sep 2018 08:11:43 -0700 Subject: [PATCH] backport --- test/functional/config.js | 4 ++ .../public/views/account/account.html | 4 +- .../security/public/views/account/account.js | 5 +- .../change_password_form.html | 5 ++ .../public/views/nav_control/nav_control.html | 1 + x-pack/test/functional/apps/security/index.js | 1 + .../functional/apps/security/user_email.js | 56 +++++++++++++++++++ x-pack/test/functional/config.js | 2 + .../page_objects/accountsetting_page.js | 34 +++++++++++ x-pack/test/functional/page_objects/index.js | 1 + 10 files changed, 110 insertions(+), 3 deletions(-) create mode 100644 x-pack/test/functional/apps/security/user_email.js create mode 100644 x-pack/test/functional/page_objects/accountsetting_page.js diff --git a/test/functional/config.js b/test/functional/config.js index aafdf9ebad25ca..394810a52f83a7 100644 --- a/test/functional/config.js +++ b/test/functional/config.js @@ -151,6 +151,10 @@ export default async function ({ readConfigFile }) { pathname: '/app/kibana', hash: '/dev_tools/console', }, + account: { + pathname: '/app/kibana', + hash: '/account', + }, home: { pathname: '/app/kibana', hash: '/home', diff --git a/x-pack/plugins/security/public/views/account/account.html b/x-pack/plugins/security/public/views/account/account.html index 9ae1092897b08a..67bb4edef50cd1 100644 --- a/x-pack/plugins/security/public/views/account/account.html +++ b/x-pack/plugins/security/public/views/account/account.html @@ -31,7 +31,7 @@

Username
-

+

@@ -41,7 +41,7 @@

Email
-

+

diff --git a/x-pack/plugins/security/public/views/account/account.js b/x-pack/plugins/security/public/views/account/account.js index 33df417b4d9832..fea49c55ccf20a 100644 --- a/x-pack/plugins/security/public/views/account/account.js +++ b/x-pack/plugins/security/public/views/account/account.js @@ -39,7 +39,10 @@ routes.when('/account', { } $scope.user.$changePassword() - .then(() => toastNotifications.addSuccess('Updated password')) + .then(() => toastNotifications.addSuccess({ + title: 'Updated password', + 'data-test-subj': 'passwordUpdateSuccess', + })) .then(onSuccess) .catch(error => { if (error.status === 401) { diff --git a/x-pack/plugins/security/public/views/management/change_password_form/change_password_form.html b/x-pack/plugins/security/public/views/management/change_password_form/change_password_form.html index 45b2cff41031e9..f4fd63ff5b8d05 100644 --- a/x-pack/plugins/security/public/views/management/change_password_form/change_password_form.html +++ b/x-pack/plugins/security/public/views/management/change_password_form/change_password_form.html @@ -9,6 +9,7 @@ @@ -29,6 +30,7 @@ type="password" class="kuiTextInput fullWidth" id="password" + data-test-subj="currentPasswordInput" name="password" ng-model="changePasswordController.currentPassword" required @@ -52,6 +54,7 @@ type="password" class="kuiTextInput fullWidth" id="newPassword" + data-test-subj="newPasswordInput" name="newPassword" ng-model="changePasswordController.newPassword" required @@ -76,6 +79,7 @@ type="password" class="kuiTextInput fullWidth" name="confirmPassword" + data-test-subj="confirmPasswordInput" ng-model="changePasswordController.newPasswordConfirmation" required /> @@ -102,6 +106,7 @@