mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-13 23:49:05 -06:00
Fix tests for permission check and role selection
This commit is contained in:
committed by
Michael Barz
parent
4716cd704b
commit
853642a805
File diff suppressed because one or more lines are too long
@@ -17,12 +17,12 @@
|
||||
</oc-grid>
|
||||
</template>
|
||||
<template v-else-if="hasFailed">
|
||||
<oc-alert variation="warning" no-close class="oc-m">
|
||||
<oc-alert variation="warning" no-close class="oc-m" id="accounts-list-loading-failed">
|
||||
<oc-icon name="warning" variation="warning" class="uk-float-left oc-mr-s" />
|
||||
<translate>You don't have permissions to manage accounts.</translate>
|
||||
</oc-alert>
|
||||
</template>
|
||||
<oc-loader v-else />
|
||||
<oc-loader id="accounts-list-loader" v-else />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -117,7 +117,7 @@ module.exports = {
|
||||
locateStrategy: 'xpath'
|
||||
},
|
||||
roleInRolesDropdown: {
|
||||
selector: '//label[contains(@class, "accounts-roles-dropdown-role") and normalize-space()="%s"]',
|
||||
selector: '//label[contains(@class, "accounts-roles-dropdown-role")]/span[normalize-space()="%s"]',
|
||||
locateStrategy: 'xpath'
|
||||
},
|
||||
rolesDropdownTrigger: {
|
||||
@@ -125,8 +125,10 @@ module.exports = {
|
||||
locateStrategy: 'xpath'
|
||||
},
|
||||
loadingAccountsList: {
|
||||
selector: '//div[contains(@class, "oc-loader")]',
|
||||
locateStrategy: 'xpath'
|
||||
selector: '#accounts-list-loader'
|
||||
},
|
||||
loadingAccountsListFailed: {
|
||||
selector: '#accounts-list-loading-failed'
|
||||
},
|
||||
rowCheckbox: {
|
||||
selector: '//input[@class="oc-checkbox"]',
|
||||
|
||||
@@ -33,8 +33,7 @@ Then('the displayed role of user {string} should be {string} on the WebUI', func
|
||||
Then('the user should not be able to see the accounts list on the WebUI', async function () {
|
||||
return client.page.accountsPage()
|
||||
.waitForAjaxCallsToStartAndFinish()
|
||||
.waitForElementVisible('@loadingAccountsList')
|
||||
.waitForElementNotPresent('@accountsListTable')
|
||||
.waitForElementVisible('@loadingAccountsListFailed')
|
||||
})
|
||||
|
||||
When('the user disables user/users {string} using the WebUI', function (usernames) {
|
||||
|
||||
Reference in New Issue
Block a user