diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-08-08 10:20:31 +0200 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-08-08 10:20:37 +0200 |
commit | 63b1d5ffd26b1cf4b86d378717015d7665e82534 (patch) | |
tree | 18c0615629920dc72d08153b567840b3491024c4 /server/sonar-web | |
parent | d11e245197ec1fb630c73092cd90023a0ce719d0 (diff) | |
download | sonarqube-63b1d5ffd26b1cf4b86d378717015d7665e82534.tar.gz sonarqube-63b1d5ffd26b1cf4b86d378717015d7665e82534.zip |
SONAR-5516 Add medium test
Diffstat (limited to 'server/sonar-web')
-rw-r--r-- | server/sonar-web/src/main/js/navigator/filters/base-filters.js | 1 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/tests/e2e/tests/coding-rules-spec.js | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/navigator/filters/base-filters.js b/server/sonar-web/src/main/js/navigator/filters/base-filters.js index b73a08e0928..88a69b7a50f 100644 --- a/server/sonar-web/src/main/js/navigator/filters/base-filters.js +++ b/server/sonar-web/src/main/js/navigator/filters/base-filters.js @@ -33,6 +33,7 @@ define([ this.$el.on('click', function(e) { e.stopPropagation(); }); + this.$el.attr('id', 'filter-' + this.model.get('property')) }, diff --git a/server/sonar-web/src/main/js/tests/e2e/tests/coding-rules-spec.js b/server/sonar-web/src/main/js/tests/e2e/tests/coding-rules-spec.js index 750da1da56a..4b4349c7a23 100644 --- a/server/sonar-web/src/main/js/tests/e2e/tests/coding-rules-spec.js +++ b/server/sonar-web/src/main/js/tests/e2e/tests/coding-rules-spec.js @@ -43,6 +43,20 @@ casper.test.begin(testName('Readonly Tests'), function suite(test) { test.assertSelectorHasText('.navigator-filter[data-property="tags"] option:nth-child(11)', 'unused'); casper.click('.navigator-filter.active>.navigator-filter-disable'); }); + + // Check repositories are sorted by name, then language + test.assertSelectorHasText('#filter-repositories li:nth-child(1) span:nth-child(1)', 'Common SonarQube'); + test.assertSelectorHasText('#filter-repositories li:nth-child(1) span:nth-child(2)', 'CoffeeScript'); + test.assertSelectorHasText('#filter-repositories li:nth-child(2) span:nth-child(1)', 'Common SonarQube'); + test.assertSelectorHasText('#filter-repositories li:nth-child(2) span:nth-child(2)', 'Java'); + test.assertSelectorHasText('#filter-repositories li:nth-child(3) span:nth-child(1)', 'Manual Rules'); + test.assertSelectorHasText('#filter-repositories li:nth-child(3) span:nth-child(2)', 'None'); + test.assertSelectorHasText('#filter-repositories li:nth-child(4) span:nth-child(1)', 'SonarQube'); + test.assertSelectorHasText('#filter-repositories li:nth-child(4) span:nth-child(2)', 'CoffeeScript'); + test.assertSelectorHasText('#filter-repositories li:nth-child(5) span:nth-child(1)', 'SonarQube'); + test.assertSelectorHasText('#filter-repositories li:nth-child(5) span:nth-child(2)', 'Java'); + test.assertSelectorHasText('#filter-repositories li:nth-child(6) span:nth-child(1)', 'SonarQube'); + test.assertSelectorHasText('#filter-repositories li:nth-child(6) span:nth-child(2)', 'Xoo'); }); |