diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-08-20 15:39:03 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-08-24 09:22:49 +0200 |
commit | 7a65a44016c32c5656e7aa5f0e174e670b6849b0 (patch) | |
tree | ea8840f4bc19efd99d78a917e797bc1c2902e98e /server/sonar-web/test | |
parent | c007b1899708a5cb4dce68087ed33a0c36551877 (diff) | |
download | sonarqube-7a65a44016c32c5656e7aa5f0e174e670b6849b0.tar.gz sonarqube-7a65a44016c32c5656e7aa5f0e174e670b6849b0.zip |
SONAR-6797 rewrite project permissions page
Diffstat (limited to 'server/sonar-web/test')
-rw-r--r-- | server/sonar-web/test/intern.js | 3 | ||||
-rw-r--r-- | server/sonar-web/test/medium/project-permissions.spec.js | 22 |
2 files changed, 24 insertions, 1 deletions
diff --git a/server/sonar-web/test/intern.js b/server/sonar-web/test/intern.js index ee712c33f18..520d2127a40 100644 --- a/server/sonar-web/test/intern.js +++ b/server/sonar-web/test/intern.js @@ -31,7 +31,8 @@ define(['intern'], function (intern) { 'test/medium/custom-measures.spec', 'test/medium/quality-profiles.spec', 'test/medium/source-viewer.spec', - 'test/medium/global-permissions.spec' + 'test/medium/global-permissions.spec', + 'test/medium/project-permissions.spec' ], tunnel: tunnel, diff --git a/server/sonar-web/test/medium/project-permissions.spec.js b/server/sonar-web/test/medium/project-permissions.spec.js new file mode 100644 index 00000000000..1e32733fbf3 --- /dev/null +++ b/server/sonar-web/test/medium/project-permissions.spec.js @@ -0,0 +1,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') + .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'); + }); + }); +}); |