aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/test/js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-03-11 16:18:03 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-03-11 16:18:03 +0100
commit53eb6da9f490cf449b79965c0e88a797fcae8ae1 (patch)
treecfb435acbea32c3b69fbcf17febc6d8c486ea58c /server/sonar-web/src/test/js
parent15d13dc7d2c4bbe0943a6972e5c102277637e855 (diff)
downloadsonarqube-53eb6da9f490cf449b79965c0e88a797fcae8ae1.tar.gz
sonarqube-53eb6da9f490cf449b79965c0e88a797fcae8ae1.zip
move l10n mock to the express
Diffstat (limited to 'server/sonar-web/src/test/js')
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-active-severity-facet.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-available-since.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-inheritance-facet.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-no-available-profiles-for-activation.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-quality-profile-facet.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-query-facet.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-rule-should-have-permalink.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-should-activate-profile.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-should-create-custom-rules.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-should-create-manual-rules.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-should-delete-custom-rules.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-should-delete-manual-rules.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-should-show-custom-rules.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-should-show-deprecated-label.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-should-show-details.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-should-show-empty-list.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-should-show-facets.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-should-show-rule-issues.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-should-show-rule.js2
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-should-show-rules.js2
-rw-r--r--server/sonar-web/src/test/js/design-spec.js4
-rw-r--r--server/sonar-web/src/test/js/global-issue-filter-widget.js30
-rw-r--r--server/sonar-web/src/test/js/issues-page-should-open-issue-permalink.js2
-rw-r--r--server/sonar-web/src/test/js/issues-page-spec.js14
-rw-r--r--server/sonar-web/src/test/js/project-issue-filter-widget.js8
-rw-r--r--server/sonar-web/src/test/js/quality-gates-spec.js2
-rw-r--r--server/sonar-web/src/test/js/source-viewer-coverage.js2
-rw-r--r--server/sonar-web/src/test/js/source-viewer-create-manual-issue.js2
-rw-r--r--server/sonar-web/src/test/js/source-viewer-duplications.js2
-rw-r--r--server/sonar-web/src/test/js/source-viewer-favorite-spec.js4
-rw-r--r--server/sonar-web/src/test/js/source-viewer-link-to-raw-spec.js.disabled2
-rw-r--r--server/sonar-web/src/test/js/source-viewer-scm.js2
-rw-r--r--server/sonar-web/src/test/js/source-viewer-should-not-show-source-if-no-permission.js2
-rw-r--r--server/sonar-web/src/test/js/source-viewer-should-open-in-new-window-with-line.js.disabled2
-rw-r--r--server/sonar-web/src/test/js/source-viewer-should-open-in-new-window.js.disabled2
-rw-r--r--server/sonar-web/src/test/js/source-viewer-spec.js6
36 files changed, 63 insertions, 63 deletions
diff --git a/server/sonar-web/src/test/js/coding-rules-page-active-severity-facet.js b/server/sonar-web/src/test/js/coding-rules-page-active-severity-facet.js
index a0a1e371875..dedfcfb425d 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-active-severity-facet.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-active-severity-facet.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-active-severity-facet', 7, function (test)
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search-BLOCKER.json', { data: { active_severities: 'BLOCKER' } });
lib.mockRequestFromFile('/api/rules/search', 'search-qprofile.json',
diff --git a/server/sonar-web/src/test/js/coding-rules-page-available-since.js b/server/sonar-web/src/test/js/coding-rules-page-available-since.js
index e55b457d214..1937b61efc1 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-available-since.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-available-since.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-available-since', 2, function (test) {
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search-limited.json',
{ data: { available_since: '2014-12-01' } });
diff --git a/server/sonar-web/src/test/js/coding-rules-page-inheritance-facet.js b/server/sonar-web/src/test/js/coding-rules-page-inheritance-facet.js
index 64cb89a71ef..3b0375a7cf8 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-inheritance-facet.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-inheritance-facet.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-inheritance-facet', 11, function (test) {
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search-not-inherited.json', { data: { inheritance: 'NONE' } });
lib.mockRequestFromFile('/api/rules/search', 'search-inherited.json', { data: { inheritance: 'INHERITED' } });
diff --git a/server/sonar-web/src/test/js/coding-rules-page-no-available-profiles-for-activation.js b/server/sonar-web/src/test/js/coding-rules-page-no-available-profiles-for-activation.js
index 08c4eda1587..2a7b84ab6bd 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-no-available-profiles-for-activation.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-no-available-profiles-for-activation.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-no-available-profiles-for-activation', 2, f
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search.json');
lib.mockRequestFromFile('/api/rules/show', 'show.json');
diff --git a/server/sonar-web/src/test/js/coding-rules-page-quality-profile-facet.js b/server/sonar-web/src/test/js/coding-rules-page-quality-profile-facet.js
index 3d2d55ac40d..f3cb4c893da 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-quality-profile-facet.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-quality-profile-facet.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-quality-profile-facet', 6, function (test)
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search-qprofile-active.json',
{ data: { activation: true } });
diff --git a/server/sonar-web/src/test/js/coding-rules-page-query-facet.js b/server/sonar-web/src/test/js/coding-rules-page-query-facet.js
index e64cf5db6ef..ac99d92b38b 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-query-facet.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-query-facet.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-query-facet', 3, function (test) {
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search-query.json', { data: { q: 'query' } });
lib.mockRequestFromFile('/api/rules/search', 'search.json');
diff --git a/server/sonar-web/src/test/js/coding-rules-page-rule-should-have-permalink.js b/server/sonar-web/src/test/js/coding-rules-page-rule-should-have-permalink.js
index 38da7b7afa2..053050f5414 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-rule-should-have-permalink.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-rule-should-have-permalink.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-rule-permalink', 1, function (test) {
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search.json');
lib.mockRequestFromFile('/api/rules/show', 'show.json');
diff --git a/server/sonar-web/src/test/js/coding-rules-page-should-activate-profile.js b/server/sonar-web/src/test/js/coding-rules-page-should-activate-profile.js
index e354b98f60f..7366ff7353b 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-should-activate-profile.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-should-activate-profile.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-should-activate-profile', 5, function (test
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search.json');
this.showMock = lib.mockRequestFromFile('/api/rules/show', 'show.json');
diff --git a/server/sonar-web/src/test/js/coding-rules-page-should-create-custom-rules.js b/server/sonar-web/src/test/js/coding-rules-page-should-create-custom-rules.js
index fac972fa626..7bd701ed79d 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-should-create-custom-rules.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-should-create-custom-rules.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-should-delete-create-rules', 2, function (t
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
this.customRulesSearchMock = lib.mockRequestFromFile('/api/rules/search', 'search-custom-rules.json',
{ data: { template_key: 'squid:ArchitecturalConstraint' } });
diff --git a/server/sonar-web/src/test/js/coding-rules-page-should-create-manual-rules.js b/server/sonar-web/src/test/js/coding-rules-page-should-create-manual-rules.js
index f6322fe0fc6..59ccd2ea739 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-should-create-manual-rules.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-should-create-manual-rules.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-should-delete-manual-rules', 3, function (t
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search.json');
lib.mockRequestFromFile('/api/rules/create', 'show.json');
diff --git a/server/sonar-web/src/test/js/coding-rules-page-should-delete-custom-rules.js b/server/sonar-web/src/test/js/coding-rules-page-should-delete-custom-rules.js
index 623c36e2961..af6e27d8c3f 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-should-delete-custom-rules.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-should-delete-custom-rules.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-should-delete-custom-rules', 2, function (t
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search-custom-rules.json',
{ data: { template_key: 'squid:ArchitecturalConstraint' } });
diff --git a/server/sonar-web/src/test/js/coding-rules-page-should-delete-manual-rules.js b/server/sonar-web/src/test/js/coding-rules-page-should-delete-manual-rules.js
index c4b590bec84..0202f2336c5 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-should-delete-manual-rules.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-should-delete-manual-rules.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-should-delete-manual-rules', 1, function (t
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
this.searchMock = lib.mockRequestFromFile('/api/rules/search', 'search-before.json');
lib.mockRequestFromFile('/api/rules/show', 'show.json');
diff --git a/server/sonar-web/src/test/js/coding-rules-page-should-show-custom-rules.js b/server/sonar-web/src/test/js/coding-rules-page-should-show-custom-rules.js
index bcf5d43980a..b27a269582c 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-should-show-custom-rules.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-should-show-custom-rules.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-should-show-custom-rules', 3, function (tes
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search-custom-rules.json',
{ data: { template_key: 'squid:ArchitecturalConstraint' } });
diff --git a/server/sonar-web/src/test/js/coding-rules-page-should-show-deprecated-label.js b/server/sonar-web/src/test/js/coding-rules-page-should-show-deprecated-label.js
index 7c57c1a14dd..8bc7238a938 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-should-show-deprecated-label.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-should-show-deprecated-label.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-should-show-deprecated-label', 1, function
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search.json');
})
diff --git a/server/sonar-web/src/test/js/coding-rules-page-should-show-details.js b/server/sonar-web/src/test/js/coding-rules-page-should-show-details.js
index 49bac8b4d6c..482f230d07d 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-should-show-details.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-should-show-details.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-should-show-details', 20, function (test) {
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search.json');
lib.mockRequestFromFile('/api/rules/show', 'show.json');
diff --git a/server/sonar-web/src/test/js/coding-rules-page-should-show-empty-list.js b/server/sonar-web/src/test/js/coding-rules-page-should-show-empty-list.js
index d918aa6d9d4..1ce3e5bcce2 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-should-show-empty-list.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-should-show-empty-list.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-should-show-empty-list', 3, function (test)
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search.json');
})
diff --git a/server/sonar-web/src/test/js/coding-rules-page-should-show-facets.js b/server/sonar-web/src/test/js/coding-rules-page-should-show-facets.js
index 5f8b5a782b2..9d6107e7256 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-should-show-facets.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-should-show-facets.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-should-show-facets', 1, function (test) {
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search.json');
})
diff --git a/server/sonar-web/src/test/js/coding-rules-page-should-show-rule-issues.js b/server/sonar-web/src/test/js/coding-rules-page-should-show-rule-issues.js
index aa6474fd629..ade1fda3193 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-should-show-rule-issues.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-should-show-rule-issues.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-should-show-rule-issues', 5, function (test
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search.json');
lib.mockRequestFromFile('/api/rules/show', 'show.json');
diff --git a/server/sonar-web/src/test/js/coding-rules-page-should-show-rule.js b/server/sonar-web/src/test/js/coding-rules-page-should-show-rule.js
index 1b3ab387566..651f5fb8249 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-should-show-rule.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-should-show-rule.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-should-show-rule', 7, function (test) {
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search.json');
})
diff --git a/server/sonar-web/src/test/js/coding-rules-page-should-show-rules.js b/server/sonar-web/src/test/js/coding-rules-page-should-show-rules.js
index cde137ac09a..29ff240cd47 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-should-show-rules.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-should-show-rules.js
@@ -31,7 +31,7 @@ casper.test.begin('coding-rules-page-should-show-rules', 4, function (test) {
.start(lib.buildUrl('coding-rules'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/rules/app', 'app.json');
lib.mockRequestFromFile('/api/rules/search', 'search.json');
})
diff --git a/server/sonar-web/src/test/js/design-spec.js b/server/sonar-web/src/test/js/design-spec.js
index 7a86882d28c..2b5ac8a33f7 100644
--- a/server/sonar-web/src/test/js/design-spec.js
+++ b/server/sonar-web/src/test/js/design-spec.js
@@ -30,7 +30,7 @@ casper.test.begin(testName('Base'), 9, function (test) {
casper
.start(lib.buildUrl('design'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/resources', 'resources.json');
lib.mockRequestFromFile('/api/dependencies', 'dependencies.json');
})
@@ -75,7 +75,7 @@ casper.test.begin(testName('Highlight'), 13, function (test) {
casper
.start(lib.buildUrl('design'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/resources', 'resources.json');
lib.mockRequestFromFile('/api/dependencies', 'dependencies.json');
})
diff --git a/server/sonar-web/src/test/js/global-issue-filter-widget.js b/server/sonar-web/src/test/js/global-issue-filter-widget.js
index 128006d6041..90f7c808bc8 100644
--- a/server/sonar-web/src/test/js/global-issue-filter-widget.js
+++ b/server/sonar-web/src/test/js/global-issue-filter-widget.js
@@ -33,7 +33,7 @@ casper.test.begin(testName('Unresolved Issues By Severity'), 13, function (test)
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'unresolved-issues-by-severity.json',
{ data: { resolved: 'false' } });
})
@@ -92,7 +92,7 @@ casper.test.begin(testName('Red Issues By Severity'), 9, function (test) {
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'red-issues-by-severity.json',
{ data: { resolved: 'false', severities: 'BLOCKER,CRITICAL,MAJOR' } });
})
@@ -147,7 +147,7 @@ casper.test.begin(testName('All Issues By Status'), 9, function (test) {
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'all-issues-by-status.json');
})
@@ -201,7 +201,7 @@ casper.test.begin(testName('All Issues By Resolution'), 10, function (test) {
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'all-issues-by-resolution.json');
})
@@ -256,7 +256,7 @@ casper.test.begin(testName('Unresolved Issues By Resolution'), 5, function (test
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'unresolved-issues-by-resolution.json',
{ data: { resolved: 'false' } });
})
@@ -307,7 +307,7 @@ casper.test.begin(testName('Unresolved Issues By Rule'), 15, function (test) {
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'unresolved-issues-by-rule.json',
{ data: { resolved: 'false' } });
})
@@ -370,7 +370,7 @@ casper.test.begin(testName('Unresolved Issues By Project'), 15, function (test)
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'unresolved-issues-by-project.json',
{ data: { resolved: 'false' } });
})
@@ -433,7 +433,7 @@ casper.test.begin(testName('Unresolved Issues By Assignee'), 15, function (test)
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'unresolved-issues-by-assignee.json',
{ data: { resolved: 'false' } });
})
@@ -496,7 +496,7 @@ casper.test.begin(testName('Unresolved Unassigned Issues By Assignee'), 6, funct
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'unresolved-unassigned-issues-by-assignee.json',
{ data: { resolved: 'false', assigned: 'false' } });
})
@@ -550,7 +550,7 @@ casper.test.begin(testName('Unresolved Issues By Reporter'), 12, function (test)
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'unresolved-issues-by-reporter.json',
{ data: { resolved: 'false' } });
})
@@ -610,7 +610,7 @@ casper.test.begin(testName('Unresolved Issues By Language'), 15, function (test)
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'unresolved-issues-by-language.json',
{ data: { resolved: 'false' } });
})
@@ -673,7 +673,7 @@ casper.test.begin(testName('Unresolved Issues By Action Plan'), 15, function (te
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'unresolved-issues-by-action-plan.json',
{ data: { resolved: 'false' } });
})
@@ -736,7 +736,7 @@ casper.test.begin(testName('Unresolved Unplanned Issues By Action Plan'), 6, fun
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'unresolved-unplanned-issues-by-action-plan.json',
{ data: { resolved: 'false', planned: 'false' } });
})
@@ -790,7 +790,7 @@ casper.test.begin(testName('Unresolved Issues By Date'), 18, function (test) {
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'unresolved-issues-by-date.json',
{ data: { resolved: 'false' } });
})
@@ -858,7 +858,7 @@ casper.test.begin(testName('Unresolved Issues on a Limited Period By Date'), 12,
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'unresolved-issues-by-date-limited.json',
{ data: { resolved: 'false', createdAfter: '2015-02-16', createdBefore: '2015-02-18' } });
})
diff --git a/server/sonar-web/src/test/js/issues-page-should-open-issue-permalink.js b/server/sonar-web/src/test/js/issues-page-should-open-issue-permalink.js
index 64b10e69251..c7441f27507 100644
--- a/server/sonar-web/src/test/js/issues-page-should-open-issue-permalink.js
+++ b/server/sonar-web/src/test/js/issues-page-should-open-issue-permalink.js
@@ -35,7 +35,7 @@ casper.test.begin('issues-page-should-open-issue-permalink', 3, function (test)
.start(lib.buildUrl('issues#issues=' + encodeURI(issueKey)), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issue_filters/app', 'app.json');
lib.mockRequest('/api/issues/search', '{}', { data: { issues: issueKey, p: 2 } });
lib.mockRequestFromFile('/api/issues/search', 'search.json', { data: { issues: issueKey } });
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 f21069aa529..4336855542c 100644
--- a/server/sonar-web/src/test/js/issues-page-spec.js
+++ b/server/sonar-web/src/test/js/issues-page-spec.js
@@ -33,7 +33,7 @@ casper.test.begin(testName('Base'), function (test) {
.start(lib.buildUrl('issues'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issue_filters/app', 'app.json');
lib.mockRequestFromFile('/api/issues/search', 'search.json');
})
@@ -91,7 +91,7 @@ casper.test.begin(testName('Issue Box', 'Check Elements'), function (test) {
.start(lib.buildUrl('issues'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issue_filters/app', 'app.json');
lib.mockRequestFromFile('/api/issues/search', 'search.json');
})
@@ -133,7 +133,7 @@ casper.test.begin(testName('Issue Box', 'Tags'), function (test) {
.start(lib.buildUrl('issues'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issue_filters/app', 'app.json');
lib.mockRequestFromFile('/api/issues/search', 'search-with-tags.json');
lib.mockRequestFromFile('/api/issues/tags', 'tags.json');
@@ -178,7 +178,7 @@ casper.test.begin(testName('Issue Box', 'Transitions'), function (test) {
.start(lib.buildUrl('issues'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issue_filters/app', 'app.json');
lib.mockRequestFromFile('/api/issues/search', 'search.json');
lib.mockRequestFromFile('/api/issues/show*', 'show.json');
@@ -218,7 +218,7 @@ casper.test.begin(testName('File-Level Issues'), function (test) {
.start(lib.buildUrl('issues'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issue_filters/app', 'app.json');
lib.mockRequestFromFile('/api/issues/search', 'file-level/search.json');
lib.mockRequestFromFile('/api/components/app', 'file-level/components-app.json');
@@ -252,7 +252,7 @@ casper.test.begin(testName('Severity Facet'), function (test) {
.start(lib.buildUrl('issues'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issue_filters/app', 'app.json');
lib.mockRequestFromFile('/api/issues/search', 'search-reopened.json', { data: { severities: 'BLOCKER' } });
lib.mockRequestFromFile('/api/issues/search', 'search.json');
@@ -285,7 +285,7 @@ casper.test.begin(testName('Bulk Change'), function (test) {
.start(lib.buildUrl('issues'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issue_filters/app', 'app.json');
lib.mockRequestFromFile('/api/issues/search', 'search.json');
lib.mockRequest('/issues/bulk_change_form?resolved=false',
diff --git a/server/sonar-web/src/test/js/project-issue-filter-widget.js b/server/sonar-web/src/test/js/project-issue-filter-widget.js
index 6b7a1a30116..c99becfbfd7 100644
--- a/server/sonar-web/src/test/js/project-issue-filter-widget.js
+++ b/server/sonar-web/src/test/js/project-issue-filter-widget.js
@@ -33,7 +33,7 @@ casper.test.begin(testName('Unresolved Issues By Severity'), 13, function (test)
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'unresolved-issues-by-severity.json',
{ data: { resolved: 'false' } });
})
@@ -94,7 +94,7 @@ casper.test.begin(testName('Unresolved Issues By Date'), 18, function (test) {
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'unresolved-issues-by-date.json',
{ data: { resolved: 'false' } });
})
@@ -164,7 +164,7 @@ casper.test.begin(testName('Unresolved Issues By Severity With Differential Peri
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search', 'unresolved-issues-by-severity-with-differential-period.json',
{ data: { resolved: 'false', createdAfter: '2014-12-09T17:12:38+0100' } });
})
@@ -226,7 +226,7 @@ casper.test.begin(testName('Unresolved Issues By Severity With IGNORED Different
.start(lib.buildUrl('issue-filter-widget'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/issues/search',
'unresolved-issues-by-severity-with-IGNORED-differential-period.json',
{ data: { resolved: 'false', createdInLast: '1w' } });
diff --git a/server/sonar-web/src/test/js/quality-gates-spec.js b/server/sonar-web/src/test/js/quality-gates-spec.js
index 2b2c7ef8ac2..a16eaaec80f 100644
--- a/server/sonar-web/src/test/js/quality-gates-spec.js
+++ b/server/sonar-web/src/test/js/quality-gates-spec.js
@@ -31,7 +31,7 @@ casper.test.begin('Quality Gates', function suite (test) {
.start(lib.buildUrl('quality-gates'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/qualitygates/app', 'app.json');
lib.mockRequestFromFile('/api/qualitygates/list', 'list.json');
lib.mockRequestFromFile('/api/qualitygates/show?id=1', 'show.json');
diff --git a/server/sonar-web/src/test/js/source-viewer-coverage.js b/server/sonar-web/src/test/js/source-viewer-coverage.js
index 434300129f3..3e5ad079989 100644
--- a/server/sonar-web/src/test/js/source-viewer-coverage.js
+++ b/server/sonar-web/src/test/js/source-viewer-coverage.js
@@ -33,7 +33,7 @@ casper.test.begin(testName('Coverage'), 4, function (test) {
.start(lib.buildUrl('source-viewer'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/components/app', 'app.json');
lib.mockRequestFromFile('/api/sources/lines', 'lines.json');
lib.mockRequestFromFile('/api/issues/search', 'issues.json');
diff --git a/server/sonar-web/src/test/js/source-viewer-create-manual-issue.js b/server/sonar-web/src/test/js/source-viewer-create-manual-issue.js
index 2cc0a798b83..985c2c18ba3 100644
--- a/server/sonar-web/src/test/js/source-viewer-create-manual-issue.js
+++ b/server/sonar-web/src/test/js/source-viewer-create-manual-issue.js
@@ -32,7 +32,7 @@ casper.test.begin(testName('source-viewer-create-manual-issue'), function (test)
.start(lib.buildUrl('source-viewer'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/components/app', 'app.json');
lib.mockRequestFromFile('/api/sources/lines', 'lines.json');
lib.mockRequestFromFile('/api/issues/search', 'issues.json');
diff --git a/server/sonar-web/src/test/js/source-viewer-duplications.js b/server/sonar-web/src/test/js/source-viewer-duplications.js
index bff158991b5..5acf7e5ab7c 100644
--- a/server/sonar-web/src/test/js/source-viewer-duplications.js
+++ b/server/sonar-web/src/test/js/source-viewer-duplications.js
@@ -33,7 +33,7 @@ casper.test.begin(testName('Duplications'), 4, function (test) {
.start(lib.buildUrl('source-viewer'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/components/app', 'app.json');
lib.mockRequestFromFile('/api/sources/lines', 'lines.json');
lib.mockRequestFromFile('/api/issues/search', 'issues.json');
diff --git a/server/sonar-web/src/test/js/source-viewer-favorite-spec.js b/server/sonar-web/src/test/js/source-viewer-favorite-spec.js
index 91eeedc5952..c215986ee80 100644
--- a/server/sonar-web/src/test/js/source-viewer-favorite-spec.js
+++ b/server/sonar-web/src/test/js/source-viewer-favorite-spec.js
@@ -31,7 +31,7 @@ casper.test.begin(testName('Mark as Favorite'), function (test) {
casper
.start(lib.buildUrl('source-viewer'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequest('/api/favourites', '{}', { type: 'POST' });
lib.mockRequest('/api/favourites/*', '{}', { type: 'DELETE' });
lib.mockRequestFromFile('/api/components/app', 'app.json');
@@ -70,7 +70,7 @@ casper.test.begin(testName('Don\'t Show Favorite If Not Logged In'), function (t
casper
.start(lib.buildUrl('source-viewer'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/components/app', 'app-not-logged-in.json');
lib.mockRequestFromFile('/api/sources/lines', 'lines.json');
lib.mockRequestFromFile('/api/issues/search', 'issues.json');
diff --git a/server/sonar-web/src/test/js/source-viewer-link-to-raw-spec.js.disabled b/server/sonar-web/src/test/js/source-viewer-link-to-raw-spec.js.disabled
index 8942a7cffc5..dc385f48bd0 100644
--- a/server/sonar-web/src/test/js/source-viewer-link-to-raw-spec.js.disabled
+++ b/server/sonar-web/src/test/js/source-viewer-link-to-raw-spec.js.disabled
@@ -31,7 +31,7 @@ casper.test.begin(testName('Link to Raw'), function (test) {
casper
.start(lib.buildUrl('source-viewer'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/components/app', 'app.json');
lib.mockRequestFromFile('/api/sources/lines', 'lines.json');
lib.mockRequestFromFile('/api/issues/search', 'issues.json');
diff --git a/server/sonar-web/src/test/js/source-viewer-scm.js b/server/sonar-web/src/test/js/source-viewer-scm.js
index abf5102cf46..1bfd21d8ea5 100644
--- a/server/sonar-web/src/test/js/source-viewer-scm.js
+++ b/server/sonar-web/src/test/js/source-viewer-scm.js
@@ -33,7 +33,7 @@ casper.test.begin(testName('SCM'), 4, function (test) {
.start(lib.buildUrl('source-viewer'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/components/app', 'app.json');
lib.mockRequestFromFile('/api/sources/lines', 'lines.json');
lib.mockRequestFromFile('/api/issues/search', 'issues.json');
diff --git a/server/sonar-web/src/test/js/source-viewer-should-not-show-source-if-no-permission.js b/server/sonar-web/src/test/js/source-viewer-should-not-show-source-if-no-permission.js
index fb0301370b0..d9969be5b86 100644
--- a/server/sonar-web/src/test/js/source-viewer-should-not-show-source-if-no-permission.js
+++ b/server/sonar-web/src/test/js/source-viewer-should-not-show-source-if-no-permission.js
@@ -32,7 +32,7 @@ casper.test.begin(testName('source-viewer-should-not-show-source-if-no-permissio
.start(lib.buildUrl('source-viewer'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/components/app', 'api-components-app.json');
lib.mockRequest('/api/sources/lines', '{}', { status: 403 });
lib.mockRequestFromFile('/api/issues/search', 'api-issues-search.json');
diff --git a/server/sonar-web/src/test/js/source-viewer-should-open-in-new-window-with-line.js.disabled b/server/sonar-web/src/test/js/source-viewer-should-open-in-new-window-with-line.js.disabled
index f1c622890fa..1a5b0776bca 100644
--- a/server/sonar-web/src/test/js/source-viewer-should-open-in-new-window-with-line.js.disabled
+++ b/server/sonar-web/src/test/js/source-viewer-should-open-in-new-window-with-line.js.disabled
@@ -32,7 +32,7 @@ casper.test.begin(testName('source-viewer-should-open-in-new-window-with-line'),
.start(lib.buildUrl('source-viewer'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/components/app', 'api-components-app.json');
lib.mockRequestFromFile('/api/sources/lines', 'api-sources-lines.json');
lib.mockRequestFromFile('/api/issues/search', 'api-issues-search.json');
diff --git a/server/sonar-web/src/test/js/source-viewer-should-open-in-new-window.js.disabled b/server/sonar-web/src/test/js/source-viewer-should-open-in-new-window.js.disabled
index 200932f5f22..5603ee3ec33 100644
--- a/server/sonar-web/src/test/js/source-viewer-should-open-in-new-window.js.disabled
+++ b/server/sonar-web/src/test/js/source-viewer-should-open-in-new-window.js.disabled
@@ -32,7 +32,7 @@ casper.test.begin(testName('source-viewer-should-open-in-new-window'), function
.start(lib.buildUrl('source-viewer'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/components/app', 'api-components-app.json');
lib.mockRequestFromFile('/api/sources/lines', 'api-sources-lines.json');
lib.mockRequestFromFile('/api/issues/search', 'api-issues-search.json');
diff --git a/server/sonar-web/src/test/js/source-viewer-spec.js b/server/sonar-web/src/test/js/source-viewer-spec.js
index 7adcee1a280..813df75f2a5 100644
--- a/server/sonar-web/src/test/js/source-viewer-spec.js
+++ b/server/sonar-web/src/test/js/source-viewer-spec.js
@@ -33,7 +33,7 @@ casper.test.begin(testName('Base'), function (test) {
.start(lib.buildUrl('source-viewer'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/components/app', 'app.json');
lib.mockRequestFromFile('/api/sources/lines', 'lines.json');
lib.mockRequestFromFile('/api/issues/search', 'issues.json');
@@ -80,7 +80,7 @@ casper.test.begin(testName('Decoration'), function (test) {
.start(lib.buildUrl('source-viewer'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/components/app', 'app.json');
lib.mockRequestFromFile('/api/sources/lines', 'lines.json');
lib.mockRequestFromFile('/api/issues/search', 'issues.json');
@@ -129,7 +129,7 @@ casper.test.begin(testName('Test File'), function (test) {
.start(lib.buildUrl('source-viewer'), function () {
lib.setDefaultViewport();
- lib.mockRequest('/api/l10n/index', '{}');
+
lib.mockRequestFromFile('/api/components/app', 'tests/app.json');
lib.mockRequestFromFile('/api/sources/lines', 'tests/lines.json');
lib.mockRequestFromFile('/api/issues/search', 'issues.json');