aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/test
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-09-15 11:14:22 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-09-15 11:14:22 +0200
commit6b374d017959b404355bfb5f18b45b2cac581a11 (patch)
tree30c6047ae80100bbf170f6c9abcdc452a9bcabda /server/sonar-web/test
parent52903276bb805ed85d098ff9160f4e547c50c0a1 (diff)
downloadsonarqube-6b374d017959b404355bfb5f18b45b2cac581a11.tar.gz
sonarqube-6b374d017959b404355bfb5f18b45b2cac581a11.zip
SONAR-6747 Display the number of issues on a line in the component viewer
Diffstat (limited to 'server/sonar-web/test')
-rw-r--r--server/sonar-web/test/medium/source-viewer.spec.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/sonar-web/test/medium/source-viewer.spec.js b/server/sonar-web/test/medium/source-viewer.spec.js
index 5872dc7c0fe..e318f7f19e8 100644
--- a/server/sonar-web/test/medium/source-viewer.spec.js
+++ b/server/sonar-web/test/medium/source-viewer.spec.js
@@ -68,6 +68,20 @@ define(function (require) {
.checkElementInclude('.source-line-code[data-line-number="8"] .source-line-code-secondary-issue', 'ense ')
.checkElementInclude('.source-line-code[data-line-number="9"] .source-line-code-secondary-issue', 'sion');
});
+
+ bdd.it('should show the number of issues on a line', function () {
+ return this.remote
+ .open()
+ .mockFromFile('/api/components/app', 'source-viewer-spec/app.json', { data: { uuid: 'uuid' } })
+ .mockFromFile('/api/sources/lines', 'source-viewer-spec/lines.json', { data: { uuid: 'uuid' } })
+ .mockFromFile('/api/issues/search', 'source-viewer-spec/several-issues-on-a-line.json')
+ .startApp('source-viewer', { file: file })
+ .checkElementExist('.source-line-issues[data-line-number="3"] .icon-severity-critical')
+ .checkElementExist('.source-line-issues[data-line-number="3"] .source-line-issues-counter')
+ .checkElementInclude('.source-line-issues[data-line-number="3"] .source-line-issues-counter', 2)
+ .checkElementExist('.source-line-issues[data-line-number="5"] .icon-severity-critical')
+ .checkElementNotExist('.source-line-issues[data-line-number="5"] .source-line-issues-counter');
+ });
});
});
});