repackaging: all the repackaging changes squashed
This commit is contained in:
@ -1,25 +1,21 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
xdescribe,
|
||||
describe,
|
||||
dispatchEvent,
|
||||
expect,
|
||||
iit,
|
||||
inject,
|
||||
beforeEachProviders,
|
||||
it,
|
||||
xit,
|
||||
TestComponentBuilder
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {TestComponentBuilder} from '@angular/compiler/testing';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {SpyRouter, SpyLocation} from '../spies';
|
||||
|
||||
import {provide, Component} from 'angular2/core';
|
||||
import {By} from 'angular2/platform/common_dom';
|
||||
import {Location} from 'angular2/platform/common';
|
||||
|
||||
import {provide, Component} from '@angular/core';
|
||||
import {Location} from '@angular/common';
|
||||
import {
|
||||
Router,
|
||||
RouteRegistry,
|
||||
@ -28,10 +24,10 @@ import {
|
||||
Route,
|
||||
RouteParams,
|
||||
ComponentInstruction
|
||||
} from 'angular2/router';
|
||||
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {ResolvedInstruction} from 'angular2/src/router/instruction';
|
||||
} from '@angular/router';
|
||||
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||
import {ResolvedInstruction} from '@angular/router/src/instruction';
|
||||
import {By} from '@angular/platform-browser/src/dom/debug/by';
|
||||
|
||||
let dummyInstruction = new ResolvedInstruction(
|
||||
new ComponentInstruction('detail', [], null, null, true, '0', null, 'Detail'), null, {});
|
||||
@ -54,7 +50,7 @@ export function main() {
|
||||
testComponent.detectChanges();
|
||||
let anchorElement =
|
||||
testComponent.debugElement.query(By.css('a.detail-view')).nativeElement;
|
||||
expect(DOM.getAttribute(anchorElement, 'href')).toEqual('detail');
|
||||
expect(getDOM().getAttribute(anchorElement, 'href')).toEqual('detail');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
|
@ -1,66 +0,0 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
describe,
|
||||
it,
|
||||
iit,
|
||||
ddescribe,
|
||||
expect,
|
||||
inject,
|
||||
beforeEach,
|
||||
beforeEachBindings,
|
||||
SpyObject
|
||||
} from 'angular2/testing_internal';
|
||||
|
||||
import {Injector, provide} from 'angular2/core';
|
||||
|
||||
import {parseRouterLinkExpression} from 'angular2/src/router/directives/router_link_transform';
|
||||
import {Unparser} from '../../compiler/expression_parser/unparser';
|
||||
import {Parser} from 'angular2/src/compiler/expression_parser/parser';
|
||||
|
||||
export function main() {
|
||||
function check(parser: Parser, input: string, expectedValue: string) {
|
||||
let ast = parseRouterLinkExpression(parser, input);
|
||||
expect(new Unparser().unparse(ast)).toEqual(expectedValue);
|
||||
}
|
||||
|
||||
describe('parseRouterLinkExpression', () => {
|
||||
it("should parse simple routes", inject([Parser], (p) => {
|
||||
check(p, `User`, `["User"]`);
|
||||
check(p, `/User`, `["/User"]`);
|
||||
check(p, `./User`, `["./User"]`);
|
||||
check(p, `../../User`, `["../../User"]`);
|
||||
}));
|
||||
|
||||
it("should trim the string", inject([Parser], (p) => { check(p, ` User `, `["User"]`); }));
|
||||
|
||||
it("should parse parameters", inject([Parser], (p) => {
|
||||
check(p, `./User(id: value, name: 'Bob')`, `["./User", {id: value, name: "Bob"}]`);
|
||||
}));
|
||||
|
||||
it("should parse nested routes", inject([Parser], (p) => {
|
||||
check(p, `User/Modal`, `["User", "Modal"]`);
|
||||
check(p, `/User/Modal`, `["/User", "Modal"]`);
|
||||
}));
|
||||
|
||||
it("should parse auxiliary routes", inject([Parser], (p) => {
|
||||
check(p, `User[Modal]`, `["User", ["Modal"]]`);
|
||||
check(p, `User[Modal1][Modal2]`, `["User", ["Modal1"], ["Modal2"]]`);
|
||||
check(p, `User[Modal1[Modal2]]`, `["User", ["Modal1", ["Modal2"]]]`);
|
||||
}));
|
||||
|
||||
it("should parse combinations", inject([Parser], (p) => {
|
||||
check(p, `./User(id: value)/Post(title: 'blog')`, `["./User", {id: value}, "Post", {title: "blog"}]`);
|
||||
check(p, `./User[Modal(param: value)]`, `["./User", ["Modal", {param: value}]]`);
|
||||
}));
|
||||
|
||||
it("should error on empty fixed parts", inject([Parser], (p) => {
|
||||
expect(() => parseRouterLinkExpression(p, `./(id: value, name: 'Bob')`))
|
||||
.toThrowErrorWith("Invalid router link");
|
||||
}));
|
||||
|
||||
it("should error on multiple slashes", inject([Parser], (p) => {
|
||||
expect(() => parseRouterLinkExpression(p, `//User`))
|
||||
.toThrowErrorWith("Invalid router link");
|
||||
}));
|
||||
});
|
||||
}
|
@ -8,7 +8,7 @@ import {
|
||||
TEST_ROUTER_PROVIDERS
|
||||
} from './util';
|
||||
|
||||
import {beforeEachProviders, describe} from 'angular2/testing_internal';
|
||||
import {beforeEachProviders, describe} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {registerSpecs} from './impl/async_route_spec_impl';
|
||||
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
import {
|
||||
beforeEachProviders,
|
||||
describe,
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {registerSpecs} from './impl/aux_route_spec_impl';
|
||||
|
||||
|
@ -1,46 +1,46 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
beforeEachProviders,
|
||||
ddescribe,
|
||||
describe,
|
||||
expect,
|
||||
iit,
|
||||
flushMicrotasks,
|
||||
inject,
|
||||
it,
|
||||
xdescribe,
|
||||
TestComponentBuilder,
|
||||
xit,
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
import {TestComponentBuilder} from '@angular/compiler/testing';
|
||||
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {APP_BASE_HREF, LocationStrategy} from 'angular2/platform/common';
|
||||
import {Component, Directive} from 'angular2/src/core/metadata';
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {Console} from 'angular2/src/core/console';
|
||||
import {provide} from 'angular2/core';
|
||||
import {DOCUMENT} from 'angular2/src/platform/dom/dom_tokens';
|
||||
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||
import {APP_BASE_HREF, LocationStrategy} from '@angular/common';
|
||||
import {Component, Directive} from '@angular/core/src/metadata';
|
||||
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||
import {Console} from '@angular/core/src/console';
|
||||
import {provide} from '@angular/core';
|
||||
import {DOCUMENT} from '@angular/platform-browser/src/dom/dom_tokens';
|
||||
import {
|
||||
RouteConfig,
|
||||
Route,
|
||||
Redirect,
|
||||
AuxRoute
|
||||
} from 'angular2/src/router/route_config/route_config_decorator';
|
||||
import {PromiseWrapper} from 'angular2/src/facade/async';
|
||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
||||
} from '../../../router/src/route_config/route_config_decorator';
|
||||
import {PromiseWrapper} from '../../src/facade/async';
|
||||
import {BaseException, WrappedException} from '../../src/facade/exceptions';
|
||||
import {
|
||||
ROUTER_PROVIDERS,
|
||||
ROUTER_PRIMARY_COMPONENT,
|
||||
RouteParams,
|
||||
Router,
|
||||
ROUTER_DIRECTIVES
|
||||
} from 'angular2/router';
|
||||
} from '@angular/router';
|
||||
|
||||
import {MockLocationStrategy} from 'angular2/src/mock/mock_location_strategy';
|
||||
import {ApplicationRef} from 'angular2/src/core/application_ref';
|
||||
import {MockApplicationRef} from 'angular2/src/mock/mock_application_ref';
|
||||
import {MockLocationStrategy} from '@angular/common/testing';
|
||||
import {ApplicationRef} from '@angular/core/src/application_ref';
|
||||
import {MockApplicationRef} from '@angular/core/testing';
|
||||
|
||||
//noinspection JSAnnotator
|
||||
class DummyConsole implements Console {
|
||||
log(message) {}
|
||||
warn(message) {}
|
||||
@ -57,9 +57,9 @@ export function main() {
|
||||
// do not refactor out the `bootstrap` functionality. We still want to
|
||||
// keep this test around so we can ensure that bootstrap a router works
|
||||
it('should bootstrap a simple app', inject([AsyncTestCompleter], (async) => {
|
||||
var fakeDoc = DOM.createHtmlDocument();
|
||||
var el = DOM.createElement('app-cmp', fakeDoc);
|
||||
DOM.appendChild(fakeDoc.body, el);
|
||||
var fakeDoc = getDOM().createHtmlDocument();
|
||||
var el = getDOM().createElement('app-cmp', fakeDoc);
|
||||
getDOM().appendChild(fakeDoc.body, el);
|
||||
|
||||
bootstrap(AppCmp,
|
||||
[
|
||||
|
@ -1,23 +1,20 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
beforeEachProviders,
|
||||
expect,
|
||||
iit,
|
||||
flushMicrotasks,
|
||||
inject,
|
||||
it,
|
||||
TestComponentBuilder,
|
||||
ComponentFixture,
|
||||
xit,
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {By} from 'angular2/platform/common_dom';
|
||||
import {Location} from 'angular2/platform/common';
|
||||
import {Location} from '@angular/common';
|
||||
|
||||
import {specs, compile, TEST_ROUTER_PROVIDERS, clickOnElement, getHref} from '../util';
|
||||
|
||||
import {Router, AsyncRoute, Route} from 'angular2/router';
|
||||
import {Router, AsyncRoute, Route} from '@angular/router';
|
||||
|
||||
import {
|
||||
HelloCmp,
|
||||
@ -34,6 +31,7 @@ import {
|
||||
parentWithDefaultCmpLoader,
|
||||
asyncRouteDataCmp
|
||||
} from './fixture_components';
|
||||
import {By} from '../../../../platform-browser/src/dom/debug/by';
|
||||
|
||||
function getLinkElement(rtc: ComponentFixture<any>) {
|
||||
return rtc.debugElement.query(By.css('a')).nativeElement;
|
||||
|
@ -1,34 +1,24 @@
|
||||
import {
|
||||
ComponentFixture,
|
||||
AsyncTestCompleter,
|
||||
TestComponentBuilder,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
xdescribe,
|
||||
describe,
|
||||
el,
|
||||
expect,
|
||||
iit,
|
||||
inject,
|
||||
beforeEachProviders,
|
||||
it,
|
||||
xit
|
||||
} from 'angular2/testing_internal';
|
||||
|
||||
import {By} from 'angular2/platform/common_dom';
|
||||
import {Location} from 'angular2/platform/common';
|
||||
import {provide, Component, Injector, Inject} from 'angular2/core';
|
||||
|
||||
import {Router, ROUTER_DIRECTIVES, RouteParams, RouteData} from 'angular2/router';
|
||||
import {
|
||||
RouteConfig,
|
||||
Route,
|
||||
AuxRoute,
|
||||
Redirect
|
||||
} from 'angular2/src/router/route_config/route_config_decorator';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {Location} from '@angular/common';
|
||||
import {Component} from '@angular/core';
|
||||
import {Router, ROUTER_DIRECTIVES, Route, AuxRoute, RouteConfig} from '@angular/router';
|
||||
import {specs, compile, clickOnElement, getHref} from '../util';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {BaseException} from '../../../src/facade/exceptions';
|
||||
import {By} from '@angular/platform-browser/src/dom/debug/by';
|
||||
|
||||
function getLinkElement(rtc: ComponentFixture<any>, linkIndex: number = 0) {
|
||||
return rtc.debugElement.queryAll(By.css('a'))[linkIndex].nativeElement;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, ComponentRef, ViewContainerRef, ViewChild} from 'angular2/core';
|
||||
import {Component, ComponentRef, ViewContainerRef, ViewChild} from '@angular/core';
|
||||
import {
|
||||
AsyncRoute,
|
||||
Route,
|
||||
@ -7,10 +7,10 @@ import {
|
||||
RouteParams,
|
||||
RouteData,
|
||||
ROUTER_DIRECTIVES
|
||||
} from 'angular2/router';
|
||||
import {PromiseWrapper} from 'angular2/src/facade/async';
|
||||
import {isPresent} from 'angular2/src/facade/lang';
|
||||
import {DynamicComponentLoader} from 'angular2/src/core/linker/dynamic_component_loader';
|
||||
} from '@angular/router';
|
||||
import {PromiseWrapper} from '../../../src/facade/async';
|
||||
import {isPresent} from '../../../src/facade/lang';
|
||||
import {DynamicComponentLoader} from '@angular/core/src/linker/dynamic_component_loader';
|
||||
|
||||
@Component({selector: 'goodbye-cmp', template: `{{farewell}}`})
|
||||
export class GoodbyeCmp {
|
||||
|
@ -1,23 +1,18 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
beforeEachProviders,
|
||||
expect,
|
||||
iit,
|
||||
flushMicrotasks,
|
||||
inject,
|
||||
it,
|
||||
TestComponentBuilder,
|
||||
ComponentFixture,
|
||||
xit,
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||
|
||||
import {specs, compile, TEST_ROUTER_PROVIDERS, clickOnElement, getHref} from '../util';
|
||||
|
||||
import {By} from 'angular2/platform/common_dom';
|
||||
import {Location} from 'angular2/platform/common';
|
||||
import {Router, Route} from 'angular2/router';
|
||||
|
||||
import {Location} from '@angular/common';
|
||||
import {Router, Route} from '@angular/router';
|
||||
import {
|
||||
HelloCmp,
|
||||
UserCmp,
|
||||
@ -26,8 +21,8 @@ import {
|
||||
ParentWithDefaultCmp,
|
||||
DynamicLoaderCmp
|
||||
} from './fixture_components';
|
||||
|
||||
import {PromiseWrapper} from 'angular2/src/facade/async';
|
||||
import {PromiseWrapper} from '../../../src/facade/async';
|
||||
import {By} from '@angular/platform-browser/src/dom/debug/by';
|
||||
|
||||
|
||||
function getLinkElement(rtc: ComponentFixture<any>) {
|
||||
|
@ -1,37 +1,35 @@
|
||||
import {
|
||||
ComponentFixture,
|
||||
AsyncTestCompleter,
|
||||
TestComponentBuilder,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
xdescribe,
|
||||
describe,
|
||||
el,
|
||||
expect,
|
||||
iit,
|
||||
inject,
|
||||
beforeEachProviders,
|
||||
it,
|
||||
xit
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {provide, Component, Injector, Inject} from 'angular2/core';
|
||||
import {isPresent} from 'angular2/src/facade/lang';
|
||||
import {provide, Component, Injector, Inject} from '@angular/core';
|
||||
import {isPresent} from '../../src/facade/lang';
|
||||
import {
|
||||
PromiseWrapper,
|
||||
PromiseCompleter,
|
||||
EventEmitter,
|
||||
ObservableWrapper
|
||||
} from 'angular2/src/facade/async';
|
||||
} from '../../src/facade/async';
|
||||
|
||||
import {Router, RouterOutlet, RouterLink, RouteParams} from 'angular2/router';
|
||||
import {Router, RouterOutlet, RouterLink, RouteParams} from '@angular/router';
|
||||
import {
|
||||
RouteConfig,
|
||||
Route,
|
||||
AuxRoute,
|
||||
AsyncRoute,
|
||||
Redirect
|
||||
} from 'angular2/src/router/route_config/route_config_decorator';
|
||||
} from '../../../router/src/route_config/route_config_decorator';
|
||||
|
||||
import {
|
||||
OnActivate,
|
||||
@ -39,9 +37,9 @@ import {
|
||||
OnReuse,
|
||||
CanDeactivate,
|
||||
CanReuse
|
||||
} from 'angular2/src/router/interfaces';
|
||||
import {CanActivate} from 'angular2/src/router/lifecycle/lifecycle_annotations';
|
||||
import {ComponentInstruction} from 'angular2/src/router/instruction';
|
||||
} from '../../../router/src/interfaces';
|
||||
import {CanActivate} from '../../../router/src/lifecycle/lifecycle_annotations';
|
||||
import {ComponentInstruction} from '../../../router/src/instruction';
|
||||
|
||||
|
||||
import {TEST_ROUTER_PROVIDERS, RootCmp, compile} from './util';
|
||||
|
@ -1,32 +1,30 @@
|
||||
import {
|
||||
ComponentFixture,
|
||||
AsyncTestCompleter,
|
||||
TestComponentBuilder,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
xdescribe,
|
||||
describe,
|
||||
el,
|
||||
expect,
|
||||
iit,
|
||||
inject,
|
||||
beforeEachProviders,
|
||||
it,
|
||||
xit
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {provide, Component, Injector, Inject} from 'angular2/core';
|
||||
import {Location} from 'angular2/platform/common';
|
||||
import {PromiseWrapper, TimerWrapper} from 'angular2/src/facade/async';
|
||||
import {provide, Component, Injector, Inject} from '@angular/core';
|
||||
import {Location} from '@angular/common';
|
||||
import {PromiseWrapper, TimerWrapper} from '../../src/facade/async';
|
||||
|
||||
import {Router, RouterOutlet, RouterLink, RouteParams, RouteData} from 'angular2/router';
|
||||
import {Router, RouterOutlet, RouterLink, RouteParams, RouteData} from '@angular/router';
|
||||
import {
|
||||
RouteConfig,
|
||||
Route,
|
||||
AuxRoute,
|
||||
AsyncRoute,
|
||||
Redirect
|
||||
} from 'angular2/src/router/route_config/route_config_decorator';
|
||||
} from '../../../router/src/route_config/route_config_decorator';
|
||||
|
||||
import {TEST_ROUTER_PROVIDERS, RootCmp, compile} from './util';
|
||||
|
||||
|
@ -1,29 +1,27 @@
|
||||
import {
|
||||
ComponentFixture,
|
||||
AsyncTestCompleter,
|
||||
TestComponentBuilder,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
xdescribe,
|
||||
describe,
|
||||
el,
|
||||
expect,
|
||||
iit,
|
||||
inject,
|
||||
beforeEachProviders,
|
||||
it,
|
||||
xit
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {Router, RouterOutlet, RouterLink, RouteParams, RouteData} from 'angular2/router';
|
||||
import {Router, RouterOutlet, RouterLink, RouteParams, RouteData} from '@angular/router';
|
||||
import {
|
||||
RouteConfig,
|
||||
Route,
|
||||
AuxRoute,
|
||||
AsyncRoute,
|
||||
Redirect
|
||||
} from 'angular2/src/router/route_config/route_config_decorator';
|
||||
import {Location} from 'angular2/platform/common';
|
||||
} from '../../../router/src/route_config/route_config_decorator';
|
||||
import {Location} from '@angular/common';
|
||||
|
||||
import {TEST_ROUTER_PROVIDERS, RootCmp, compile} from './util';
|
||||
import {HelloCmp, GoodbyeCmp, RedirectToParentCmp} from './impl/fixture_components';
|
||||
|
@ -1,30 +1,25 @@
|
||||
import {
|
||||
ComponentFixture,
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
xdescribe,
|
||||
describe,
|
||||
dispatchEvent,
|
||||
expect,
|
||||
iit,
|
||||
inject,
|
||||
beforeEachProviders,
|
||||
it,
|
||||
xit,
|
||||
TestComponentBuilder,
|
||||
SpyObject
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||
|
||||
import {By} from 'angular2/platform/common_dom';
|
||||
import {Location} from 'angular2/platform/common';
|
||||
import {NumberWrapper} from 'angular2/src/facade/lang';
|
||||
import {PromiseWrapper} from 'angular2/src/facade/async';
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {Location} from '@angular/common';
|
||||
import {NumberWrapper} from '../../src/facade/lang';
|
||||
import {PromiseWrapper} from '../../src/facade/async';
|
||||
import {ListWrapper} from '../../src/facade/collection';
|
||||
|
||||
import {provide, Component} from 'angular2/core';
|
||||
import {provide, Component} from '@angular/core';
|
||||
|
||||
import {SpyLocation} from 'angular2/src/mock/location_mock';
|
||||
import {
|
||||
Router,
|
||||
RouteRegistry,
|
||||
@ -37,12 +32,12 @@ import {
|
||||
RouteConfig,
|
||||
ROUTER_DIRECTIVES,
|
||||
ROUTER_PRIMARY_COMPONENT
|
||||
} from 'angular2/router';
|
||||
import {RootRouter} from 'angular2/src/router/router';
|
||||
} from '@angular/router';
|
||||
import {RootRouter} from '@angular/router/src/router';
|
||||
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {TEMPLATE_TRANSFORMS} from 'angular2/compiler';
|
||||
import {RouterLinkTransform} from 'angular2/src/router/directives/router_link_transform';
|
||||
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||
import {By} from '@angular/platform-browser/src/dom/debug/by';
|
||||
import {SpyLocation} from '@angular/common/testing';
|
||||
|
||||
export function main() {
|
||||
describe('routerLink directive', function() {
|
||||
@ -54,9 +49,8 @@ export function main() {
|
||||
beforeEachProviders(() => [
|
||||
RouteRegistry,
|
||||
provide(Location, {useClass: SpyLocation}),
|
||||
provide(ROUTER_PRIMARY_COMPONENT, {useValue: MyComp}),
|
||||
provide(ROUTER_PRIMARY_COMPONENT, {useValue: MyComp7}),
|
||||
provide(Router, {useClass: RootRouter}),
|
||||
provide(TEMPLATE_TRANSFORMS, {useClass: RouterLinkTransform, multi: true})
|
||||
]);
|
||||
|
||||
beforeEach(inject([TestComponentBuilder, Router, Location],
|
||||
@ -67,8 +61,8 @@ export function main() {
|
||||
}));
|
||||
|
||||
function compile(template: string = "<router-outlet></router-outlet>") {
|
||||
return tcb.overrideTemplate(MyComp, ('<div>' + template + '</div>'))
|
||||
.createAsync(MyComp)
|
||||
return tcb.overrideTemplate(MyComp7, ('<div>' + template + '</div>'))
|
||||
.createAsync(MyComp7)
|
||||
.then((tc) => { fixture = tc; });
|
||||
}
|
||||
|
||||
@ -202,13 +196,13 @@ export function main() {
|
||||
// TODO(juliemr): This should be one By.css('book-cmp a') query, but the parse5
|
||||
// adapter
|
||||
// can't handle css child selectors.
|
||||
expect(DOM.getAttribute(fixture.debugElement.query(By.css('book-cmp'))
|
||||
expect(getDOM().getAttribute(fixture.debugElement.query(By.css('book-cmp'))
|
||||
.query(By.css('a'))
|
||||
.nativeElement,
|
||||
'href'))
|
||||
.toEqual('/book/1984/page/100');
|
||||
|
||||
expect(DOM.getAttribute(fixture.debugElement.query(By.css('page-cmp'))
|
||||
expect(getDOM().getAttribute(fixture.debugElement.query(By.css('page-cmp'))
|
||||
.query(By.css('a'))
|
||||
.nativeElement,
|
||||
'href'))
|
||||
@ -243,8 +237,8 @@ export function main() {
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
var link1 = DOM.querySelector(element, '.child-link');
|
||||
var link2 = DOM.querySelector(element, '.better-child-link');
|
||||
var link1 = getDOM().querySelector(element, '.child-link');
|
||||
var link2 = getDOM().querySelector(element, '.better-child-link');
|
||||
|
||||
expect(link1).not.toHaveCssClass('router-link-active');
|
||||
expect(link2).not.toHaveCssClass('router-link-active');
|
||||
@ -278,8 +272,8 @@ export function main() {
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
var link1 = DOM.querySelector(element, '.child-link');
|
||||
var link2 = DOM.querySelector(element, '.child-with-grandchild-link');
|
||||
var link1 = getDOM().querySelector(element, '.child-link');
|
||||
var link2 = getDOM().querySelector(element, '.child-with-grandchild-link');
|
||||
|
||||
expect(link1).not.toHaveCssClass('router-link-active');
|
||||
expect(link2).not.toHaveCssClass('router-link-active');
|
||||
@ -290,8 +284,8 @@ export function main() {
|
||||
expect(link1).not.toHaveCssClass('router-link-active');
|
||||
expect(link2).toHaveCssClass('router-link-active');
|
||||
|
||||
var link3 = DOM.querySelector(element, '.grandchild-link');
|
||||
var link4 = DOM.querySelector(element, '.better-grandchild-link');
|
||||
var link3 = getDOM().querySelector(element, '.grandchild-link');
|
||||
var link4 = getDOM().querySelector(element, '.better-grandchild-link');
|
||||
|
||||
expect(link3).toHaveCssClass('router-link-active');
|
||||
expect(link4).not.toHaveCssClass('router-link-active');
|
||||
@ -301,31 +295,14 @@ export function main() {
|
||||
router.navigateByUrl('/child-with-grandchild/grandchild?extra=0');
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
describe('router link dsl', () => {
|
||||
it('should generate link hrefs with params', inject([AsyncTestCompleter], (async) => {
|
||||
compile('<a href="hello" [routerLink]="route:./User(name: name)">{{name}}</a>')
|
||||
.then((_) => router.config(
|
||||
[new Route({path: '/user/:name', component: UserCmp, name: 'User'})]))
|
||||
.then((_) => router.navigateByUrl('/a/b'))
|
||||
.then((_) => {
|
||||
fixture.debugElement.componentInstance.name = 'brian';
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('brian');
|
||||
expect(getHref(fixture)).toEqual('/user/brian');
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
describe('when clicked', () => {
|
||||
|
||||
var clickOnElement = function(view) {
|
||||
var anchorEl = fixture.debugElement.query(By.css('a')).nativeElement;
|
||||
var dispatchedEvent = DOM.createMouseEvent('click');
|
||||
DOM.dispatchEvent(anchorEl, dispatchedEvent);
|
||||
var dispatchedEvent = getDOM().createMouseEvent('click');
|
||||
getDOM().dispatchEvent(anchorEl, dispatchedEvent);
|
||||
return dispatchedEvent;
|
||||
};
|
||||
|
||||
@ -338,7 +315,7 @@ export function main() {
|
||||
fixture.detectChanges();
|
||||
|
||||
var dispatchedEvent = clickOnElement(fixture);
|
||||
expect(DOM.isPrevented(dispatchedEvent)).toBe(true);
|
||||
expect(getDOM().isPrevented(dispatchedEvent)).toBe(true);
|
||||
|
||||
// router navigation is async.
|
||||
router.subscribe((_) => {
|
||||
@ -360,7 +337,7 @@ export function main() {
|
||||
|
||||
|
||||
var dispatchedEvent = clickOnElement(fixture);
|
||||
expect(DOM.isPrevented(dispatchedEvent)).toBe(true);
|
||||
expect(getDOM().isPrevented(dispatchedEvent)).toBe(true);
|
||||
|
||||
// router navigation is async.
|
||||
router.subscribe((_) => {
|
||||
@ -374,11 +351,11 @@ export function main() {
|
||||
}
|
||||
|
||||
function getHref(tc: ComponentFixture<any>) {
|
||||
return DOM.getAttribute(tc.debugElement.query(By.css('a')).nativeElement, 'href');
|
||||
return getDOM().getAttribute(tc.debugElement.query(By.css('a')).nativeElement, 'href');
|
||||
}
|
||||
|
||||
@Component({selector: 'my-comp', template: '', directives: [ROUTER_DIRECTIVES]})
|
||||
class MyComp {
|
||||
class MyComp7 {
|
||||
name;
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ import {
|
||||
TEST_ROUTER_PROVIDERS
|
||||
} from './util';
|
||||
|
||||
import {beforeEachProviders, describe, ddescribe} from 'angular2/testing_internal';
|
||||
import {beforeEachProviders, describe, ddescribe} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {registerSpecs} from './impl/sync_route_spec_impl';
|
||||
|
||||
|
@ -1,30 +1,23 @@
|
||||
import {provide, Provider, Component} from 'angular2/core';
|
||||
import {Type, isBlank} from 'angular2/src/facade/lang';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
|
||||
import {
|
||||
ComponentFixture,
|
||||
AsyncTestCompleter,
|
||||
TestComponentBuilder,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
xdescribe,
|
||||
describe,
|
||||
el,
|
||||
inject,
|
||||
beforeEachProviders,
|
||||
it,
|
||||
xit
|
||||
} from 'angular2/testing_internal';
|
||||
|
||||
import {RootRouter} from 'angular2/src/router/router';
|
||||
import {Router, ROUTER_DIRECTIVES, ROUTER_PRIMARY_COMPONENT} from 'angular2/router';
|
||||
|
||||
import {SpyLocation} from 'angular2/src/mock/location_mock';
|
||||
import {Location} from 'angular2/platform/common';
|
||||
import {RouteRegistry} from 'angular2/src/router/route_registry';
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
export {ComponentFixture} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {provide, Component} from '@angular/core';
|
||||
import {isBlank} from '../../src/facade/lang';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
import {RootRouter} from '@angular/router/src/router';
|
||||
import {Router, ROUTER_DIRECTIVES, ROUTER_PRIMARY_COMPONENT} from '@angular/router';
|
||||
import {Location} from '@angular/common';
|
||||
import {RouteRegistry} from '@angular/router/src/route_registry';
|
||||
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||
import {SpyLocation} from '@angular/common/testing';
|
||||
import {TestComponentBuilder, ComponentFixture} from '@angular/compiler/testing';
|
||||
|
||||
|
||||
/**
|
||||
@ -42,11 +35,11 @@ export class RootCmp {
|
||||
}
|
||||
|
||||
export function compile(tcb: TestComponentBuilder,
|
||||
template: string = "<router-outlet></router-outlet>") {
|
||||
template: string = "<router-outlet></router-outlet>"): Promise<ComponentFixture<RootCmp>> {
|
||||
return tcb.overrideTemplate(RootCmp, ('<div>' + template + '</div>')).createAsync(RootCmp);
|
||||
}
|
||||
|
||||
export var TEST_ROUTER_PROVIDERS = [
|
||||
export var TEST_ROUTER_PROVIDERS: any[] = [
|
||||
RouteRegistry,
|
||||
provide(Location, {useClass: SpyLocation}),
|
||||
provide(ROUTER_PRIMARY_COMPONENT, {useValue: RootCmp}),
|
||||
@ -54,13 +47,13 @@ export var TEST_ROUTER_PROVIDERS = [
|
||||
];
|
||||
|
||||
export function clickOnElement(anchorEl) {
|
||||
var dispatchedEvent = DOM.createMouseEvent('click');
|
||||
DOM.dispatchEvent(anchorEl, dispatchedEvent);
|
||||
var dispatchedEvent = getDOM().createMouseEvent('click');
|
||||
getDOM().dispatchEvent(anchorEl, dispatchedEvent);
|
||||
return dispatchedEvent;
|
||||
}
|
||||
|
||||
export function getHref(elt) {
|
||||
return DOM.getAttribute(elt, 'href');
|
||||
return getDOM().getAttribute(elt, 'href');
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
describe,
|
||||
it,
|
||||
iit,
|
||||
@ -8,12 +7,11 @@ import {
|
||||
inject,
|
||||
beforeEach,
|
||||
beforeEachProviders,
|
||||
SpyObject
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {Injector, provide} from 'angular2/core';
|
||||
import {Injector, provide} from '@angular/core';
|
||||
|
||||
import {PlatformLocation, APP_BASE_HREF, HashLocationStrategy} from 'angular2/platform/common';
|
||||
import {PlatformLocation, APP_BASE_HREF, HashLocationStrategy} from '@angular/common';
|
||||
import {SpyPlatformLocation} from '../spies';
|
||||
|
||||
export function main() {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
describe,
|
||||
it,
|
||||
iit,
|
||||
@ -8,13 +7,12 @@ import {
|
||||
inject,
|
||||
beforeEach,
|
||||
beforeEachProviders,
|
||||
SpyObject
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {Injector, provide, ReflectiveInjector} from 'angular2/core';
|
||||
|
||||
import {Location, LocationStrategy, APP_BASE_HREF} from 'angular2/platform/common';
|
||||
import {MockLocationStrategy} from 'angular2/src/mock/mock_location_strategy';
|
||||
import {Injector, provide, ReflectiveInjector} from '@angular/core';
|
||||
import {Location, LocationStrategy, APP_BASE_HREF} from '@angular/common';
|
||||
import {MockLocationStrategy} from '@angular/common/testing';
|
||||
|
||||
export function main() {
|
||||
describe('Location', () => {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
describe,
|
||||
it,
|
||||
iit,
|
||||
@ -8,17 +7,15 @@ import {
|
||||
inject,
|
||||
beforeEach,
|
||||
beforeEachProviders,
|
||||
SpyObject
|
||||
} from 'angular2/testing_internal';
|
||||
|
||||
import {Injector, provide} from 'angular2/core';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {Injector, provide} from '@angular/core';
|
||||
import {
|
||||
PlatformLocation,
|
||||
LocationStrategy,
|
||||
PathLocationStrategy,
|
||||
APP_BASE_HREF
|
||||
} from 'angular2/platform/common';
|
||||
} from '@angular/common';
|
||||
import {SpyPlatformLocation} from '../spies';
|
||||
|
||||
export function main() {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
describe,
|
||||
@ -9,21 +8,19 @@ import {
|
||||
it,
|
||||
xdescribe,
|
||||
xit,
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {APP_BASE_HREF, LocationStrategy} from 'angular2/platform/common';
|
||||
import {Component, Directive} from 'angular2/src/core/metadata';
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {Console} from 'angular2/src/core/console';
|
||||
import {provide} from 'angular2/core';
|
||||
import {DOCUMENT} from 'angular2/src/platform/dom/dom_tokens';
|
||||
import {Type, IS_DART} from 'angular2/src/facade/lang';
|
||||
|
||||
import {ROUTER_PROVIDERS, Router, RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router';
|
||||
|
||||
import {ExceptionHandler} from 'angular2/src/facade/exceptions';
|
||||
import {MockLocationStrategy} from 'angular2/src/mock/mock_location_strategy';
|
||||
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||
import {APP_BASE_HREF, LocationStrategy} from '@angular/common';
|
||||
import {Component, Directive} from '@angular/core/src/metadata';
|
||||
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||
import {Console} from '@angular/core/src/console';
|
||||
import {provide} from '@angular/core';
|
||||
import {DOCUMENT} from '@angular/platform-browser/src/dom/dom_tokens';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
import {ROUTER_PROVIDERS, Router, RouteConfig, ROUTER_DIRECTIVES} from '@angular/router';
|
||||
import {ExceptionHandler} from '@angular/core';
|
||||
import {MockLocationStrategy} from '@angular/common/testing';
|
||||
|
||||
class _ArrayLogger {
|
||||
res: any[] = [];
|
||||
@ -42,9 +39,9 @@ export function main() {
|
||||
describe('RouteConfig with POJO arguments', () => {
|
||||
var fakeDoc, el, testBindings;
|
||||
beforeEach(() => {
|
||||
fakeDoc = DOM.createHtmlDocument();
|
||||
el = DOM.createElement('app-cmp', fakeDoc);
|
||||
DOM.appendChild(fakeDoc.body, el);
|
||||
fakeDoc = getDOM().createHtmlDocument();
|
||||
el = getDOM().createElement('app-cmp', fakeDoc);
|
||||
getDOM().appendChild(fakeDoc.body, el);
|
||||
var logger = new _ArrayLogger();
|
||||
var exceptionHandler = new ExceptionHandler(logger, false);
|
||||
testBindings = [
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
describe,
|
||||
it,
|
||||
iit,
|
||||
@ -7,20 +6,20 @@ import {
|
||||
expect,
|
||||
inject,
|
||||
beforeEach,
|
||||
SpyObject
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {PromiseWrapper} from 'angular2/src/facade/async';
|
||||
import {Type, IS_DART} from 'angular2/src/facade/lang';
|
||||
import {PromiseWrapper} from '../src/facade/async';
|
||||
import {Type, IS_DART} from '../src/facade/lang';
|
||||
|
||||
import {RouteRegistry} from 'angular2/src/router/route_registry';
|
||||
import {RouteRegistry} from '../../router/src/route_registry';
|
||||
import {
|
||||
RouteConfig,
|
||||
Route,
|
||||
Redirect,
|
||||
AuxRoute,
|
||||
AsyncRoute
|
||||
} from 'angular2/src/router/route_config/route_config_decorator';
|
||||
} from '../../router/src/route_config/route_config_decorator';
|
||||
|
||||
|
||||
export function main() {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
describe,
|
||||
it,
|
||||
iit,
|
||||
@ -9,26 +8,24 @@ import {
|
||||
inject,
|
||||
beforeEach,
|
||||
beforeEachProviders
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
import {SpyRouterOutlet} from './spies';
|
||||
import {Type} from 'angular2/src/facade/lang';
|
||||
import {PromiseWrapper, ObservableWrapper} from 'angular2/src/facade/async';
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
|
||||
import {Router, RootRouter} from 'angular2/src/router/router';
|
||||
import {SpyLocation} from 'angular2/src/mock/location_mock';
|
||||
import {Location} from 'angular2/platform/common';
|
||||
|
||||
import {RouteRegistry, ROUTER_PRIMARY_COMPONENT} from 'angular2/src/router/route_registry';
|
||||
import {Type} from '../src/facade/lang';
|
||||
import {PromiseWrapper, ObservableWrapper} from '../src/facade/async';
|
||||
import {ListWrapper} from '../src/facade/collection';
|
||||
import {Router, RootRouter} from '@angular/router/src/router';
|
||||
import {SpyLocation} from '@angular/common/testing';
|
||||
import {Location} from '@angular/common';
|
||||
import {RouteRegistry, ROUTER_PRIMARY_COMPONENT} from '@angular/router/src/route_registry';
|
||||
import {
|
||||
RouteConfig,
|
||||
AsyncRoute,
|
||||
Route,
|
||||
Redirect
|
||||
} from 'angular2/src/router/route_config/route_config_decorator';
|
||||
|
||||
import {provide} from 'angular2/core';
|
||||
import {RouterOutlet} from 'angular2/src/router/directives/router_outlet';
|
||||
} from '@angular/router/src/route_config/route_config_decorator';
|
||||
import {provide} from '@angular/core';
|
||||
import {RouterOutlet} from '@angular/router/src/directives/router_outlet';
|
||||
|
||||
export function main() {
|
||||
describe('Router', () => {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
describe,
|
||||
it,
|
||||
iit,
|
||||
@ -7,11 +6,10 @@ import {
|
||||
expect,
|
||||
inject,
|
||||
beforeEach,
|
||||
SpyObject
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {ParamRoutePath} from 'angular2/src/router/rules/route_paths/param_route_path';
|
||||
import {parser, Url} from 'angular2/src/router/url_parser';
|
||||
import {ParamRoutePath} from '../../../../router/src/rules/route_paths/param_route_path';
|
||||
import {parser, Url} from '../../../../router/src/url_parser';
|
||||
|
||||
export function main() {
|
||||
describe('PathRecognizer', () => {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
describe,
|
||||
it,
|
||||
iit,
|
||||
@ -7,12 +6,11 @@ import {
|
||||
expect,
|
||||
inject,
|
||||
beforeEach,
|
||||
SpyObject
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {GeneratedUrl} from 'angular2/src/router/rules/route_paths/route_path';
|
||||
import {RegexRoutePath} from 'angular2/src/router/rules/route_paths/regex_route_path';
|
||||
import {parser, Url} from 'angular2/src/router/url_parser';
|
||||
import {GeneratedUrl} from '../../../../router/src/rules/route_paths/route_path';
|
||||
import {RegexRoutePath} from '../../../../router/src/rules/route_paths/regex_route_path';
|
||||
import {parser, Url} from '../../../../router/src/url_parser';
|
||||
|
||||
function emptySerializer(params) {
|
||||
return new GeneratedUrl('', {});
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
describe,
|
||||
it,
|
||||
iit,
|
||||
@ -7,18 +6,14 @@ import {
|
||||
expect,
|
||||
inject,
|
||||
beforeEach,
|
||||
SpyObject
|
||||
} from 'angular2/testing_internal';
|
||||
|
||||
import {Map, StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
|
||||
import {RouteMatch, PathMatch, RedirectMatch} from 'angular2/src/router/rules/rules';
|
||||
import {RuleSet} from 'angular2/src/router/rules/rule_set';
|
||||
import {GeneratedUrl} from 'angular2/src/router/rules/route_paths/route_path';
|
||||
|
||||
import {Route, Redirect} from 'angular2/src/router/route_config/route_config_decorator';
|
||||
import {parser} from 'angular2/src/router/url_parser';
|
||||
import {PromiseWrapper} from 'angular2/src/facade/promise';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
import {RouteMatch, PathMatch, RedirectMatch} from '../../../router/src/rules/rules';
|
||||
import {RuleSet} from '../../../router/src/rules/rule_set';
|
||||
import {GeneratedUrl} from '../../../router/src/rules/route_paths/route_path';
|
||||
import {Route, Redirect} from '../../../router/src/route_config/route_config_decorator';
|
||||
import {parser} from '../../../router/src/url_parser';
|
||||
import {PromiseWrapper} from '../../src/facade/promise';
|
||||
|
||||
|
||||
export function main() {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {Location} from 'angular2/platform/common';
|
||||
import {Router, RouterOutlet} from 'angular2/router';
|
||||
import {SpyObject, proxy} from 'angular2/testing_internal';
|
||||
import {Location} from '@angular/common';
|
||||
import {Router, RouterOutlet} from '@angular/router';
|
||||
import {SpyObject, proxy} from '@angular/core/testing/testing_internal';
|
||||
|
||||
export class SpyRouter extends SpyObject {
|
||||
constructor() { super(Router); }
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
describe,
|
||||
it,
|
||||
iit,
|
||||
@ -7,10 +6,9 @@ import {
|
||||
expect,
|
||||
inject,
|
||||
beforeEach,
|
||||
SpyObject
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {UrlParser, Url} from 'angular2/src/router/url_parser';
|
||||
import {UrlParser, Url} from '../../router/src/url_parser';
|
||||
|
||||
|
||||
export function main() {
|
||||
|
Reference in New Issue
Block a user