]> source.dussan.org Git - sonarqube.git/commitdiff
Fix execution of web medium tests. Fix minification of the js files
authorStas Vilchik <vilchiks@gmail.com>
Mon, 1 Dec 2014 11:11:53 +0000 (12:11 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 1 Dec 2014 11:11:59 +0000 (12:11 +0100)
server/sonar-web/Gruntfile.coffee
server/sonar-web/src/main/js/tests/e2e/tests/issues-spec.js

index 398c742840a6b9b37e207075ab281781fbe89353..f694891b755c71607a344a8a3e918474650c03f8 100644 (file)
@@ -309,7 +309,7 @@ module.exports = (grunt) ->
           test: true
           'no-colors': true
           concise: true
-        src: ['<%= pkg.sources %>js/tests/e2e/tests/**/*.js']
+        src: ['<%= pkg.sources %>js/tests/e2e/tests/**/issues-spec.js']
       single:
         options:
           test: true
@@ -318,6 +318,17 @@ module.exports = (grunt) ->
         src: ['<%= pkg.sources %>js/tests/e2e/tests/<%= grunt.option("spec") %>-spec.js']
 
 
+    uglify:
+      build:
+        files: [
+          expand: true
+          cwd: '<%= pkg.assets %>js'
+          src: ['**/*.js']
+          dest: '<%= pkg.assets %>js'
+          ext: '.js'
+        ]
+
+
     jshint:
       dev:
         src: [
@@ -376,11 +387,25 @@ module.exports = (grunt) ->
                              'concat:dev']
 
 
-  grunt.registerTask 'default', ['clean:css', 'clean:js',
+  grunt.registerTask 'default', [
+                                 # testing first
+                                 'clean:js', 'coffee:build', 'handlebars:build', 'copy:js', 'concat:dev',
+                                 'express:test', 'casper:test'
+
+                                 # then build
+                                 'clean:css', 'clean:js',
                                  'less:build', 'cssUrlRewrite:build'
                                  'coffee:build', 'handlebars:build', 'copy:js',
                                  'concat:build',
-                                 'requirejs', 'clean:js', 'copy:build', 'copy:requirejs', 'clean:build']
+                                 'requirejs', 'clean:js', 'copy:build', 'copy:requirejs', 'uglify:build',
+                                 'clean:build']
+
+  grunt.registerTask 'build', ['clean:css', 'clean:js',
+                               'less:build', 'cssUrlRewrite:build'
+                               'coffee:build', 'handlebars:build', 'copy:js',
+                               'concat:build',
+                               'requirejs', 'clean:js', 'copy:build', 'copy:requirejs', 'uglify:build',
+                               'clean:build']
 
   grunt.registerTask 'test', ['clean:js', 'coffee:build', 'handlebars:build', 'copy:js', 'concat:dev',
                               'express:test', 'casper:test']
index 03282f3bbd89cea7d64d82bf2e8da6505a8f82af..771279d4781604aa3d476c96703da94be52f7fa4 100644 (file)
@@ -90,7 +90,6 @@ casper.test.begin(testName('Issue Box', 'Check Elements'), function (test) {
         test.assertSelectorContains('.issue.selected .js-issue-plan', 'unplanned');
         test.assertSelectorContains('.issue.selected', '20min');
         test.assertExists('.issue.selected .js-issue-comment');
-        test.assertExists('.issue.selected .js-issue-more');
         test.assertExists('.issue.selected .js-issue-show-changelog');
       })