blob: 9b50894fe07893e81123480a0b364bdaf7cd8f58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
define(function (require) {
var bdd = require('intern!bdd');
require('../helpers/test-page');
bdd.describe('Global Permissions', function () {
bdd.it('should show permissions', function () {
return this.remote
.open()
.mockFromFile('/api/permissions/search_global_permissions', 'permissions/global-permissions.json')
.mockFromFile('/api/permissions/users', 'permissions/users.json')
.mockFromFile('/api/permissions/groups', 'permissions/groups.json')
.startApp('global-permissions')
.checkElementExist('#global-permissions-header')
.checkElementExist('#global-permissions-list')
.checkElementCount('#global-permissions-list > li', 6)
.checkElementInclude('#global-permissions-list > li h3', 'Administer System')
.checkElementInclude('#global-permissions-list > li p', 'Ability to perform all administration')
.checkElementInclude('#global-permissions-list > li ul > li:first-child', 'Administrator')
.checkElementInclude('#global-permissions-list > li ul > li:last-child', '1')
});
});
});
|