diff options
| author | Alban Peignier | 2017-10-17 11:56:08 +0200 | 
|---|---|---|
| committer | Alban Peignier | 2017-10-17 11:56:08 +0200 | 
| commit | 545671efd71380722dbc3272f5f513ea684891bd (patch) | |
| tree | e8e1101bf2c8046d61d5185cce8d0b4245ad2183 | |
| parent | f480ad0739e5c0ec2c0c8bb890344b9c4777ba35 (diff) | |
| parent | 58cfec64c621d1c6893280f5ad8793af81573199 (diff) | |
| download | chouette-core-545671efd71380722dbc3272f5f513ea684891bd.tar.bz2 | |
Merge branch 'master' into staging
10 files changed, 21 insertions, 15 deletions
| diff --git a/app/models/routing_constraint_zone_control/maximum_length.rb b/app/models/routing_constraint_zone_control/maximum_length.rb index 6b726e38c..9e647e934 100644 --- a/app/models/routing_constraint_zone_control/maximum_length.rb +++ b/app/models/routing_constraint_zone_control/maximum_length.rb @@ -1,6 +1,6 @@  module RoutingConstraintZoneControl    class MaximumLength < ComplianceControl -    def self.default_code; "3-ITL-2" end +    def self.default_code; "3-RoutingConstraint-2" end    end  end diff --git a/app/models/routing_constraint_zone_control/minimum_length.rb b/app/models/routing_constraint_zone_control/minimum_length.rb index 38f583bc5..ce831e72f 100644 --- a/app/models/routing_constraint_zone_control/minimum_length.rb +++ b/app/models/routing_constraint_zone_control/minimum_length.rb @@ -1,6 +1,6 @@  module RoutingConstraintZoneControl    class MinimumLength < ComplianceControl -    def self.default_code; "3-ITL-3" end +    def self.default_code; "3-RoutingConstraint-3" end    end  end diff --git a/app/models/routing_constraint_zone_control/unactivated_stop_point.rb b/app/models/routing_constraint_zone_control/unactivated_stop_point.rb index c03bb2324..a42a4359d 100644 --- a/app/models/routing_constraint_zone_control/unactivated_stop_point.rb +++ b/app/models/routing_constraint_zone_control/unactivated_stop_point.rb @@ -1,6 +1,6 @@  module RoutingConstraintZoneControl    class UnactivatedStopPoint < ComplianceControl -    def self.default_code; "3-ITL-1" end +    def self.default_code; "3-RoutingConstraint-1" end    end  end diff --git a/config/webpack/test.js b/config/webpack/test.js index d728f40d2..81269f651 100644 --- a/config/webpack/test.js +++ b/config/webpack/test.js @@ -1,8 +1,3 @@  const environment = require('./environment') -import $ from 'jquery'; -global.$ = global.jQuery = $; - -require('bootstrap') -  module.exports = environment.toWebpackConfig() diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake index ace042546..3e73b7a3b 100644 --- a/lib/tasks/ci.rake +++ b/lib/tasks/ci.rake @@ -31,8 +31,14 @@ namespace :ci do      sh "bundle exec bundle-audit check --update"    end -  task :spec do -    sh "bundle exec rake spec" +  task :spec => ["ci:assets","spec"] + +  task :assets do +    sh "RAILS_ENV=test bundle exec rake assets:precompile" +  end + +  task :jest => "ci:assets" do +    sh "node_modules/.bin/jest"    end    desc "Deploy after CI" @@ -47,8 +53,9 @@ namespace :ci do    desc "Clean test files"    task :clean do      sh "rm -rf log/test.log" +    sh "RAILS_ENV=test bundle exec rake assets:clobber"    end  end  desc "Run continuous integration tasks (spec, ...)" -task :ci => ["ci:setup", "ci:spec", "cucumber", "ci:check_security", "ci:deploy", "ci:clean"] +task :ci => ["ci:setup", "ci:spec", "ci:jest", "cucumber", "ci:check_security", "ci:deploy", "ci:clean"] diff --git a/package.json b/package.json index 010f2b606..7e8d695ac 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@        "<rootDir>/spec/javascript"      ],      "setupFiles": [ -      "<rootDir>/config/webpack/test.js" +      "<rootDir>/spec/javascript/spec_helper.js"      ]    }  } diff --git a/spec/javascript/spec_helper.js b/spec/javascript/spec_helper.js new file mode 100644 index 000000000..135995eb2 --- /dev/null +++ b/spec/javascript/spec_helper.js @@ -0,0 +1,4 @@ +import $ from 'jquery'; +global.$ = global.jQuery = $; + +require('bootstrap')
\ No newline at end of file diff --git a/spec/models/compliance_control_class_level_defaults/routing_constraint_zone_control/maximum_length_cccld_spec.rb b/spec/models/compliance_control_class_level_defaults/routing_constraint_zone_control/maximum_length_cccld_spec.rb index 61896ef5e..467b4f866 100644 --- a/spec/models/compliance_control_class_level_defaults/routing_constraint_zone_control/maximum_length_cccld_spec.rb +++ b/spec/models/compliance_control_class_level_defaults/routing_constraint_zone_control/maximum_length_cccld_spec.rb @@ -1,6 +1,6 @@  RSpec.describe RoutingConstraintZoneControl::MaximumLength, type: :model do -  let( :default_code ){ "3-ITL-2" } +  let( :default_code ){ "3-RoutingConstraint-2" }    let( :factory ){ :routing_constraint_zone_control_maximum_length }    it_behaves_like 'ComplianceControl Class Level Defaults'  diff --git a/spec/models/compliance_control_class_level_defaults/routing_constraint_zone_control/minimum_length_cccld_spec.rb b/spec/models/compliance_control_class_level_defaults/routing_constraint_zone_control/minimum_length_cccld_spec.rb index e930c2475..b15b69035 100644 --- a/spec/models/compliance_control_class_level_defaults/routing_constraint_zone_control/minimum_length_cccld_spec.rb +++ b/spec/models/compliance_control_class_level_defaults/routing_constraint_zone_control/minimum_length_cccld_spec.rb @@ -1,6 +1,6 @@  RSpec.describe RoutingConstraintZoneControl::MinimumLength, type: :model do -  let( :default_code ){ "3-ITL-3" } +  let( :default_code ){ "3-RoutingConstraint-3" }    let( :factory ){ :routing_constraint_zone_control_minimum_length }    it_behaves_like 'ComplianceControl Class Level Defaults'  diff --git a/spec/models/compliance_control_class_level_defaults/routing_constraint_zone_control/unactivated_stop_point_cccld_spec.rb b/spec/models/compliance_control_class_level_defaults/routing_constraint_zone_control/unactivated_stop_point_cccld_spec.rb index aba9b7fc1..8d700ebbb 100644 --- a/spec/models/compliance_control_class_level_defaults/routing_constraint_zone_control/unactivated_stop_point_cccld_spec.rb +++ b/spec/models/compliance_control_class_level_defaults/routing_constraint_zone_control/unactivated_stop_point_cccld_spec.rb @@ -1,6 +1,6 @@  RSpec.describe RoutingConstraintZoneControl::UnactivatedStopPoint, type: :model do -  let( :default_code ){ "3-ITL-1" } +  let( :default_code ){ "3-RoutingConstraint-1" }    let( :factory ){ :routing_constraint_zone_control_unactivated_stop_point }    it_behaves_like 'ComplianceControl Class Level Defaults'  | 
