Skip to content

Update add-classes-with-d3.english #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,16 @@ module.exports = function(grunt) {
'jquery-2.2': 'karma-jquery-2.2.conf.js',
'jquery-2.1': 'karma-jquery-2.1.conf.js',
docs: 'karma-docs.conf.js',
modules: 'karma-modules.conf.js'
'modules-ngAnimate': 'ngAnimate',
'modules-ngAria': 'ngAria',
'modules-ngCookies': 'ngCookies',
'modules-ngMessageFormat': 'ngMessageFormat',
'modules-ngMessages': 'ngMessages',
'modules-ngMock': 'ngMock',
'modules-ngResource': 'ngResource',
'modules-ngRoute': 'ngRoute',
'modules-ngSanitize': 'ngSanitize',
'modules-ngTouch': 'ngTouch'
},


Expand Down Expand Up @@ -430,7 +439,16 @@ module.exports = function(grunt) {
grunt.registerTask('test:jquery-2.1', 'Run the jQuery 2.1 unit tests with Karma', ['tests:jquery-2.1']);
grunt.registerTask('test:modules', 'Run the Karma module tests with Karma', [
'build',
'tests:modules'
'tests:modules-ngAnimate',
'tests:modules-ngAria',
'tests:modules-ngCookies',
'tests:modules-ngMessageFormat',
'tests:modules-ngMessages',
'tests:modules-ngMock',
'tests:modules-ngResource',
'tests:modules-ngRoute',
'tests:modules-ngSanitize',
'tests:modules-ngTouch'
]);
grunt.registerTask('test:docs', 'Run the doc-page tests with Karma', ['package', 'tests:docs']);
grunt.registerTask('test:unit', 'Run unit, jQuery and Karma module tests with Karma', [
Expand Down
99 changes: 86 additions & 13 deletions angularFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,21 +189,84 @@ var angularFiles = {
'src/angular.bind.js'
],

'karmaModules': [
'karmaModulesBase': [
'build/angular.js',
'@angularSrcModules',
'build/angular-mocks.js',
'test/modules/no_bootstrap.js',
'test/helpers/*.js',
'test/ngAnimate/*.js',
'test/ngMessageFormat/*.js',
'test/ngMessages/*.js',
'test/ngMock/*.js',
'test/ngCookies/*.js',
'test/ngRoute/**/*.js',
'test/ngResource/*.js',
'test/ngSanitize/**/*.js',
'test/ngTouch/**/*.js',
'test/ngAria/*.js'
'test/helpers/matchers.js',
'test/helpers/privateMocks.js',
'test/helpers/support.js',
'test/helpers/testabilityPatch.js'
],

'karmaModules-ngAnimate': [
'@karmaModulesBase',
'@angularSrcModuleNgAnimate',
'test/ngAnimate/**/*.js'
],

'karmaModules-ngAria': [
'@karmaModulesBase',
'@angularSrcModuleNgAria',
'test/ngAria/**/*.js'
],

'karmaModules-ngCookies': [
'@karmaModulesBase',
'@angularSrcModuleNgCookies',
'test/ngCookies/**/*.js'
],

'karmaModules-ngMessageFormat': [
'@karmaModulesBase',
'@angularSrcModuleNgMessageFormat',
'test/ngMessageFormat/**/*.js'
],

'karmaModules-ngMessages': [
'@karmaModulesBase',
'build/angular-animate.js',
'@angularSrcModuleNgMessages',
'test/ngMessages/**/*.js'
],

// ngMock doesn't include the base because it must use the ngMock src files
'karmaModules-ngMock': [
'build/angular.js',
'src/ngMock/*.js',
'test/modules/no_bootstrap.js',
'test/helpers/matchers.js',
'test/helpers/privateMocks.js',
'test/helpers/support.js',
'test/helpers/testabilityPatch.js',
'src/routeToRegExp.js',
'build/angular-animate.js',
'test/ngMock/**/*.js'
],

'karmaModules-ngResource': [
'@karmaModulesBase',
'@angularSrcModuleNgResource',
'test/ngResource/**/*.js'
],

'karmaModules-ngRoute': [
'@karmaModulesBase',
'build/angular-animate.js',
'@angularSrcModuleNgRoute',
'test/ngRoute/**/*.js'
],

'karmaModules-ngSanitize': [
'@karmaModulesBase',
'@angularSrcModuleNgSanitize',
'test/ngSanitize/**/*.js'
],

'karmaModules-ngTouch': [
'@karmaModulesBase',
'@angularSrcModuleNgTouch',
'test/ngTouch/**/*.js'
],

'karmaJquery': [
Expand Down Expand Up @@ -232,6 +295,16 @@ var angularFiles = {
});
});

angularFiles['angularSrcModuleNgAnimate'] = angularFiles['angularModules']['ngAnimate'];
angularFiles['angularSrcModuleNgAria'] = angularFiles['angularModules']['ngAria'];
angularFiles['angularSrcModuleNgCookies'] = angularFiles['angularModules']['ngCookies'];
angularFiles['angularSrcModuleNgMessageFormat'] = angularFiles['angularModules']['ngMessageFormat'];
angularFiles['angularSrcModuleNgMessages'] = angularFiles['angularModules']['ngMessages'];
angularFiles['angularSrcModuleNgResource'] = angularFiles['angularModules']['ngResource'];
angularFiles['angularSrcModuleNgRoute'] = angularFiles['angularModules']['ngRoute'];
angularFiles['angularSrcModuleNgSanitize'] = angularFiles['angularModules']['ngSanitize'];
angularFiles['angularSrcModuleNgTouch'] = angularFiles['angularModules']['ngTouch'];

angularFiles['angularSrcModules'] = [].concat(
angularFiles['angularModules']['ngAnimate'],
angularFiles['angularModules']['ngMessageFormat'],
Expand Down
11 changes: 4 additions & 7 deletions karma-modules.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ var angularFiles = require('./angularFiles');
var sharedConfig = require('./karma-shared.conf');

module.exports = function(config) {
sharedConfig(config, {testName: 'AngularJS: modules', logFile: 'karma-modules.log'});
var angularModule = process.env.KARMA_MODULE;

config.set({
files: angularFiles.mergeFilesFor('karmaModules'),
sharedConfig(config, {testName: 'AngularJS: module ' + angularModule, logFile: 'karma-modules-' + angularModule + '.log'});

junitReporter: {
outputFile: 'test_out/modules.xml',
suite: 'modules'
}
config.set({
files: angularFiles.mergeFilesFor('karmaModules-' + angularModule)
});
};
11 changes: 10 additions & 1 deletion lib/grunt/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,16 @@ module.exports = function(grunt) {


grunt.registerMultiTask('tests', '**Use `grunt test` instead**', function() {
util.startKarma(this.data, true, this.async());
var configFile;

if (this.nameArgs.includes('modules')) {
configFile = 'karma-modules.conf.js';
process.env.KARMA_MODULE = this.data;
} else {
configFile = this.data;
}

util.startKarma(configFile, true, this.async());
});


Expand Down
2 changes: 1 addition & 1 deletion lib/saucelabs/start_tunnel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -e
# Curl and run this script as part of your .travis.yml before_script section:
# before_script:
# - curl https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash
SC_VERSION="4.4.12"
SC_VERSION="4.5.1"
CONNECT_URL="https://saucelabs.com/downloads/sc-$SC_VERSION-linux.tar.gz"
CONNECT_DIR="/tmp/sauce-connect-$RANDOM"
CONNECT_DOWNLOAD="sc-$SC_VERSION-linux.tar.gz"
Expand Down
3 changes: 2 additions & 1 deletion src/ngAnimate/ngAnimateSwap.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ var ngAnimateSwapDirective = ['$animate', function($animate) {
restrict: 'A',
transclude: 'element',
terminal: true,
priority: 600, // we use 600 here to ensure that the directive is caught before others
priority: 550, // We use 550 here to ensure that the directive is caught before others,
// but after `ngIf` (at priority 600).
link: function(scope, $element, attrs, ctrl, $transclude) {
var previousElement, previousScope;
scope.$watchCollection(attrs.ngAnimateSwap || attrs['for'], function(value) {
Expand Down
8 changes: 4 additions & 4 deletions src/ngMessageFormat/messageFormatService.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ var noop;
var toJson;
var $$stringify;

var module = window['angular']['module']('ngMessageFormat', ['ng']);
module['info']({ 'angularVersion': '"NG_VERSION_FULL"' });
module['factory']('$$messageFormat', $$MessageFormatFactory);
module['config'](['$provide', function($provide) {
var ngModule = window['angular']['module']('ngMessageFormat', ['ng']);
ngModule['info']({ 'angularVersion': '"NG_VERSION_FULL"' });
ngModule['factory']('$$messageFormat', $$MessageFormatFactory);
ngModule['config'](['$provide', function($provide) {
$interpolateMinErr = window['angular']['$interpolateMinErr'];
isFunction = window['angular']['isFunction'];
noop = window['angular']['noop'];
Expand Down
18 changes: 9 additions & 9 deletions src/ngMock/angular-mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -1619,20 +1619,20 @@ function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {

/**
* @ngdoc method
* @name $httpBackend#matchLatestDefinition
* @name $httpBackend#matchLatestDefinitionEnabled
* @description
* This method can be used to change which mocked responses `$httpBackend` returns, when defining
* them with {@link ngMock.$httpBackend#when $httpBackend.when()} (and shortcut methods).
* By default, `$httpBackend` returns the first definition that matches. When setting
* `$http.matchLatestDefinition(true)`, it will use the last response that matches, i.e. the
* `$http.matchLatestDefinitionEnabled(true)`, it will use the last response that matches, i.e. the
* one that was added last.
*
* ```js
* hb.when('GET', '/url1').respond(200, 'content', {});
* hb.when('GET', '/url1').respond(201, 'another', {});
* hb('GET', '/url1'); // receives "content"
*
* $http.matchLatestDefinition(true)
* $http.matchLatestDefinitionEnabled(true)
* hb('GET', '/url1'); // receives "another"
*
* hb.when('GET', '/url1').respond(201, 'onemore', {});
Expand All @@ -1641,7 +1641,7 @@ function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {
*
* This is useful if a you have a default response that is overriden inside specific tests.
*
* Note that different from config methods on providers, `matchLatestDefinition()` can be changed
* Note that different from config methods on providers, `matchLatestDefinitionEnabled()` can be changed
* even when the application is already running.
*
* @param {Boolean=} value value to set, either `true` or `false`. Default is `false`.
Expand All @@ -1650,7 +1650,7 @@ function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {
* as a getter
*/
$httpBackend.matchLatestDefinitionEnabled = function(value) {
if (isDefined(value)) {
if (angular.isDefined(value)) {
matchLatestDefinition = value;
return this;
} else {
Expand Down Expand Up @@ -2919,21 +2919,21 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
*/
/**
* @ngdoc method
* @name $httpBackend#matchLatestDefinition
* @name $httpBackend#matchLatestDefinitionEnabled
* @module ngMockE2E
* @description
* This method can be used to change which mocked responses `$httpBackend` returns, when defining
* them with {@link ngMock.$httpBackend#when $httpBackend.when()} (and shortcut methods).
* By default, `$httpBackend` returns the first definition that matches. When setting
* `$http.matchLatestDefinition(true)`, it will use the last response that matches, i.e. the
* `$http.matchLatestDefinitionEnabled(true)`, it will use the last response that matches, i.e. the
* one that was added last.
*
* ```js
* hb.when('GET', '/url1').respond(200, 'content', {});
* hb.when('GET', '/url1').respond(201, 'another', {});
* hb('GET', '/url1'); // receives "content"
*
* $http.matchLatestDefinition(true)
* $http.matchLatestDefinitionEnabled(true)
* hb('GET', '/url1'); // receives "another"
*
* hb.when('GET', '/url1').respond(201, 'onemore', {});
Expand All @@ -2942,7 +2942,7 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
*
* This is useful if a you have a default response that is overriden inside specific tests.
*
* Note that different from config methods on providers, `matchLatestDefinition()` can be changed
* Note that different from config methods on providers, `matchLatestDefinitionEnabled()` can be changed
* even when the application is already running.
*
* @param {Boolean=} value value to set, either `true` or `false`. Default is `false`.
Expand Down
Loading