angular_test 2.0.0-alpha+9
angular_test: ^2.0.0-alpha+9 copied to clipboard
Testing runner and library for AngularDart
2.0.0-alpha+9 #
pub run angular_testwas entirely removed. This hasn't worked since2.0.0-alpha+3, but instead threw an error message reminding users it was no longer supported.
2.0.0-alpha+8 #
-
The minimum SDK version is now
sdk: ">=2.0.0-dev.46.0 <2.0.0". -
DEPRECATED:
throwsInAngularis now a no-op, and can be removed.
2.0.0-alpha+7 #
- Maintenance release, supporting newer package versions.
2.0.0-alpha+6 #
- Maintenance release, supporting newer package versions.
2.0.0-alpha+5 #
- Maintenance release, supporting newer package versions.
2.0.0-alpha+4 #
-
Removed built-in support for
package:pageloader. The current version ofpageloaderrelies ondart:mirrors, which is being removed from the web compilers (dart2js, dartdevc). There is a new (internal-only, right now) version ofpageloaderin development that uses code generation, but it is not available externally yet. We'll consider re-adding support once available or through another package (i.e.angular_pageloaderor similar). -
Added
NgTestBed.forComponent, which takes aComponentFactory<T>, and optionally anInjectorFactory. This allows writing tests entirely free of any invocations ofinitReflector(). -
BREAKING CHANGE: Adding stabilizers to
NgTestBednow takes a factory function of typeNgTestStabilizer Function(Injector), which is aliased asNgTestStabilizerFactory. This allows usingNgTestBedwithout any dynamic reflective factories (i.e.initReflector()) and doesn't have impact to most users.
2.0.0-alpha+3 #
- Removed support for
pub run angular_test. This is no longer strictly needed, as it was just a convenience for running both the build system and test runner. Similar functionality is supported out of the box bybuild_runner:
$ pub run build_runner test
2.0.0-alpha+2 #
Maintenance release, to support the latest package:angular alpha.
2.0.0-alpha+1 #
- Added support for
build.yaml.
2.0.0-alpha #
NOTE: This was previously
1.0.2-alpha+1, but since this has major breaking changes that make it incompatible with the1.x.xreleases in order to supportangular 5.x.x, this will now be the2.0.0alpha release.
- Add support for the use of an externally launched
pub serveby using "none" as the value of--experimental-serve-script.
1.0.2-alpha+1 #
- Use the new generic function syntax, stop using
package:func. - Support breaking changes and deprecations in angular 5.0.0-alpha+1.
1.0.2-alpha #
- Support breaking changes in angular 5.0.0-alpha
1.0.0 #
Breaking Changes & Deprecations #
-
Throws in bootstrapping if the root component does not use default change detection. AngularDart does not support
OnPushor other change detection strategies on the root component. -
Pub serve now defaults to a random unused port (instead of
8080) and--portis deprecated. Going forward the supported way to supply this argument is via--serve-arg:
$ pub run angular_test --serve-arg=port=1234
- Option
--run-test-flag(-t) is now deprecated, and no longer has a default value ofaot. Tags are still highly encouraged in order to have faster compilation times! Use--test-arginstead:
$ pub run angular_test --test-arg=--tags=aot
- Option
--platform(-p) is now Deprecated, and no longer has a default value ofcontent-shell, which was not always installed on host machines. Instead use--test-arg:
$ pub run angular_test --test-arg=--platform=content-shell
-
Option
--name(-n) and--simple-name(-N) are also deprecated. Use--test-arg=--name=and--test-arg=--simple-name=instead. -
Changes to
compatibility.dartmight not be considered in future semver updates, and it highly suggested you don't use these APIs for any new code. -
Change
NgTestFixture.updateto have a single optional parameter
Features #
-
Add assertOnlyInstance to fixture to remove some boilerplate around testing the state of a instance. Only use to test state, not to update it.
-
Added
--serve-argand--test-arg, which both support multiple arguments in order to have better long-term support for proxying to bothpub serveandpub run testwithout frequent changes to this package. For example to use the [DartDevCompiler (dartdevc)]:
$ pub run angular_test --serve-arg=web-compiler=dartdevc
- Add support for setting a custom
PageLoaderfactory:
testBed = testBed.setPageLoader(
(element) => new CustomPageLoader(...),
);
- Add support for
queryandqueryAlltoNgTestFixture. This works similar to theupdatecommand, but is called back with either a single or multiple child component instances to interact with or run expectations against:
// Assert we have 3 instances of <child>.
await fixture.queryAll(
(el) => el.componentInstance is ChildComponent,
(children) {
expect(children, hasLength(3));
},
);
- Add built-in support for
package:pageloader:
final fixture = await new NgTestBed<TestComponent>().create();
final pageObject = await fixture.getPageObject/*<ClickCounterPO>*/(
ClickCounterPO,
);
expect(await pageObject.button.visibleText, 'Click count: 0');
await pageObject.button.click();
expect(await pageObject.button.visibleText, 'Click count: 1');
Fixes #
-
Workaround for
pub {serve|build}hanging onangular_testas a dependency. -
Fixes a bug where the root was not removed from the DOM after disposed.
-
Added a missing dependency on
package:func. -
Properly fix support for windows by using
pub.bat. -
Replace all uses of generic comment with proper syntax.
-
Fixed a bug where
activeTestwas never set (and therefore disposed). -
Fixed a bug where
pub, notpub.bat, is run in windows. -
Update
pubspec.yamlso it properly lists AngularDart3.0.0-alpha -
Fix the executable so
pub run angular_testcan be used -
Fix a serious generic type error when
NgTestBedis forked -
Fix a generic type error
-
Added
compatibility.dart, a temporary API to some users migrate