aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/test/medium/project-permissions.spec.js
blob: b3bd5ec567d2812e237b6fb3ead1ec6c88fa76f5 (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('Project Permissions', function () {
    bdd.it('should show permissions', function () {
      return this.remote
          .open()
          .mockFromFile('/api/permissions/search_project_permissions', 'permissions/project-permissions.json')
          .startApp('project-permissions/app')
          .checkElementExist('#project-permissions-header')
          .checkElementExist('#projects')
          .checkElementCount('#projects > thead > tr > th', 3)
          .checkElementCount('#projects > tbody > tr', 2)
          .checkElementInclude('#projects > tbody > tr:first-child td:nth-child(1)', 'My Project')
          .checkElementInclude('#projects > tbody > tr:first-child td:nth-child(2)', '1')
          .checkElementInclude('#projects > tbody > tr:first-child td:nth-child(2)', '2')
          .checkElementInclude('#projects > tbody > tr:first-child td:nth-child(3)', '3')
          .checkElementInclude('#projects > tbody > tr:first-child td:nth-child(3)', '4');
    });
  });
});