Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added assertion for the email field in user creation #22604

Merged
merged 1 commit into from
Sep 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions x-pack/test/functional/apps/security/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default function ({ getService, getPageObjects }) {
log.debug('actualUsers = %j', users);
expect(users.Lee.roles).to.eql(['kibana_user']);
expect(users.Lee.fullname).to.eql('LeeFirst LeeLast');
expect(users.Lee.email).to.eql('lee@myEmail.com');
expect(users.Lee.reserved).to.be(false);
});

Expand Down
4 changes: 3 additions & 1 deletion x-pack/test/functional/page_objects/security_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,14 @@ export function SecurityPageProvider({ getService, getPageObjects }) {
return mapAsync(users, async user => {
const fullnameElement = await user.findByCssSelector('[data-test-subj="userRowFullName"]');
const usernameElement = await user.findByCssSelector('[data-test-subj="userRowUserName"]');
const emailElement = await user.findByCssSelector('[data-header="Email Address"]');
const rolesElement = await user.findByCssSelector('[data-test-subj="userRowRoles"]');
const isReservedElementVisible = await user.findByCssSelector('td:last-child');

return {
username: await usernameElement.getVisibleText(),
fullname: await fullnameElement.getVisibleText(),
email: await emailElement.getVisibleText(),
roles: (await rolesElement.getVisibleText()).split(',').map(role => role.trim()),
reserved: (await isReservedElementVisible.getProperty('innerHTML')).includes('reservedUser')
};
Expand Down Expand Up @@ -228,7 +230,7 @@ export function SecurityPageProvider({ getService, getPageObjects }) {
await testSubjects.setValue('passwordInput', userObj.password);
await testSubjects.setValue('passwordConfirmationInput', userObj.confirmPassword);
await testSubjects.setValue('userFormFullNameInput', userObj.fullname);
await testSubjects.setValue('userFormEmailInput', 'example@example.com');
await testSubjects.setValue('userFormEmailInput', userObj.email);
log.debug('Add roles: ', userObj.roles);
const rolesToAdd = userObj.roles || [];
for (let i = 0; i < rolesToAdd.length; i++) {
Expand Down