From a05f7b2d763039868cf3926f9e9c32ad17d1f7bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matias=20Niemel=C3=A4?= Date: Mon, 11 Jul 2016 10:55:47 -0700 Subject: [PATCH] refactor(animations): move MockAnimationPlayer back into core (#9966) Closes #9966 --- .../core/test/animation/active_animations_players_map_spec.ts | 2 +- .../core/test/animation/animation_group_player_spec.ts | 2 +- .../core/test/animation/animation_integration_spec.ts | 2 +- .../core/test/animation/animation_sequence_player_spec.ts | 2 +- .../testing/mock_animation_player.ts | 4 ++-- modules/@angular/core/testing/testing_internal.ts | 3 ++- 6 files changed, 8 insertions(+), 7 deletions(-) rename modules/@angular/{platform-browser => core}/testing/mock_animation_player.ts (91%) diff --git a/modules/@angular/core/test/animation/active_animations_players_map_spec.ts b/modules/@angular/core/test/animation/active_animations_players_map_spec.ts index df8b44f850..627953267f 100644 --- a/modules/@angular/core/test/animation/active_animations_players_map_spec.ts +++ b/modules/@angular/core/test/animation/active_animations_players_map_spec.ts @@ -9,10 +9,10 @@ import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter'; import {el} from '@angular/platform-browser/testing/browser_util'; -import {MockAnimationPlayer} from '../../../platform-browser/testing/mock_animation_player'; import {ViewAnimationMap} from '../../src/animation/view_animation_map'; import {isPresent} from '../../src/facade/lang'; import {fakeAsync, flushMicrotasks} from '../../testing'; +import {MockAnimationPlayer} from '../../testing/mock_animation_player'; import {AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '../../testing/testing_internal'; export function main() { diff --git a/modules/@angular/core/test/animation/animation_group_player_spec.ts b/modules/@angular/core/test/animation/animation_group_player_spec.ts index 99b962a10d..7a3064d4b6 100644 --- a/modules/@angular/core/test/animation/animation_group_player_spec.ts +++ b/modules/@angular/core/test/animation/animation_group_player_spec.ts @@ -6,10 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import {MockAnimationPlayer} from '../../../platform-browser/testing/mock_animation_player'; import {AnimationGroupPlayer} from '../../src/animation/animation_group_player'; import {isPresent} from '../../src/facade/lang'; import {fakeAsync, flushMicrotasks} from '../../testing'; +import {MockAnimationPlayer} from '../../testing/mock_animation_player'; import {AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '../../testing/testing_internal'; export function main() { diff --git a/modules/@angular/core/test/animation/animation_integration_spec.ts b/modules/@angular/core/test/animation/animation_integration_spec.ts index 18dd4467d6..5739f6b11c 100644 --- a/modules/@angular/core/test/animation/animation_integration_spec.ts +++ b/modules/@angular/core/test/animation/animation_integration_spec.ts @@ -12,7 +12,6 @@ import {TestComponentBuilder} from '@angular/compiler/testing'; import {AnimationDriver} from '@angular/platform-browser/src/dom/animation_driver'; import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter'; import {MockAnimationDriver} from '@angular/platform-browser/testing/mock_animation_driver'; -import {MockAnimationPlayer} from '@angular/platform-browser/testing/mock_animation_player'; import {Component} from '../../index'; import {DEFAULT_STATE} from '../../src/animation/animation_constants'; @@ -23,6 +22,7 @@ import {AnimationEntryMetadata, animate, group, keyframes, sequence, state, styl import {AUTO_STYLE} from '../../src/animation/metadata'; import {IS_DART, isArray, isPresent} from '../../src/facade/lang'; import {configureCompiler, configureModule, fakeAsync, flushMicrotasks, tick} from '../../testing'; +import {MockAnimationPlayer} from '../../testing/mock_animation_player'; import {AsyncTestCompleter, beforeEach, beforeEachProviders, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '../../testing/testing_internal'; export function main() { diff --git a/modules/@angular/core/test/animation/animation_sequence_player_spec.ts b/modules/@angular/core/test/animation/animation_sequence_player_spec.ts index 589858bfa9..e5fec37f5f 100644 --- a/modules/@angular/core/test/animation/animation_sequence_player_spec.ts +++ b/modules/@angular/core/test/animation/animation_sequence_player_spec.ts @@ -6,10 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import {MockAnimationPlayer} from '../../../platform-browser/testing/mock_animation_player'; import {AnimationSequencePlayer} from '../../src/animation/animation_sequence_player'; import {isPresent} from '../../src/facade/lang'; import {fakeAsync, flushMicrotasks} from '../../testing'; +import {MockAnimationPlayer} from '../../testing/mock_animation_player'; import {AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '../../testing/testing_internal'; export function main() { diff --git a/modules/@angular/platform-browser/testing/mock_animation_player.ts b/modules/@angular/core/testing/mock_animation_player.ts similarity index 91% rename from modules/@angular/platform-browser/testing/mock_animation_player.ts rename to modules/@angular/core/testing/mock_animation_player.ts index e82c2572ad..fe1bdf69d8 100644 --- a/modules/@angular/platform-browser/testing/mock_animation_player.ts +++ b/modules/@angular/core/testing/mock_animation_player.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {AnimationPlayer} from '../../core/src/animation/animation_player'; -import {isPresent} from '../../core/src/facade/lang'; +import {AnimationPlayer} from '../src/animation/animation_player'; +import {isPresent} from '../src/facade/lang'; export class MockAnimationPlayer implements AnimationPlayer { private _subscriptions: any[] /** TODO #9100 */ = []; diff --git a/modules/@angular/core/testing/testing_internal.ts b/modules/@angular/core/testing/testing_internal.ts index 42343e8f75..b666f42bff 100644 --- a/modules/@angular/core/testing/testing_internal.ts +++ b/modules/@angular/core/testing/testing_internal.ts @@ -13,10 +13,11 @@ import {Math, global, isFunction, isPromise} from '../src/facade/lang'; import {AsyncTestCompleter} from './async_test_completer'; import {getTestInjector, inject} from './test_injector'; -export {MockAnimationPlayer} from '@angular/platform-browser/testing/mock_animation_player'; export {AsyncTestCompleter} from './async_test_completer'; +export {MockAnimationPlayer} from './mock_animation_player'; export {inject} from './test_injector'; export {expect} from './testing'; + export * from './logger'; export * from './ng_zone_mock'; export * from './mock_application_ref';