Commit Graph

27 Commits

Author SHA1 Message Date
Alex Rickabaugh 60727c4d2b revert(format): Revert "chore(format): update to latest formatter"
This reverts commit 03627aa84d.
2016-04-12 09:41:01 -07:00
Alex Eagle 03627aa84d chore(format): update to latest formatter
Closes #7958
2016-04-11 22:15:23 +00:00
Brian Ford f9fb72fb0e chore(core): remove @View annotation
Closes #7495
2016-03-14 23:26:20 +00:00
Matias Niemelä 169869a195 test(matchers): add support for toMatchPattern in tests 2016-03-09 21:31:15 -08:00
Julie Ralph d900f5c075 chore(tests): lengthen timeout for templateUrl test
This was flaking on Travis occasionally because the TestComponentBuilder
is actually doing an XHR, and it was slow on the Edge browser.

Closes #7293
2016-03-01 21:01:56 +00:00
Julie Ralph aaafdf03ce test(testing): add a test to ensure fakeAsync works with angular2/testing 2016-02-25 10:22:18 -08:00
Julie Ralph c1a0af514f feat(test): add withProviders for per test providers
Closes #5128
2016-02-19 19:23:46 -05:00
Marc Laval fc5b128b43 chore(ci): deflake test and turn on saucelabs_required
Fixes #6725

Closes #6733
2016-01-28 03:18:08 +00:00
Julie Ralph c72ed991ad fix(testing): remove test zone for now and rely on returned promises
Adds tests for public Dart and TS frameworks to make sure that
components with templateUrl can be created by the TestComponentBuilder.

Closes #6359

Closes #6601
2016-01-22 00:28:48 +00:00
Tim Blasi e19b31db29 refactor(test): Remove unnecessary `noSuchMethod`
Remove trivial implementations in many spy objects which just calls the
parent's `noSuchMethod`.

Closes #6410

Closes #6491
2016-01-15 22:53:09 +00:00
Julie Ralph b803ecf7e7 refactor(testing): reenable injectAsync checking for return value
Before #5375, injectAsync would check the return value and fail
if it was not a promise, to help users remember that they need to
return a promise from an async test. #5375 removed that with the
introduction of the testing zone.

This un-deprecates `injectAsync` until we can resolve
https://github.com/angular/angular/issues/5515.

To be clear, this means that `inject` and `injectAsync` are now
identical except that `injectAsync` will fail if the test
does not return a promise, and `inject` will fail if the test
returns any value.

Closes #5721
2015-12-15 05:51:54 +00:00
Victor Berchet da9b46a071 feat: camelCase Angular (kebab-case removal)
BREAKING CHANGE:

Angular is now fully camel case.

Before:

    <p *ng-if="cond">
    <my-cmp [my-prop]="exp">
    <my-cmp (my-event)="action()">
    <my-cmp [(my-prop)]="prop">
    <input #my-input>
    <template ng-for #my-item [ng-for-of]=items #my-index="index">

After

    <p *ngIf="cond">
    <my-cmp [myProp]="exp">
    <my-cmp (myEvent)="action()">
    <my-cmp [(myProp)]="prop">
    <input #myInput>`,
    <template ngFor="#my-item" [ngForOf]=items #myIndex="index">

The full details are found in [angular2/docs/migration/kebab-case.md](https://github.com/angular/angular/blob/master/modules/angular2/docs/migration/kebab-case.md)
2015-12-09 19:59:40 -08:00
Julie Ralph e9f873a365 feat(testing): export useful properties from componentFixture
The component fixture returned from the test component builder
now exports `nativeElement` and `componentInstance` members
directly. They are also still available on the `debugElement`.

See #5385
2015-12-02 16:05:01 -08:00
Jesper Rønn-Jensen 070d818e68 refactor(tests): rename beforeEachBindings -> beforeEachProviders
Change beforeEachBindings to beforeEachProviders but preserve the
@deprecated method beforeEachBindings, in order to keep a working
deprecation warning
2015-12-02 14:09:13 -08:00
Julie Ralph 0c9596ae2b feat(testing): use zones to avoid the need for injectAsync
Use a zone counting timeouts and microtasks to determine when a test
is finished, instead of requiring the test writer to use
injectAsync and return a promise.

See #5322
2015-11-30 14:06:06 -08:00
vsavkin 89eefcd7b5 cleanup(tooling): move tooling to the browser platform and rename profile into instrumentation
BREAKING CHANGE

Before

import * as p from 'angular2/profile';
import * as t from 'angular2/tools';

After

import * as p from 'angular2/instrumentation';
import * as t from 'angular2/platform/browser';
2015-11-24 19:29:52 +00:00
Matias Niemelä fad354904d test(matchers): add support for `toHaveCssStyle` matcher 2015-11-23 22:43:01 +00:00
vsavkin 3c8fa8c50d cleanup: move DomAdapter from angular2/core into angular2/platform/common_dom
BREAKING CHANGE

Before

import {DomAdapter} from 'angular2/core';

After

import {DomAdapter} from 'angular2/platform/common_dom';

Closes #5370
2015-11-20 00:14:24 +00:00
vsavkin 5ba9ced1ab cleanup(core): stop reexporting angular2/common from angular2/core
All common directives, forms, and pipes have been moved out of angular2/core,
but we kept reexporting them to make transition easier.

This commit removes the reexports.

BREAKING CHANGE

Before

import {NgIf} from 'angular2/core';

After

import {NgIf} from 'angular2/common';

Closes #5362
2015-11-19 19:54:27 +00:00
vsavkin 0eab4fc72c feat(core): extract platforms out of core
Currently, core depends on the browser, which means that other platforms (e.g., NativeScript or webworker) cannot use the bootstrapping logic core provides.
This PR extract makes bootstrapping logic in core completely platform-independent. The browser-specific code was moved to "angular2/platforms/browser".

BREAKING CHANGE

A few private helpers (e.g., platformCommon or applicationCommon) were removed or replaced with other helpers. Look at PLATFORM_COMMON_PROVIDERS, APPLICATION_COMMON_PROVIDERS, BROWSER_PROVIDERS, BROWSER_APP_PROVIDERS to see if they export the providers you need.

Closes #5219

Closes #5280
2015-11-13 19:26:14 +00:00
vsavkin 78280a48af Revert "feat(core): extract platforms out of core"
This reverts commit 3f4628c0b0.
2015-11-12 13:40:29 -08:00
vsavkin 3f4628c0b0 feat(core): extract platforms out of core
Currently, core depends on the browser, which means that other platforms (e.g., NativeScript or webworker) cannot use the bootstrapping logic core provides.
This PR extract makes bootstrapping logic in core completely platform-independent. The browser-specific code was moved to "angular2/platforms/browser".

BREAKING CHANGE

A few private helpers (e.g., platformCommon or applicationCommon) were removed or replaced with other helpers. Look at PLATFORM_COMMON_PROVIDERS, APPLICATION_COMMON_PROVIDERS, BROWSER_PROVIDERS, BROWSER_APP_PROVIDERS to see if they export the providers you need.

Closes #5219
2015-11-12 16:57:03 +00:00
vsavkin 79472b77ca refactor(core): move facades out of core
This is part of ongoing work to make core platform-independent.

BREAKING CHANGE

All private exports from 'angular2/src/core/facade/{lang,collection,exception_handler}' should be replaced with 'angular2/src/facade/{lang,collection,exception_handler}'.
2015-11-07 01:36:06 +00:00
vsavkin 6edd964a83 chore(core): move compiler out of core
BREAKING CHANGE

All imports from 'angular2/core/compiler' should be changed to 'angular2/compiler'.
2015-11-05 14:44:52 -08:00
Julie Ralph 686457890d chore(test): rename RootTestComponent to ComponentFixture
BREAKING CHANGE:

Before:

```
testComponentBuilder.createAsync(MyComponent).then(root: RootTestComponent => {
}
```

After:

```
testComponentBuilder.createAsync(MyComponent).then(fixture: ComponentFixture => {
}
```

Closes #4711
2015-11-03 14:56:22 -08:00
Julie Ralph d7ab5d44a5 fix(testing): let DOM adapter dictate XHR implementation for tests
The test injector now uses an XHR implementation based on DOM.getXHR,
which allows the current DOM adapter to dictate which XHR impl should
be used.

To prevent the changes to DOM adapter from introducing undesired new
dependencies into the benchmarks, separate the async facade into
a promise facade which is reexported by facade/async.

See #4539
2015-10-15 12:12:27 -07:00
Julie Ralph f529236bfc refactor(test): rename test_lib to testing
Old test_lib is now testing_internal
test_lib_public is now testing
2015-10-13 10:36:49 -07:00