diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-08-12 11:23:22 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-08-13 10:49:41 +0200 |
commit | 91e29d47a06b3f5c7dd48bd19447a639b3b7de4c (patch) | |
tree | f548f32a3987b51986df32ef1dfb126cc8279574 /server/sonar-web/test/medium/source-viewer.spec.js | |
parent | aaa5554c0a8e5478ad94739933784bdb59d60270 (diff) | |
download | sonarqube-91e29d47a06b3f5c7dd48bd19447a639b3b7de4c.tar.gz sonarqube-91e29d47a06b3f5c7dd48bd19447a639b3b7de4c.zip |
SONAR-6765 SONAR-6766 show multiple issue locations and execution flows
Diffstat (limited to 'server/sonar-web/test/medium/source-viewer.spec.js')
-rw-r--r-- | server/sonar-web/test/medium/source-viewer.spec.js | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/server/sonar-web/test/medium/source-viewer.spec.js b/server/sonar-web/test/medium/source-viewer.spec.js index 27a5b96057f..95d33dbab18 100644 --- a/server/sonar-web/test/medium/source-viewer.spec.js +++ b/server/sonar-web/test/medium/source-viewer.spec.js @@ -19,8 +19,8 @@ define(function (require) { .checkElementExist('.source-line-code[data-line-number="3"] .source-line-code-issue') .checkElementInclude('.source-line-code[data-line-number="3"] .source-line-code-issue', '14 So') - .checkElementExist('.source-line-code[data-line-number="11"] .source-line-code-issue') - .checkElementInclude('.source-line-code[data-line-number="11"] .source-line-code-issue', 'arQub') + .checkElementExist('.source-line-code[data-line-number="9"] .source-line-code-issue') + .checkElementInclude('.source-line-code[data-line-number="9"] .source-line-code-issue', 'sion') .checkElementExist('.source-line-code[data-line-number="18"] .source-line-code-issue') .checkElementInclude('.source-line-code[data-line-number="18"] .source-line-code-issue', @@ -28,6 +28,46 @@ define(function (require) { .checkElementExist('.source-line-code[data-line-number="19"] .source-line-code-issue') .checkElementInclude('.source-line-code[data-line-number="19"] .source-line-code-issue', ' */'); }); + + bdd.it('should show secondary issue locations on the same 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/issues-with-precise-location.json', + { data: { componentUuids: 'uuid' } }) + .startApp('source-viewer', { file: file }) + .checkElementExist('.source-line-code[data-line-number="3"] .source-line-code-issue') + .checkElementInclude('.source-line-code[data-line-number="3"] .source-line-code-issue', '14 So') + .clickElement('.source-line-with-issues[data-line-number="3"]') + .clickElement('.js-issue-locations') + .checkElementExist('.source-line-code[data-line-number="3"] .source-viewer-flow-location') + .checkElementCount('.source-line-code[data-line-number="3"] .source-line-code-secondary-issue', 2) + .checkElementInclude('.source-line-code[data-line-number="3"] .source-line-code-secondary-issue', ') 200') + .checkElementInclude('.source-line-code[data-line-number="3"] .source-line-code-secondary-issue', '14 So'); + }); + + bdd.it('should show secondary issue locations on the different lines', 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/issues-with-precise-location.json', + { data: { componentUuids: 'uuid' } }) + .startApp('source-viewer', { file: file }) + .checkElementExist('.source-line-code[data-line-number="9"] .source-line-code-issue') + .checkElementInclude('.source-line-code[data-line-number="9"] .source-line-code-issue', 'sion') + .clickElement('.source-line-with-issues[data-line-number="9"]') + .clickElement('.js-issue-locations') + .checkElementExist('.source-line-code[data-line-number="8"] .source-viewer-flow-location') + .checkElementExist('.source-line-code[data-line-number="9"] .source-viewer-flow-location') + .checkElementCount('.source-line-code[data-line-number="8"] .source-line-code-secondary-issue', 1) + .checkElementCount('.source-line-code[data-line-number="9"] .source-line-code-secondary-issue', 1) + .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'); + }); }); }); }); |