diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-04-17 17:21:04 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-04-17 17:21:23 +0200 |
commit | 20499b26a45114913f94387be92e9c473c5c7170 (patch) | |
tree | aed0861c463bedaf9c7337d1c447d77c89a354d6 /server/sonar-web/src/test/js/issues-page-spec.js | |
parent | bf39b235e5d55f07a43707949129aee6a85dd4a3 (diff) | |
download | sonarqube-20499b26a45114913f94387be92e9c473c5c7170.tar.gz sonarqube-20499b26a45114913f94387be92e9c473c5c7170.zip |
SONAR-6210 add a rule description in the workspace
Diffstat (limited to 'server/sonar-web/src/test/js/issues-page-spec.js')
-rw-r--r-- | server/sonar-web/src/test/js/issues-page-spec.js | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/server/sonar-web/src/test/js/issues-page-spec.js b/server/sonar-web/src/test/js/issues-page-spec.js index aadd4db0ae1..89286655883 100644 --- a/server/sonar-web/src/test/js/issues-page-spec.js +++ b/server/sonar-web/src/test/js/issues-page-spec.js @@ -234,6 +234,48 @@ casper.test.begin(testName('Issue Box', 'Transitions'), function (test) { }); +casper.test.begin(testName('Issue Box', 'Rule'), function (test) { + casper + .start(lib.buildUrl('issues'), function () { + lib.setDefaultViewport(); + + + lib.mockRequestFromFile('/api/issue_filters/app', 'app.json'); + lib.mockRequestFromFile('/api/issues/search', 'search.json'); + lib.mockRequestFromFile('/api/rules/show', 'rule.json'); + }) + + .then(function () { + casper.evaluate(function () { + require(['/js/issues/app-new.js']); + }); + }) + + .then(function () { + casper.waitForSelector('.issue.selected'); + }) + + .then(function () { + casper.click('.issue.selected .js-issue-rule'); + casper.waitForSelector('.workspace-viewer-container .coding-rules-detail-properties'); + }) + + .then(function () { + test.assertSelectorContains('.workspace-viewer-name', 'Insufficient branch coverage by unit tests'); + test.assertSelectorContains('.workspace-viewer-container', 'Reliability > Unit tests coverage'); + test.assertSelectorContains('.workspace-viewer-container', 'An issue is created on a file as soon as the'); + }) + + .then(function () { + lib.sendCoverage(); + }) + + .run(function () { + test.done(); + }); +}); + + casper.test.begin(testName('File-Level Issues'), function (test) { var issueKey = '200d4a8b-9666-4e70-9953-7bab57933f97', issueSelector = '.issue[data-key="' + issueKey + '"]'; |