mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-25 09:48:08 -04:00
Fix step definition for checking deleted users
This commit is contained in:
@@ -14,13 +14,14 @@ module.exports = {
|
||||
return this.waitForElementVisible('@accountsListTable')
|
||||
},
|
||||
isUserListed: async function (username) {
|
||||
let user
|
||||
const usernameInTable = util.format(this.elements.userInAccountsList.selector, username)
|
||||
await this.useXpath().waitForElementVisible(usernameInTable)
|
||||
.getText(usernameInTable, (result) => {
|
||||
user = result
|
||||
})
|
||||
return user.value
|
||||
return true
|
||||
},
|
||||
isUserDeleted: async function (username) {
|
||||
const usernameInTable = util.format(this.elements.userInAccountsList.selector, username)
|
||||
await this.useXpath().waitForElementNotPresent(usernameInTable)
|
||||
return true
|
||||
},
|
||||
|
||||
selectRole: function (username, role) {
|
||||
|
||||
@@ -7,9 +7,15 @@ When('the user browses to the accounts page', function () {
|
||||
})
|
||||
|
||||
Then('user {string} should be displayed in the accounts list on the WebUI', async function (username) {
|
||||
await client.page.accountsPage().accountsList(username)
|
||||
await client.page.accountsPage().accountsList()
|
||||
const userListed = await client.page.accountsPage().isUserListed(username)
|
||||
return assert.strictEqual(userListed, username)
|
||||
return assert.strictEqual(userListed, true)
|
||||
})
|
||||
|
||||
Then('user {string} should not be displayed in the accounts list on the WebUI', async function (username) {
|
||||
await client.page.accountsPage().accountsList()
|
||||
const userDeleted = await client.page.accountsPage().isUserDeleted(username)
|
||||
return assert.strictEqual(userDeleted, true)
|
||||
})
|
||||
|
||||
Given('the user has changed the role of user {string} to {string}', function (username, role) {
|
||||
|
||||
Reference in New Issue
Block a user