diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-06-18 17:14:53 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-06-18 17:15:01 +0200 |
commit | e47452272a8c84fcdf80949c8056e3c7c15969f5 (patch) | |
tree | 2327c160474987b759bb5fe20028cde284abccb1 | |
parent | b2aa8d6fe62481fc68a710cb2e767d174474752f (diff) | |
download | sonarqube-e47452272a8c84fcdf80949c8056e3c7c15969f5.tar.gz sonarqube-e47452272a8c84fcdf80949c8056e3c7c15969f5.zip |
make bootstrappers of js apps more consistent
39 files changed, 259 insertions, 278 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/api_documentation/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/api_documentation/index.html.erb index 7bfd62ed9f8..2424c7032bc 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/api_documentation/index.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/api_documentation/index.html.erb @@ -1,6 +1,7 @@ -<div id="api-documentation" class="search-navigator sticky"></div> -<script> - require(['apps/api-documentation/app'], function (App) { - App.start({ el: '#api-documentation' }); - }); -</script> +<% content_for :extra_script do %> + <script> + require(['apps/api-documentation/app'], function (App) { + App.start({ el: '#content' }); + }); + </script> +<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/coding_rules/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/coding_rules/index.html.erb index 0f07b74d78a..c520f46993c 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/coding_rules/index.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/coding_rules/index.html.erb @@ -1,6 +1,7 @@ -<% content_for :script do %> - <script>require(['apps/coding-rules/app']);</script> -<% end %> - - <div class="coding-rules search-navigator"></div> + +<% content_for :extra_script do %> + <script> + require(['apps/coding-rules/app']); + </script> +<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb index 9e5e7efc3db..d23d96e68c2 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb @@ -1,16 +1,18 @@ -<% content_for :script do %> - <script>require(['apps/source-viewer/app']);</script> -<% end %> - <div class="page"> <div id="source-viewer"></div> </div> -<script type="text/javascript"> - window.file = { - uuid: '<%= @resource.uuid -%>', - key: '<%= @resource.key -%>' - }; - document.querySelector('.navbar-context').remove(); - jQuery('.page-wrapper-context').addClass('page-wrapper-global').removeClass('page-wrapper-context'); -</script> +<% content_for :extra_script do %> + <script type="text/javascript"> + window.file = { + uuid: '<%= @resource.uuid -%>', + key: '<%= @resource.key -%>' + }; + document.querySelector('.navbar-context').remove(); + jQuery('.page-wrapper-context').addClass('page-wrapper-global').removeClass('page-wrapper-context'); + </script> + + <script> + require(['apps/source-viewer/app']); + </script> +<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb index a074dfb2ae1..a5dfbc1bcb3 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb @@ -1,7 +1,3 @@ -<% content_for :script do %> - <script>require(['apps/drilldown/app']);</script> -<% end %> - <div class="page"> <% if params[:period] && @snapshot.project_snapshot.periods? %> <div id="snapshot_title" class="spacer-bottom"> @@ -18,7 +14,7 @@ <% end %> </select> <script> - $j(function() { + $j(function () { $j('#select-comparison').select2({ width: '300px', minimumResultsForSearch: 10, @@ -52,7 +48,7 @@ </div> <% unless @drilldown.columns.size > 0 %> - <div class="alert alert-info"><%= h message('drilldown.no_items_found') -%></div> + <div class="alert alert-info"><%= h message('drilldown.no_items_found') -%></div> <% end %> <div id="drilldown" class="width100"> @@ -112,13 +108,13 @@ last_column = column end %> - <% if last_column && @drilldown.selected_project_not_authorized %> - <p class="notes"><%= message('not_authorized_to_access_project', {:params => last_column.selected_snapshot.project.name}) -%></p> - <% end %> + <% if last_column && @drilldown.selected_project_not_authorized %> + <p class="notes"><%= message('not_authorized_to_access_project', {:params => last_column.selected_snapshot.project.name}) -%></p> + <% end %> </div> <script> <% for i in 0...@drilldown.columns.size do %> - $j('#col_<%= i -%> tr.selected').each(function (index,item) { + $j('#col_<%= i -%> tr.selected').each(function (index, item) { item.scrollIntoView(true); }); <% end %> @@ -136,3 +132,9 @@ <%= render :partial => 'footer' -%> </div> + +<% content_for :extra_script do %> + <script> + require(['apps/drilldown/app']); + </script> +<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/groups/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/groups/index.html.erb index fedf3bd424c..ecf82ae97bb 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/groups/index.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/groups/index.html.erb @@ -1,6 +1,7 @@ -<div id="groups"></div> -<script> - require(['apps/groups/app'], function (App) { - App.start({ el: '#groups' }); - }); -</script> +<% content_for :extra_script do %> + <script> + require(['apps/groups/app'], function (App) { + App.start({ el: '#content' }); + }); + </script> +<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/search.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/search.html.erb index e3fc653252b..66fb3c06168 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/search.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/search.html.erb @@ -1,5 +1,7 @@ -<% content_for :script do %> - <script>require(['apps/issues/app-new']);</script> -<% end %> - <div class="issues search-navigator"></div> + +<% content_for :extra_script do %> + <script> + require(['apps/issues/app-new']); + </script> +<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb index 7b751817531..2aebff7bcda 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb @@ -8,10 +8,15 @@ </div> <!--<![endif]--> +<% if flash[:notice] || flash[:warning] || flash[:error] %> + <script> + <% if flash[:notice] %>info('<%= h escape_javascript(flash[:notice])-%>');<% end %> + <% if flash[:warning] %>warning('<%= h escape_javascript(flash[:warning])-%>');<% end %> + <% if flash[:error] %>error('<%= h escape_javascript(flash[:error])-%>');<% end %> + </script> +<% end %> -</body><script> -<% if flash[:notice] %>info('<%= h escape_javascript(flash[:notice])-%>');<% end %> -<% if flash[:warning] %>warning('<%= h escape_javascript(flash[:warning])-%>');<% end %> -<% if flash[:error] %>error('<%= h escape_javascript(flash[:error])-%>');<% end %> -</script> +<%= yield :extra_script -%> + +</body> </html> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/maintenance/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/maintenance/index.html.erb index fd604b7694f..19d88d4c4f6 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/maintenance/index.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/maintenance/index.html.erb @@ -1,8 +1,8 @@ -<div id="maintenance"></div> - -<script> - require(['apps/maintenance/app'], function (App) { - App.start({ el: '#maintenance', setup: false }); - }); -</script> +<% content_for :extra_script do %> + <script> + require(['apps/maintenance/app'], function (App) { + App.start({ el: '#content', setup: false }); + }); + </script> +<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/search.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/search.html.erb index 6d112e7e909..c5ae501edc9 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/search.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/search.html.erb @@ -1,8 +1,3 @@ -<% content_for :script do %> - <script>require(['apps/measures/app']);</script> -<% end %> - - <div class="page"> <header class="page-header"> <%= render :partial => 'search_header' -%> @@ -48,84 +43,89 @@ </script> - -<script> - jQuery('html').addClass('navigator-page measures-page'); - - window.SS = typeof window.SS === 'object' ? window.SS : {}; - - _.extend(window.SS, { - qualifiers: <%= render :partial => 'measures/qualifiers' -%>, - <% condition_metrics = Metric.all.select { |m| m.numeric? && !m.hidden } %> - metrics: <%= condition_metrics.to_json -%>, - metricPeriods: { - '1': '<%= Api::Utils.period_label(1) -%>', - '2': '<%= Api::Utils.period_label(2) -%>', - '3': '<%= Api::Utils.period_label(3) -%>' - }, - favorites: <%= render :partial => 'measures/favourites2' -%>, - workDuration: { - days: '<%= message('work_duration.x_days') -%>', - hours: '<%= message('work_duration.x_hours') -%>', - minutes: '<%= message('work_duration.x_minutes') -%>' - }, - - phrases: { - 'any': '<%= escape_javascript message('any') -%>', - 'anytime': '<%= escape_javascript message('anytime') -%>', - 'all': '<%= escape_javascript message('all') -%>', - 'manage': '<%= escape_javascript message('manage') -%>', - 'to': '<%= escape_javascript message('to.downcase') -%>', - 'value': '<%= escape_javascript message('value') -%>', - 'components': '<%= escape_javascript message('measure_filter.criteria.components') -%>', - 'age': '<%= escape_javascript message('measure_filter.criteria.age') -%>', - 'alert': '<%= escape_javascript message('measure_filter.criteria.alert') -%>', - 'componentsOf': '<%= escape_javascript message('measure_filter.criteria.components_of') -%>', - 'date': '<%= escape_javascript message('measure_filter.criteria.date') -%>', - 'favoritesOnly': '<%= escape_javascript message('measure_filter.criteria.only_favorites') -%>', - 'keyContains': '<%= escape_javascript message('measure_filter.criteria.key_contains') -%>', - 'lastAnalysis': '<%= escape_javascript message('measure_filter.criteria.last_analysis') -%>', - 'metric': '<%= escape_javascript message('measure_filter.criteria.metric') -%>', - 'notSet': '<%= escape_javascript message('measure_filter.criteria.metric.not_set') -%>', - 'nameContains': '<%= escape_javascript message('measure_filter.name_contains') -%>', - 'moreCriteria': '<%= escape_javascript message('measure_filter.more_criteria') -%>', - 'error': '<%= escape_javascript message('measure_filter.criteria.alert.error') -%>', - 'warning': '<%= escape_javascript message('measure_filter.criteria.alert.warn') -%>', - 'ok': '<%= escape_javascript message('measure_filter.criteria.alert.ok') -%>', - 'days': '<%= escape_javascript message('measure_filter.criteria.age.days') -%>', - 'filtersList': '<%= escape_javascript message('measure_filter.filter_list') -%>', - - 'work_duration': { - 'x_days': '<%= escape_javascript message('work_duration.x_days') -%>', - 'x_hours': '<%= escape_javascript message('work_duration.x_hours') -%>', - 'x_minutes': '<%= escape_javascript message('work_duration.x_minutes') -%>' +<% content_for :extra_script do %> + <script> + jQuery('html').addClass('navigator-page measures-page'); + + window.SS = typeof window.SS === 'object' ? window.SS : {}; + + _.extend(window.SS, { + qualifiers: <%= render :partial => 'measures/qualifiers' -%>, + <% condition_metrics = Metric.all.select { |m| m.numeric? && !m.hidden } %> + metrics: <%= condition_metrics.to_json -%>, + metricPeriods: { + '1': '<%= Api::Utils.period_label(1) -%>', + '2': '<%= Api::Utils.period_label(2) -%>', + '3': '<%= Api::Utils.period_label(3) -%>' + }, + favorites: <%= render :partial => 'measures/favourites2' -%>, + workDuration: { + days: '<%= message('work_duration.x_days') -%>', + hours: '<%= message('work_duration.x_hours') -%>', + minutes: '<%= message('work_duration.x_minutes') -%>' + }, + + phrases: { + 'any': '<%= escape_javascript message('any') -%>', + 'anytime': '<%= escape_javascript message('anytime') -%>', + 'all': '<%= escape_javascript message('all') -%>', + 'manage': '<%= escape_javascript message('manage') -%>', + 'to': '<%= escape_javascript message('to.downcase') -%>', + 'value': '<%= escape_javascript message('value') -%>', + 'components': '<%= escape_javascript message('measure_filter.criteria.components') -%>', + 'age': '<%= escape_javascript message('measure_filter.criteria.age') -%>', + 'alert': '<%= escape_javascript message('measure_filter.criteria.alert') -%>', + 'componentsOf': '<%= escape_javascript message('measure_filter.criteria.components_of') -%>', + 'date': '<%= escape_javascript message('measure_filter.criteria.date') -%>', + 'favoritesOnly': '<%= escape_javascript message('measure_filter.criteria.only_favorites') -%>', + 'keyContains': '<%= escape_javascript message('measure_filter.criteria.key_contains') -%>', + 'lastAnalysis': '<%= escape_javascript message('measure_filter.criteria.last_analysis') -%>', + 'metric': '<%= escape_javascript message('measure_filter.criteria.metric') -%>', + 'notSet': '<%= escape_javascript message('measure_filter.criteria.metric.not_set') -%>', + 'nameContains': '<%= escape_javascript message('measure_filter.name_contains') -%>', + 'moreCriteria': '<%= escape_javascript message('measure_filter.more_criteria') -%>', + 'error': '<%= escape_javascript message('measure_filter.criteria.alert.error') -%>', + 'warning': '<%= escape_javascript message('measure_filter.criteria.alert.warn') -%>', + 'ok': '<%= escape_javascript message('measure_filter.criteria.alert.ok') -%>', + 'days': '<%= escape_javascript message('measure_filter.criteria.age.days') -%>', + 'filtersList': '<%= escape_javascript message('measure_filter.filter_list') -%>', + + 'work_duration': { + 'x_days': '<%= escape_javascript message('work_duration.x_days') -%>', + 'x_hours': '<%= escape_javascript message('work_duration.x_hours') -%>', + 'x_minutes': '<%= escape_javascript message('work_duration.x_minutes') -%>' + } } - } - }); + }); - var queryParams = [ - { key: 'qualifiers[]', value: <%= json_escape(@filter.criteria['qualifiers'].to_json) -%> }, - { key: 'alertLevels[]', value: <%= json_escape(@filter.criteria['alertLevels'].to_json) -%> }, - { key: 'fromDate', value: '<%= escape_javascript @filter.criteria['fromDate'] -%>' }, - { key: 'toDate', value: '<%= escape_javascript @filter.criteria['toDate'] -%>' }, - { key: 'ageMinDays', value: '<%= escape_javascript @filter.criteria('ageMinDays') -%>' }, - { key: 'ageMaxDays', value: '<%= escape_javascript @filter.criteria['ageMaxDays'] -%>' }, - <% if @filter.base_resource %> - { key: 'base', value: ['<%= escape_javascript @filter.base_resource.key -%>'], text: ['<%= escape_javascript @filter.base_resource.name(true) -%>'] }, - <% end %> - { key: 'onFavourites', value: <%= @filter.criteria['onFavourites']=='true' -%> }, - { key: 'keySearch', value: '<%= escape_javascript @filter.criteria['keySearch'] -%>' }, - - <% for i in 1..3 %> - <% unless @filter.criteria("c#{i}_metric").blank? %> - { key: '<%= "c#{i}_metric" -%>', value: '<%= escape_javascript @filter.criteria("c#{i}_metric") -%>' }, - { key: '<%= "c#{i}_period" -%>', value: '<%= escape_javascript @filter.criteria("c#{i}_period") -%>' }, - { key: '<%= "c#{i}_op" -%>', value: '<%= escape_javascript @filter.criteria("c#{i}_op") -%>' }, - { key: '<%= "c#{i}_val" -%>', value: '<%= escape_javascript @filter.criteria("c#{i}_val") -%>' }, + var queryParams = [ + { key: 'qualifiers[]', value: <%= json_escape(@filter.criteria['qualifiers'].to_json) -%> }, + { key: 'alertLevels[]', value: <%= json_escape(@filter.criteria['alertLevels'].to_json) -%> }, + { key: 'fromDate', value: '<%= escape_javascript @filter.criteria['fromDate'] -%>' }, + { key: 'toDate', value: '<%= escape_javascript @filter.criteria['toDate'] -%>' }, + { key: 'ageMinDays', value: '<%= escape_javascript @filter.criteria('ageMinDays') -%>' }, + { key: 'ageMaxDays', value: '<%= escape_javascript @filter.criteria['ageMaxDays'] -%>' }, + <% if @filter.base_resource %> + { key: 'base', value: ['<%= escape_javascript @filter.base_resource.key -%>'], text: ['<%= escape_javascript @filter.base_resource.name(true) -%>'] }, <% end %> - <% end %> - { key: 'nameSearch', value: '<%= escape_javascript @filter.criteria['nameSearch'] -%>' } - ]; -</script> + { key: 'onFavourites', value: <%= @filter.criteria['onFavourites']=='true' -%> }, + { key: 'keySearch', value: '<%= escape_javascript @filter.criteria['keySearch'] -%>' }, + + <% for i in 1..3 %> + <% unless @filter.criteria("c#{i}_metric").blank? %> + { key: '<%= "c#{i}_metric" -%>', value: '<%= escape_javascript @filter.criteria("c#{i}_metric") -%>' }, + { key: '<%= "c#{i}_period" -%>', value: '<%= escape_javascript @filter.criteria("c#{i}_period") -%>' }, + { key: '<%= "c#{i}_op" -%>', value: '<%= escape_javascript @filter.criteria("c#{i}_op") -%>' }, + { key: '<%= "c#{i}_val" -%>', value: '<%= escape_javascript @filter.criteria("c#{i}_val") -%>' }, + <% end %> + <% end %> + { key: 'nameSearch', value: '<%= escape_javascript @filter.criteria['nameSearch'] -%>' } + ]; + </script> + + <script> + require(['apps/measures/app']); + </script> +<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb index 5a130df09d7..a4c68b18805 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb @@ -1,6 +1,7 @@ -<div id="metrics"></div> -<script> - require(['apps/metrics/app'], function (App) { - App.start({ el: '#metrics' }); - }); -</script> +<% content_for :extra_script do %> + <script> + require(['apps/metrics/app'], function (App) { + App.start({ el: '#content' }); + }); + </script> +<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb index da8d581d78a..371d2b45735 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb @@ -1,5 +1,7 @@ -<% content_for :script do %> - <script>require(['apps/quality-profiles/app']);</script> -<% end %> - <div class="search-navigator" id="quality-profiles"></div> + +<% content_for :extra_script do %> + <script> + require(['apps/quality-profiles/app']); + </script> +<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/provisioning/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/provisioning/index.html.erb index 96e3b8965f8..1dba1c73ebe 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/provisioning/index.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/provisioning/index.html.erb @@ -1,6 +1,7 @@ -<div id="provisioning"></div> -<script> - require(['apps/provisioning/app'], function (App) { - App.start({ el: '#provisioning' }); - }); -</script> +<% content_for :extra_script do %> + <script> + require(['apps/provisioning/app'], function (App) { + App.start({ el: '#content' }); + }); + </script> +<% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/index.html.erb index e3026f52084..8b2ce266a10 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/index.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/index.html.erb @@ -1,6 +1,7 @@ -<div id="users"></div> -<script> - require(['apps/users/app'], function (App) { - App.start({ el: '#users' }); - }); -</script> +<% content_for :extra_script do %> + <script> + require(['apps/users/app'], function (App) { + App.start({ el: '#content' }); + }); + </script> +<% end %> diff --git a/server/sonar-web/src/test/js/application-spec.js b/server/sonar-web/src/test/js/application-spec.js index 32db4ab2901..5b205cb4903 100644 --- a/server/sonar-web/src/test/js/application-spec.js +++ b/server/sonar-web/src/test/js/application-spec.js @@ -40,7 +40,7 @@ casper.test.begin(testName('collapsedDirFromPath() & fileFromPath()'), function } casper - .start(lib.buildUrl('ui-global-messages'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); }) @@ -91,7 +91,7 @@ casper.test.begin(testName('Format Measures'), function (test) { ONE_DAY = HOURS_IN_DAY * ONE_HOUR; casper - .start(lib.buildUrl('ui-global-messages'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); }) @@ -230,7 +230,7 @@ casper.test.begin(testName('Severity Comparators'), function (test) { } casper - .start(lib.buildUrl('ui-global-messages'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); }) diff --git a/server/sonar-web/src/test/js/computation-spec.js b/server/sonar-web/src/test/js/computation-spec.js index d73a5d14e0e..2cf0c2418d3 100644 --- a/server/sonar-web/src/test/js/computation-spec.js +++ b/server/sonar-web/src/test/js/computation-spec.js @@ -8,7 +8,7 @@ lib.configureCasper(); casper.test.begin(testName('List'), 9, function (test) { casper - .start(lib.buildUrl('computation'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); lib.mockRequestFromFile('/api/computation/queue', 'queue.json'); lib.mockRequestFromFile('/api/computation/history', 'history.json'); @@ -17,7 +17,7 @@ casper.test.begin(testName('List'), 9, function (test) { .then(function () { casper.evaluate(function () { require(['apps/computation/app'], function (App) { - App.start({ el: '#computation' }); + App.start({ el: '#content' }); }); }); }) @@ -65,7 +65,7 @@ casper.test.begin(testName('List'), 9, function (test) { casper.test.begin(testName('Show More'), 2, function (test) { casper - .start(lib.buildUrl('computation#past'), function () { + .start(lib.buildUrl('base#past'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/computation/history', 'history-big-1.json'); }) @@ -73,7 +73,7 @@ casper.test.begin(testName('Show More'), 2, function (test) { .then(function () { casper.evaluate(function () { require(['apps/computation/app'], function (App) { - App.start({ el: '#computation' }); + App.start({ el: '#content' }); }); }); }) diff --git a/server/sonar-web/src/test/js/groups-spec.js b/server/sonar-web/src/test/js/groups-spec.js index 8d8b371105c..384586d6c0f 100644 --- a/server/sonar-web/src/test/js/groups-spec.js +++ b/server/sonar-web/src/test/js/groups-spec.js @@ -8,7 +8,7 @@ lib.configureCasper(); casper.test.begin(testName('List'), 7, function (test) { casper - .start(lib.buildUrl('groups'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); lib.mockRequestFromFile('/api/usergroups/search', 'search.json'); }) @@ -16,7 +16,7 @@ casper.test.begin(testName('List'), 7, function (test) { .then(function () { casper.evaluate(function () { require(['apps/groups/app'], function (App) { - App.start({ el: '#groups' }); + App.start({ el: '#content' }); }); }); }) @@ -47,7 +47,7 @@ casper.test.begin(testName('List'), 7, function (test) { casper.test.begin(testName('Search'), 4, function (test) { casper - .start(lib.buildUrl('groups'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/usergroups/search', 'search.json'); }) @@ -55,7 +55,7 @@ casper.test.begin(testName('Search'), 4, function (test) { .then(function () { casper.evaluate(function () { require(['apps/groups/app'], function (App) { - App.start({ el: '#groups' }); + App.start({ el: '#content' }); }); }); }) @@ -105,7 +105,7 @@ casper.test.begin(testName('Search'), 4, function (test) { casper.test.begin(testName('Show More'), 4, function (test) { casper - .start(lib.buildUrl('groups'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/usergroups/search', 'search-big-1.json'); }) @@ -113,7 +113,7 @@ casper.test.begin(testName('Show More'), 4, function (test) { .then(function () { casper.evaluate(function () { require(['apps/groups/app'], function (App) { - App.start({ el: '#groups' }); + App.start({ el: '#content' }); }); }); }) @@ -147,7 +147,7 @@ casper.test.begin(testName('Show More'), 4, function (test) { casper.test.begin(testName('Show Users'), 2, function (test) { casper - .start(lib.buildUrl('groups'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/usergroups/search', 'search.json'); this.searchMock = lib.mockRequestFromFile('/api/usergroups/users*', 'users.json'); @@ -156,7 +156,7 @@ casper.test.begin(testName('Show Users'), 2, function (test) { .then(function () { casper.evaluate(function () { require(['apps/groups/app'], function (App) { - App.start({ el: '#groups' }); + App.start({ el: '#content' }); }); }); }) @@ -186,7 +186,7 @@ casper.test.begin(testName('Show Users'), 2, function (test) { casper.test.begin(testName('Create'), 4, function (test) { casper - .start(lib.buildUrl('groups'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/usergroups/search', 'search.json'); this.createMock = lib.mockRequestFromFile('/api/usergroups/create', 'error.json', { status: 400 }); @@ -195,7 +195,7 @@ casper.test.begin(testName('Create'), 4, function (test) { .then(function () { casper.evaluate(function () { require(['apps/groups/app'], function (App) { - App.start({ el: '#groups' }); + App.start({ el: '#content' }); }); jQuery.ajaxSetup({ dataType: 'json' }); }); @@ -247,7 +247,7 @@ casper.test.begin(testName('Create'), 4, function (test) { casper.test.begin(testName('Update'), 2, function (test) { casper - .start(lib.buildUrl('groups'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/usergroups/search', 'search.json'); this.updateMock = lib.mockRequestFromFile('/api/usergroups/update', 'error.json', { status: 400 }); @@ -256,7 +256,7 @@ casper.test.begin(testName('Update'), 2, function (test) { .then(function () { casper.evaluate(function () { require(['apps/groups/app'], function (App) { - App.start({ el: '#groups' }); + App.start({ el: '#content' }); }); jQuery.ajaxSetup({ dataType: 'json' }); }); @@ -306,7 +306,7 @@ casper.test.begin(testName('Update'), 2, function (test) { casper.test.begin(testName('Delete'), 1, function (test) { casper - .start(lib.buildUrl('groups'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/usergroups/search', 'search.json'); this.updateMock = lib.mockRequestFromFile('/api/usergroups/delete', 'error.json', { status: 400 }); @@ -315,7 +315,7 @@ casper.test.begin(testName('Delete'), 1, function (test) { .then(function () { casper.evaluate(function () { require(['apps/groups/app'], function (App) { - App.start({ el: '#groups' }); + App.start({ el: '#content' }); }); jQuery.ajaxSetup({ dataType: 'json' }); }); diff --git a/server/sonar-web/src/test/js/handlebars-helpers-spec.js b/server/sonar-web/src/test/js/handlebars-helpers-spec.js index e88a6355cce..f756159b063 100644 --- a/server/sonar-web/src/test/js/handlebars-helpers-spec.js +++ b/server/sonar-web/src/test/js/handlebars-helpers-spec.js @@ -56,7 +56,7 @@ function returnY () { casper.test.begin(testName(), function (test) { casper - .start(lib.buildUrl('ui-global-messages'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); }) diff --git a/server/sonar-web/src/test/js/maintenance-spec.js b/server/sonar-web/src/test/js/maintenance-spec.js index 2f0891a4a96..251d2ffeabb 100644 --- a/server/sonar-web/src/test/js/maintenance-spec.js +++ b/server/sonar-web/src/test/js/maintenance-spec.js @@ -5,7 +5,7 @@ describe('Maintenance App', function () { it('should exist', 2, function (casper, test) { return casper - .start(lib.buildUrl('maintenance'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); lib.fmock('/api/system/status', 'status-up.json'); }) @@ -13,7 +13,7 @@ describe('Maintenance App', function () { .then(function () { casper.evaluate(function () { require(['apps/maintenance/app'], function (App) { - App.start({ el: '#maintenance', setup: false }); + App.start({ el: '#content', setup: false }); }); }); }) @@ -30,7 +30,7 @@ describe('Maintenance App', function () { it('should change status', 1, function (casper, test) { return casper - .start(lib.buildUrl('maintenance'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); lib.fmock('/api/system/status', 'status-up.json'); }) @@ -38,7 +38,7 @@ describe('Maintenance App', function () { .then(function () { casper.evaluate(function () { require(['apps/maintenance/app'], function (App) { - App.start({ el: '#maintenance', setup: false }); + App.start({ el: '#content', setup: false }); }); }); }) diff --git a/server/sonar-web/src/test/js/markdown-spec.js b/server/sonar-web/src/test/js/markdown-spec.js index fa9bedfd530..e7c45d30cdb 100644 --- a/server/sonar-web/src/test/js/markdown-spec.js +++ b/server/sonar-web/src/test/js/markdown-spec.js @@ -30,14 +30,14 @@ lib.configureCasper(); casper.test.begin(testName(), 8, function (test) { casper - .start(lib.buildUrl('ui-global-messages'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); }) .then(function () { casper.evaluate(function () { require(['apps/markdown/app'], function (App) { - App.start({ el: 'body' }); + App.start({ el: '#content' }); }); }); }) diff --git a/server/sonar-web/src/test/js/metrics-spec.js b/server/sonar-web/src/test/js/metrics-spec.js index 3556ed5cc09..c4f9805e138 100644 --- a/server/sonar-web/src/test/js/metrics-spec.js +++ b/server/sonar-web/src/test/js/metrics-spec.js @@ -8,7 +8,7 @@ lib.configureCasper(); casper.test.begin(testName('List'), 9, function (test) { casper - .start(lib.buildUrl('metrics'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); lib.mockRequestFromFile('/api/metrics/domains', 'domains.json'); lib.mockRequestFromFile('/api/metrics/types', 'types.json'); @@ -18,7 +18,7 @@ casper.test.begin(testName('List'), 9, function (test) { .then(function () { casper.evaluate(function () { require(['apps/metrics/app'], function (App) { - App.start({ el: '#metrics' }); + App.start({ el: '#content' }); }); }); }) @@ -50,7 +50,7 @@ casper.test.begin(testName('List'), 9, function (test) { casper.test.begin(testName('Show More'), 4, function (test) { casper - .start(lib.buildUrl('metrics'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); lib.mockRequestFromFile('/api/metrics/domains', 'domains.json'); lib.mockRequestFromFile('/api/metrics/types', 'types.json'); @@ -60,7 +60,7 @@ casper.test.begin(testName('Show More'), 4, function (test) { .then(function () { casper.evaluate(function () { require(['apps/metrics/app'], function (App) { - App.start({ el: '#metrics' }); + App.start({ el: '#content' }); }); }); }) @@ -94,7 +94,7 @@ casper.test.begin(testName('Show More'), 4, function (test) { casper.test.begin(testName('Create'), 4, function (test) { casper - .start(lib.buildUrl('metrics'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); lib.mockRequestFromFile('/api/metrics/domains', 'domains.json'); lib.mockRequestFromFile('/api/metrics/types', 'types.json'); @@ -105,7 +105,7 @@ casper.test.begin(testName('Create'), 4, function (test) { .then(function () { casper.evaluate(function () { require(['apps/metrics/app'], function (App) { - App.start({ el: '#metrics' }); + App.start({ el: '#content' }); }); jQuery.ajaxSetup({ dataType: 'json' }); }); @@ -159,7 +159,7 @@ casper.test.begin(testName('Create'), 4, function (test) { casper.test.begin(testName('Update'), 4, function (test) { casper - .start(lib.buildUrl('metrics'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); lib.mockRequestFromFile('/api/metrics/domains', 'domains.json'); lib.mockRequestFromFile('/api/metrics/types', 'types.json'); @@ -170,7 +170,7 @@ casper.test.begin(testName('Update'), 4, function (test) { .then(function () { casper.evaluate(function () { require(['apps/metrics/app'], function (App) { - App.start({ el: '#metrics' }); + App.start({ el: '#content' }); }); jQuery.ajaxSetup({ dataType: 'json' }); }); @@ -224,7 +224,7 @@ casper.test.begin(testName('Update'), 4, function (test) { casper.test.begin(testName('Delete'), 1, function (test) { casper - .start(lib.buildUrl('metrics'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); lib.mockRequestFromFile('/api/metrics/domains', 'domains.json'); lib.mockRequestFromFile('/api/metrics/types', 'types.json'); @@ -235,7 +235,7 @@ casper.test.begin(testName('Delete'), 1, function (test) { .then(function () { casper.evaluate(function () { require(['apps/metrics/app'], function (App) { - App.start({ el: '#metrics' }); + App.start({ el: '#content' }); }); jQuery.ajaxSetup({ dataType: 'json' }); }); diff --git a/server/sonar-web/src/test/js/process.js b/server/sonar-web/src/test/js/process.js index 61c6edf2404..68216a9ccea 100644 --- a/server/sonar-web/src/test/js/process.js +++ b/server/sonar-web/src/test/js/process.js @@ -29,7 +29,7 @@ lib.configureCasper(); casper.test.begin(testName('One Timeout'), function (test) { casper - .start(lib.buildUrl('nav'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); }) @@ -63,7 +63,7 @@ casper.test.begin(testName('One Timeout'), function (test) { casper.test.begin(testName('Several Timeouts'), 1, function (test) { casper - .start(lib.buildUrl('nav'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); }) @@ -99,7 +99,7 @@ casper.test.begin(testName('Several Timeouts'), 1, function (test) { casper.test.begin(testName('Failed'), 1, function (test) { casper - .start(lib.buildUrl('nav'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); }) @@ -134,7 +134,7 @@ casper.test.begin(testName('Failed'), 1, function (test) { casper.test.begin(testName('Close Failed'), 2, function (test) { casper - .start(lib.buildUrl('nav'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); }) diff --git a/server/sonar-web/src/test/js/provisioning-spec.js b/server/sonar-web/src/test/js/provisioning-spec.js index 8c197cd8c20..73d89589947 100644 --- a/server/sonar-web/src/test/js/provisioning-spec.js +++ b/server/sonar-web/src/test/js/provisioning-spec.js @@ -8,7 +8,7 @@ lib.configureCasper(); casper.test.begin(testName('List'), 5, function (test) { casper - .start(lib.buildUrl('provisioning'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); lib.mockRequestFromFile('/api/projects/provisioned', 'search.json'); }) @@ -16,7 +16,7 @@ casper.test.begin(testName('List'), 5, function (test) { .then(function () { casper.evaluate(function () { require(['apps/provisioning/app'], function (App) { - App.start({ el: '#provisioning' }); + App.start({ el: '#content' }); }); }); }) @@ -44,7 +44,7 @@ casper.test.begin(testName('List'), 5, function (test) { casper.test.begin(testName('Search'), 4, function (test) { casper - .start(lib.buildUrl('provisioning'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/projects/provisioned', 'search.json'); }) @@ -52,7 +52,7 @@ casper.test.begin(testName('Search'), 4, function (test) { .then(function () { casper.evaluate(function () { require(['apps/provisioning/app'], function (App) { - App.start({ el: '#provisioning' }); + App.start({ el: '#content' }); }); }); }) @@ -102,7 +102,7 @@ casper.test.begin(testName('Search'), 4, function (test) { casper.test.begin(testName('Show More'), 4, function (test) { casper - .start(lib.buildUrl('provisioning'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/projects/provisioned', 'search-big-1.json'); }) @@ -110,7 +110,7 @@ casper.test.begin(testName('Show More'), 4, function (test) { .then(function () { casper.evaluate(function () { require(['apps/provisioning/app'], function (App) { - App.start({ el: '#provisioning' }); + App.start({ el: '#content' }); }); }); }) @@ -144,7 +144,7 @@ casper.test.begin(testName('Show More'), 4, function (test) { casper.test.begin(testName('Create'), 4, function (test) { casper - .start(lib.buildUrl('provisioning'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/projects/provisioned', 'search.json'); this.createMock = lib.mockRequestFromFile('/api/projects/create', 'error.json', { status: 400 }); @@ -153,7 +153,7 @@ casper.test.begin(testName('Create'), 4, function (test) { .then(function () { casper.evaluate(function () { require(['apps/provisioning/app'], function (App) { - App.start({ el: '#provisioning' }); + App.start({ el: '#content' }); }); jQuery.ajaxSetup({ dataType: 'json' }); }); @@ -206,7 +206,7 @@ casper.test.begin(testName('Create'), 4, function (test) { casper.test.begin(testName('Delete'), 1, function (test) { casper - .start(lib.buildUrl('provisioning'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/projects/provisioned', 'search.json'); this.updateMock = lib.mockRequestFromFile('/api/projects/bulk_delete', 'delete-error.json', { status: 400 }); @@ -215,7 +215,7 @@ casper.test.begin(testName('Delete'), 1, function (test) { .then(function () { casper.evaluate(function () { require(['apps/provisioning/app'], function (App) { - App.start({ el: '#provisioning' }); + App.start({ el: '#content' }); }); jQuery.ajaxSetup({ dataType: 'json' }); }); @@ -257,7 +257,7 @@ casper.test.begin(testName('Delete'), 1, function (test) { casper.test.begin(testName('Selection'), 22, function (test) { casper - .start(lib.buildUrl('provisioning'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); lib.mockRequestFromFile('/api/projects/provisioned', 'search.json'); }) @@ -265,7 +265,7 @@ casper.test.begin(testName('Selection'), 22, function (test) { .then(function () { casper.evaluate(function () { require(['apps/provisioning/app'], function (App) { - App.start({ el: '#provisioning' }); + App.start({ el: '#content' }); }); }); }) @@ -331,7 +331,7 @@ casper.test.begin(testName('Selection'), 22, function (test) { casper.test.begin(testName('Bulk Delete'), 1, function (test) { casper - .start(lib.buildUrl('provisioning'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); lib.mockRequestFromFile('/api/projects/provisioned', 'search.json'); lib.mockRequestFromFile('/api/projects/bulk_delete', 'delete-error.json', { status: 400 }); @@ -340,7 +340,7 @@ casper.test.begin(testName('Bulk Delete'), 1, function (test) { .then(function () { casper.evaluate(function () { require(['apps/provisioning/app'], function (App) { - App.start({ el: '#provisioning' }); + App.start({ el: '#content' }); }); jQuery.ajaxSetup({ dataType: 'json' }); }); diff --git a/server/sonar-web/src/test/js/treemap-spec.js b/server/sonar-web/src/test/js/treemap-spec.js index 43100cf6107..de7c1889c99 100644 --- a/server/sonar-web/src/test/js/treemap-spec.js +++ b/server/sonar-web/src/test/js/treemap-spec.js @@ -27,7 +27,7 @@ lib.configureCasper(); casper.test.begin('Treemap', function (test) { var treemapData = JSON.parse(fs.read('treemap.json')); - casper.start(lib.buildUrl('treemap'), function () { + casper.start(lib.buildUrl('base'), function () { lib.mockRequestFromFile('/api/resources/index', 'treemap-resources.json'); casper.evaluate(function (treemapData) { @@ -44,8 +44,8 @@ casper.test.begin('Treemap', function (test) { noData: '', resource: '' }) - .render('#container'); - }, treemapData) + .render('#content'); + }, treemapData); }); casper diff --git a/server/sonar-web/src/test/js/users-spec.js b/server/sonar-web/src/test/js/users-spec.js index 2dc44a647e8..009adfce00d 100644 --- a/server/sonar-web/src/test/js/users-spec.js +++ b/server/sonar-web/src/test/js/users-spec.js @@ -8,7 +8,7 @@ lib.configureCasper(); casper.test.begin(testName('List'), 13, function (test) { casper - .start(lib.buildUrl('users'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); lib.mockRequestFromFile('/api/users/search', 'search.json'); }) @@ -16,7 +16,7 @@ casper.test.begin(testName('List'), 13, function (test) { .then(function () { casper.evaluate(function () { require(['apps/users/app'], function (App) { - App.start({ el: '#users' }); + App.start({ el: '#content' }); }); }); }) @@ -60,7 +60,7 @@ casper.test.begin(testName('List'), 13, function (test) { casper.test.begin(testName('Search'), 4, function (test) { casper - .start(lib.buildUrl('users'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/users/search', 'search.json'); }) @@ -68,7 +68,7 @@ casper.test.begin(testName('Search'), 4, function (test) { .then(function () { casper.evaluate(function () { require(['apps/users/app'], function (App) { - App.start({ el: '#users' }); + App.start({ el: '#content' }); }); }); }) @@ -117,7 +117,7 @@ casper.test.begin(testName('Search'), 4, function (test) { casper.test.begin(testName('Show More'), 4, function (test) { casper - .start(lib.buildUrl('users'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/users/search', 'search-big-1.json'); }) @@ -125,7 +125,7 @@ casper.test.begin(testName('Show More'), 4, function (test) { .then(function () { casper.evaluate(function () { require(['apps/users/app'], function (App) { - App.start({ el: '#users' }); + App.start({ el: '#content' }); }); }); }) @@ -159,7 +159,7 @@ casper.test.begin(testName('Show More'), 4, function (test) { casper.test.begin(testName('Create'), 5, function (test) { casper - .start(lib.buildUrl('users'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/users/search', 'search.json'); this.createMock = lib.mockRequestFromFile('/api/users/create', 'error.json', { status: 400 }); @@ -168,7 +168,7 @@ casper.test.begin(testName('Create'), 5, function (test) { .then(function () { casper.evaluate(function () { require(['apps/users/app'], function (App) { - App.start({ el: '#users' }); + App.start({ el: '#content' }); }); jQuery.ajaxSetup({ dataType: 'json' }); }); @@ -226,7 +226,7 @@ casper.test.begin(testName('Create'), 5, function (test) { casper.test.begin(testName('Update'), 3, function (test) { casper - .start(lib.buildUrl('users'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/users/search', 'search.json'); this.updateMock = lib.mockRequestFromFile('/api/users/update', 'error.json', { status: 400 }); @@ -235,7 +235,7 @@ casper.test.begin(testName('Update'), 3, function (test) { .then(function () { casper.evaluate(function () { require(['apps/users/app'], function (App) { - App.start({ el: '#users' }); + App.start({ el: '#content' }); }); jQuery.ajaxSetup({ dataType: 'json' }); }); @@ -289,7 +289,7 @@ casper.test.begin(testName('Update'), 3, function (test) { casper.test.begin(testName('Change Password'), 1, function (test) { casper - .start(lib.buildUrl('users'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/users/search', 'search.json'); this.updateMock = lib.mockRequestFromFile('/api/users/change_password', 'error.json', { status: 400 }); @@ -298,7 +298,7 @@ casper.test.begin(testName('Change Password'), 1, function (test) { .then(function () { casper.evaluate(function () { require(['apps/users/app'], function (App) { - App.start({ el: '#users' }); + App.start({ el: '#content' }); }); jQuery.ajaxSetup({ dataType: 'json' }); }); @@ -363,7 +363,7 @@ casper.test.begin(testName('Change Password'), 1, function (test) { casper.test.begin(testName('Deactivate'), 1, function (test) { casper - .start(lib.buildUrl('users'), function () { + .start(lib.buildUrl('base'), function () { lib.setDefaultViewport(); this.searchMock = lib.mockRequestFromFile('/api/users/search', 'search.json'); this.updateMock = lib.mockRequestFromFile('/api/users/deactivate', 'error.json', { status: 400 }); @@ -372,7 +372,7 @@ casper.test.begin(testName('Deactivate'), 1, function (test) { .then(function () { casper.evaluate(function () { require(['apps/users/app'], function (App) { - App.start({ el: '#users' }); + App.start({ el: '#content' }); }); jQuery.ajaxSetup({ dataType: 'json' }); }); diff --git a/server/sonar-web/src/test/views/api_documentation.jade b/server/sonar-web/src/test/views/api_documentation.jade index 307df3dbd66..63789f5b1cb 100644 --- a/server/sonar-web/src/test/views/api_documentation.jade +++ b/server/sonar-web/src/test/views/api_documentation.jade @@ -1,5 +1,4 @@ extends layouts/main block body - #content - .search-navigator.sticky#api-documentation + .search-navigator.sticky#api-documentation diff --git a/server/sonar-web/src/test/views/base.jade b/server/sonar-web/src/test/views/base.jade new file mode 100644 index 00000000000..3bdc86e4960 --- /dev/null +++ b/server/sonar-web/src/test/views/base.jade @@ -0,0 +1 @@ +extends layouts/main diff --git a/server/sonar-web/src/test/views/coding-rules.jade b/server/sonar-web/src/test/views/coding-rules.jade index 75455be2861..038fd85901c 100644 --- a/server/sonar-web/src/test/views/coding-rules.jade +++ b/server/sonar-web/src/test/views/coding-rules.jade @@ -1,5 +1,4 @@ extends layouts/main block body - #content - .coding-rules.search-navigator + .coding-rules.search-navigator diff --git a/server/sonar-web/src/test/views/computation.jade b/server/sonar-web/src/test/views/computation.jade deleted file mode 100644 index 8145275ac35..00000000000 --- a/server/sonar-web/src/test/views/computation.jade +++ /dev/null @@ -1,5 +0,0 @@ -extends layouts/main - -block body - #content - #computation diff --git a/server/sonar-web/src/test/views/groups.jade b/server/sonar-web/src/test/views/groups.jade deleted file mode 100644 index ddf0a29c6a3..00000000000 --- a/server/sonar-web/src/test/views/groups.jade +++ /dev/null @@ -1,5 +0,0 @@ -extends layouts/main - -block body - #content - #groups diff --git a/server/sonar-web/src/test/views/issues-context.jade b/server/sonar-web/src/test/views/issues-context.jade index 12868009181..bb823c330a4 100644 --- a/server/sonar-web/src/test/views/issues-context.jade +++ b/server/sonar-web/src/test/views/issues-context.jade @@ -1,5 +1,4 @@ extends layouts/main block body - #content - .issues.search-navigator + .issues.search-navigator diff --git a/server/sonar-web/src/test/views/issues.jade b/server/sonar-web/src/test/views/issues.jade index 12868009181..bb823c330a4 100644 --- a/server/sonar-web/src/test/views/issues.jade +++ b/server/sonar-web/src/test/views/issues.jade @@ -1,5 +1,4 @@ extends layouts/main block body - #content - .issues.search-navigator + .issues.search-navigator diff --git a/server/sonar-web/src/test/views/layouts/main.jade b/server/sonar-web/src/test/views/layouts/main.jade index 0c8d6b1dad0..9c286d1c58b 100644 --- a/server/sonar-web/src/test/views/layouts/main.jade +++ b/server/sonar-web/src/test/views/layouts/main.jade @@ -70,4 +70,5 @@ html block header body #body - block body + #content + block body diff --git a/server/sonar-web/src/test/views/maintenance.jade b/server/sonar-web/src/test/views/maintenance.jade deleted file mode 100644 index a3fadf98edb..00000000000 --- a/server/sonar-web/src/test/views/maintenance.jade +++ /dev/null @@ -1,5 +0,0 @@ -extends layouts/main - -block body - #content - #maintenance diff --git a/server/sonar-web/src/test/views/metrics.jade b/server/sonar-web/src/test/views/metrics.jade deleted file mode 100644 index 123e3d8855c..00000000000 --- a/server/sonar-web/src/test/views/metrics.jade +++ /dev/null @@ -1,5 +0,0 @@ -extends layouts/main - -block body - #content - #metrics diff --git a/server/sonar-web/src/test/views/profiles.jade b/server/sonar-web/src/test/views/profiles.jade index e17181b0953..1c87e17bf2f 100644 --- a/server/sonar-web/src/test/views/profiles.jade +++ b/server/sonar-web/src/test/views/profiles.jade @@ -1,5 +1,4 @@ extends layouts/main block body - #content - .search-navigator#quality-profiles + .search-navigator#quality-profiles diff --git a/server/sonar-web/src/test/views/provisioning.jade b/server/sonar-web/src/test/views/provisioning.jade deleted file mode 100644 index 41016938b55..00000000000 --- a/server/sonar-web/src/test/views/provisioning.jade +++ /dev/null @@ -1,5 +0,0 @@ -extends layouts/main - -block body - #content - #provisioning diff --git a/server/sonar-web/src/test/views/quality_gates.jade b/server/sonar-web/src/test/views/quality_gates.jade index 946edd3b8fb..5e068786798 100644 --- a/server/sonar-web/src/test/views/quality_gates.jade +++ b/server/sonar-web/src/test/views/quality_gates.jade @@ -1,5 +1,4 @@ extends layouts/main block body - #content - .search-navigator.sticky.search-navigator-extended-view#quality-gates + .search-navigator.sticky.search-navigator-extended-view#quality-gates diff --git a/server/sonar-web/src/test/views/treemap.jade b/server/sonar-web/src/test/views/treemap.jade deleted file mode 100644 index 09dc4fb950b..00000000000 --- a/server/sonar-web/src/test/views/treemap.jade +++ /dev/null @@ -1,4 +0,0 @@ -extends layouts/main - -block body - #container diff --git a/server/sonar-web/src/test/views/users.jade b/server/sonar-web/src/test/views/users.jade deleted file mode 100644 index d469a627868..00000000000 --- a/server/sonar-web/src/test/views/users.jade +++ /dev/null @@ -1,5 +0,0 @@ -extends layouts/main - -block body - #content - #users |