diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-07-06 17:14:22 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-07-07 09:48:17 +0200 |
commit | 5c0d4c2ada0e63910cf6ca9b11a7a799a41a82b5 (patch) | |
tree | a4779cf7bdf880c37570f1c41766123831ae1d85 /server/sonar-web/test/medium | |
parent | c50d05a36f97689bcfd653d5e5e7201562011034 (diff) | |
download | sonarqube-5c0d4c2ada0e63910cf6ca9b11a7a799a41a82b5.tar.gz sonarqube-5c0d4c2ada0e63910cf6ca9b11a7a799a41a82b5.zip |
transition computation web tests
Diffstat (limited to 'server/sonar-web/test/medium')
-rw-r--r-- | server/sonar-web/test/medium/computation.spec.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/server/sonar-web/test/medium/computation.spec.js b/server/sonar-web/test/medium/computation.spec.js new file mode 100644 index 00000000000..f6af86f4654 --- /dev/null +++ b/server/sonar-web/test/medium/computation.spec.js @@ -0,0 +1,38 @@ +define(function (require) { + var bdd = require('intern!bdd'); + require('../helpers/test-page'); + + bdd.describe('Computation Page', function () { + bdd.it('should show list', function () { + return this.remote + .open() + .mockFromFile('/api/computation/queue', 'computation-spec/queue.json') + .mockFromFile('/api/computation/history', 'computation-spec/history.json') + .startApp('computation', { urlRoot: '/test/medium/base.html' }) + .checkElementCount('#computation-list li[data-id]', 1) + .checkElementInclude('#computation-list', 'SonarQube') + .checkElementInclude('#computation-list-footer', '1') + .checkElementExist('.js-queue.selected') + .clickElement('.js-history') + .checkElementCount('#computation-list li[data-id]', 3) + .checkElementInclude('#computation-list', 'Duration') + .checkElementExist('.js-history.selected') + .checkElementExist('.panel-danger[data-id="3"]') + .clickElement('.js-queue') + .checkElementCount('#computation-list li[data-id]', 1); + }); + + bdd.it('should show more', function () { + return this.remote + .open('#past') + .mockFromFile('/api/computation/queue', 'computation-spec/queue.json') + .mockFromFile('/api/computation/history', 'computation-spec/history-big-1.json') + .startApp('computation', { urlRoot: '/test/medium/base.html' }) + .checkElementCount('#computation-list li[data-id]', 2) + .clearMocks() + .mockFromFile('/api/computation/history', 'computation-spec/history-big-2.json', { data: { p: '2' } }) + .clickElement('#computation-fetch-more') + .checkElementCount('#computation-list li[data-id]', 3); + }); + }); +}); |