-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added assertion for the email field.
- Loading branch information
1 parent
bcb7938
commit d874c21
Showing
2 changed files
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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('[email protected]'); | ||
expect(users.Lee.reserved).to.be(false); | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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') | ||
}; | ||
|
@@ -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', '[email protected]'); | ||
await testSubjects.setValue('userFormEmailInput', userObj.email); | ||
log.debug('Add roles: ', userObj.roles); | ||
const rolesToAdd = userObj.roles || []; | ||
for (let i = 0; i < rolesToAdd.length; i++) { | ||
|