diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2014-07-24 15:24:02 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2014-07-24 15:24:02 +0200 |
commit | dcfdca7d478410128a0feea40b4b89c40bb020c6 (patch) | |
tree | fc88e5301a0435faa3c899ad9a8fc8abe45e24f8 /server/sonar-web | |
parent | d63b7e206d8621b5cffed9f6baa548034f3d6a44 (diff) | |
download | sonarqube-dcfdca7d478410128a0feea40b4b89c40bb020c6.tar.gz sonarqube-dcfdca7d478410128a0feea40b4b89c40bb020c6.zip |
Fix double inclusion of jquery.mockjax into medium tests
Diffstat (limited to 'server/sonar-web')
7 files changed, 7 insertions, 41 deletions
diff --git a/server/sonar-web/src/main/coffee/component-viewer/app.coffee b/server/sonar-web/src/main/coffee/component-viewer/app.coffee index d091a396aa6..30d4c76ffc5 100644 --- a/server/sonar-web/src/main/coffee/component-viewer/app.coffee +++ b/server/sonar-web/src/main/coffee/component-viewer/app.coffee @@ -5,7 +5,6 @@ requirejs.config 'backbone': 'third-party/backbone' 'backbone.marionette': 'third-party/backbone.marionette' 'handlebars': 'third-party/handlebars' - 'jquery.mockjax': 'third-party/jquery.mockjax' shim: 'backbone.marionette': diff --git a/server/sonar-web/src/main/coffee/component-viewer/main.coffee b/server/sonar-web/src/main/coffee/component-viewer/main.coffee index a7f4c7415a2..c4cc5bb27cc 100644 --- a/server/sonar-web/src/main/coffee/component-viewer/main.coffee +++ b/server/sonar-web/src/main/coffee/component-viewer/main.coffee @@ -16,8 +16,6 @@ define [ 'component-viewer/source' 'component-viewer/header' 'component-viewer/utils' - - 'component-viewer/mockjax' ], ( Backbone Marionette diff --git a/server/sonar-web/src/main/coffee/component-viewer/mockjax.coffee b/server/sonar-web/src/main/coffee/component-viewer/mockjax.coffee deleted file mode 100644 index 65137174334..00000000000 --- a/server/sonar-web/src/main/coffee/component-viewer/mockjax.coffee +++ /dev/null @@ -1,27 +0,0 @@ -define ['third-party/jquery.mockjax'], -> - - jQuery.mockjaxSettings.contentType = 'text/json'; - jQuery.mockjaxSettings.responseTime = 250; - - jQuery.mockjax - url: "#{baseUrl}/api/sources/app" - responseText: JSON.stringify - key: 'org.codehaus.sonar:sonar-dev-maven-plugin:src/main/java/org/sonar/dev/UploadMojo.java' - path: 'src/main/java/org/sonar/dev/UploadMojo.java' - name: 'UploadMojo.java' - q: 'FIL' - fav: false - project: 'org.codehaus.sonar:sonar-dev-maven-plugin' - projectName: 'SonarQube Development Maven Plugin' - periods: [] - measures: - 'ncloc': 69 - 'coverage': '30%' - 'duplication_density': '7.4%' - 'debt': '3d 2h' - 'issues': 4 - 'blocker_issues': 1 - 'critical_issues': 2 - 'major_issues': 0 - 'minor_issues': 1 - 'info_issues': 0
\ No newline at end of file diff --git a/server/sonar-web/src/main/coffee/dashboard/file-app.coffee b/server/sonar-web/src/main/coffee/dashboard/file-app.coffee index 661562cef33..0e35c084710 100644 --- a/server/sonar-web/src/main/coffee/dashboard/file-app.coffee +++ b/server/sonar-web/src/main/coffee/dashboard/file-app.coffee @@ -5,7 +5,6 @@ requirejs.config 'backbone': 'third-party/backbone' 'backbone.marionette': 'third-party/backbone.marionette' 'handlebars': 'third-party/handlebars' - 'jquery.mockjax': 'third-party/jquery.mockjax' shim: 'backbone.marionette': diff --git a/server/sonar-web/src/main/coffee/drilldown/app.coffee b/server/sonar-web/src/main/coffee/drilldown/app.coffee index fc62830b711..c1179e3e05d 100644 --- a/server/sonar-web/src/main/coffee/drilldown/app.coffee +++ b/server/sonar-web/src/main/coffee/drilldown/app.coffee @@ -5,7 +5,6 @@ requirejs.config 'backbone': 'third-party/backbone' 'backbone.marionette': 'third-party/backbone.marionette' 'handlebars': 'third-party/handlebars' - 'jquery.mockjax': 'third-party/jquery.mockjax' shim: 'backbone.marionette': diff --git a/server/sonar-web/src/main/js/tests/e2e/tests/component-viewer-spec.js b/server/sonar-web/src/main/js/tests/e2e/tests/component-viewer-spec.js index 8f9d589b293..62c14b75bb6 100644 --- a/server/sonar-web/src/main/js/tests/e2e/tests/component-viewer-spec.js +++ b/server/sonar-web/src/main/js/tests/e2e/tests/component-viewer-spec.js @@ -305,15 +305,15 @@ casper.test.begin(testName('Coverage'), function (test) { test.assertSelectorContains('.bubble-popup li[title="should_update_existing_issue"]', '293'); lib.clearRequestMocks(); -// lib.mockRequestFromFile('/api/components/app', 'tests/app.json'); -// lib.mockRequestFromFile('/api/sources/show', 'tests/source.json'); -// lib.mockRequestFromFile('/api/resources', 'tests/resources.json'); -// lib.mockRequestFromFile('/api/tests/show', 'tests/tests.json'); + lib.mockRequestFromFile('/api/components/app', 'tests/app.json'); + lib.mockRequestFromFile('/api/sources/show', 'tests/source.json'); + lib.mockRequestFromFile('/api/resources', 'tests/resources.json'); + lib.mockRequestFromFile('/api/tests/show', 'tests/tests.json'); casper.click('.component-viewer-popup-test-file[data-key]'); -// casper.waitForSelector('.js-unit-test', function () { -// test.assertElementCount('.js-unit-test', 2); -// }); + casper.waitForSelector('.js-unit-test', function () { + test.assertElementCount('.js-unit-test', 2); + }); }); }); }) diff --git a/server/sonar-web/src/main/js/third-party/jquery.mockjax.js b/server/sonar-web/src/main/js/third-party/jquery.mockjax.js index 75eb9e5f171..b8e13145e40 100644 --- a/server/sonar-web/src/main/js/third-party/jquery.mockjax.js +++ b/server/sonar-web/src/main/js/third-party/jquery.mockjax.js @@ -431,8 +431,6 @@ origSettings.url = url; } - console.log('!!! AJAX REQUEST', origSettings.url); - // Extend the original settings for the request requestSettings = $.extend(true, {}, $.ajaxSettings, origSettings); |