diff --git a/README.md b/README.md index 65ebb1432b..4d1647ed6d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,36 @@ -See https://github.com/angulardart for current updates on this project. +## Forked and renamed by AndgularDart Community packages + +See https://github.com/angulardart-community for current updates on this project. ## Packages +[ngdart](https://github.com/angulardart-community/angular/tree/master/angular) +[ngforms](https://github.com/angulardart-community/angular/tree/master/angular_forms) +[ngrouter](https://github.com/angulardart-community/angular/tree/master/angular_router) +[ngtest](https://github.com/angulardart-community/angular/tree/master/angular_test) +[ngcomponents](https://github.com/angulardart-community/angular_components) +[ngast](https://github.com/angulardart-community/angular/tree/master/angular_ast) +[ngcompiler](https://github.com/angulardart-community/angular/tree/master/angular_compiler) +[ngdart_cli](https://github.com/angulardart-community/ngdart) + + +## Resources + +AngularDart Community web-site [https://angulardart.xyz](https://angulardart.xyz). + +Source code Git repositories [https://github.com/angulardart-community](https://github.com/angulardart-community) + +Join the [Gitter chat room]: https://gitter.im/angulardart/community to ask questions. + + + + + + +## The original Packages (in the restricted maintenance mode) + +See https://github.com/angulardart for current updates on this project. + | Source code | Published Version | |------------------------------|:------------------------------------------------------------------------------------------------------------------:| | [angular] | [![Pub Package](https://img.shields.io/pub/v/angular.svg)](https://pub.dev/packages/angular) | @@ -24,9 +53,3 @@ Included for completeness._ [angular_forms]: https://github.com/angulardart/angular/tree/master/angular_forms [angular_router]: https://github.com/angulardart/angular/tree/master/angular_router [angular_test]: https://github.com/angulardart/angular/tree/master/angular_test - -## Resources - -Join the [Gitter chat room] to ask questions. - -[Gitter chat room]: https://gitter.im/angulardart/community diff --git a/_tests/lib/compiler.dart b/_tests/lib/compiler.dart index 3e9ef61d87..0c72dd977d 100644 --- a/_tests/lib/compiler.dart +++ b/_tests/lib/compiler.dart @@ -9,8 +9,8 @@ import 'package:build_test/build_test.dart' hide testBuilder; import 'package:glob/glob.dart'; import 'package:logging/logging.dart'; import 'package:test/test.dart'; -import 'package:angular/src/build.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngdart/src/build.dart'; +import 'package:ngcompiler/v2/context.dart'; /// A 'test' build process (similar to the normal one). final Builder _testAngularBuilder = MultiplexingBuilder([ @@ -47,7 +47,7 @@ final Future _packageAssets = (() async { // **NOTE**: Be very careful changing this, there are hard-coded transformation // rules as part of open sourcing process to make sure this works both // externally and internally. -const ngPackage = 'angular'; +const ngPackage = 'ngdart'; const ngCompiler = 'angular_compiler'; const ngImport = 'package:$ngPackage/angular.dart'; final _ngFiles = Glob('lib/**.dart'); @@ -132,7 +132,7 @@ Future _testBuilder( /// ) /// ``` /// -/// Note that `package:angular/**.dart` is always included. +/// Note that `package:ngdart/**.dart` is always included. Future compilesExpecting( String input, { String inputSource, diff --git a/_tests/lib/matchers.dart b/_tests/lib/matchers.dart index f62d23e8ec..3506751b10 100644 --- a/_tests/lib/matchers.dart +++ b/_tests/lib/matchers.dart @@ -1,7 +1,7 @@ import 'dart:html'; import 'package:test/test.dart'; -import 'package:angular/angular.dart'; +import 'package:ngdart/angular.dart'; /// Matches textual content of an element including children. Matcher hasTextContent(String expected) => _HasTextContent(expected); diff --git a/_tests/lib/query_tests.dart b/_tests/lib/query_tests.dart index a8379f34f1..5a4274657d 100644 --- a/_tests/lib/query_tests.dart +++ b/_tests/lib/query_tests.dart @@ -4,8 +4,8 @@ import 'package:collection/collection.dart'; import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; /// A mixin for components that receive a list of child elements/directives. abstract class HasChildren { diff --git a/_tests/pubspec.yaml b/_tests/pubspec.yaml index a61805da79..df95289d37 100644 --- a/_tests/pubspec.yaml +++ b/_tests/pubspec.yaml @@ -5,8 +5,8 @@ environment: dependencies: # No strict dependencies, we always use dependency_overrides. - angular: - angular_test: + ngdart: + ngtest: # Actual valid dependencies required. build_resolvers: ^2.0.0 @@ -16,7 +16,7 @@ dependencies: dev_dependencies: # No strict dependencies, we always use dependency_overrides. - angular_forms: + ngforms: # Actual valid dependencies required. analyzer: ^4.0.0 @@ -31,16 +31,16 @@ dev_dependencies: # DO NOT REMOVE. We don't publish this package, it is just for testing. dependency_overrides: - angular: + ngdart: path: ../angular - angular_ast: + ngast: path: ../angular_ast - angular_compiler: + ngcompiler: path: ../angular_compiler - angular_forms: + ngforms: path: ../angular_forms - angular_router: + ngrouter: path: ../angular_router - angular_test: + ngtest: path: ../angular_test analyzer: ^4.0.0 diff --git a/_tests/test/bootstrap/run_app_test.dart b/_tests/test/bootstrap/run_app_test.dart index 76c09883dc..2ba2b16d45 100644 --- a/_tests/test/bootstrap/run_app_test.dart +++ b/_tests/test/bootstrap/run_app_test.dart @@ -7,7 +7,7 @@ import 'dart:html'; import 'package:js/js.dart'; import 'package:test/test.dart'; -import 'package:angular/angular.dart'; +import 'package:ngdart/angular.dart'; import 'run_app_test.template.dart' as ng; diff --git a/_tests/test/common/directives/for_test.dart b/_tests/test/common/directives/for_test.dart index b79b9df656..1facd644cc 100644 --- a/_tests/test/common/directives/for_test.dart +++ b/_tests/test/common/directives/for_test.dart @@ -4,8 +4,8 @@ import 'dart:async'; import 'package:test/test.dart'; import 'package:_tests/matchers.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'for_test.template.dart' as ng; @@ -14,13 +14,13 @@ void main() { tearDown(() => disposeAnyRunningTest()); test('should reflect initial elements', () async { - var testBed = NgTestBed(ng.createNgForItemsTestFactory()); + var testBed = NgTestBed(ng.createNgForItemsTestFactory()); var testFixture = await testBed.create(); expect(testFixture.rootElement, hasTextContent('1;2;3;')); }); test('should reflect added elements', () async { - var testBed = NgTestBed(ng.createNgForItemsTestFactory()); + var testBed = NgTestBed(ng.createNgForItemsTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForItemsTest component) { component.items!.add(4); @@ -29,7 +29,7 @@ void main() { }); test('should reflect removed elements - first', () async { - var testBed = NgTestBed(ng.createNgForItemsTestFactory()); + var testBed = NgTestBed(ng.createNgForItemsTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForItemsTest component) { component.items!.removeAt(0); @@ -38,7 +38,7 @@ void main() { }); test('should reflect removed elements - middle', () async { - var testBed = NgTestBed(ng.createNgForItemsTestFactory()); + var testBed = NgTestBed(ng.createNgForItemsTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForItemsTest component) { component.items!.removeAt(1); @@ -47,7 +47,7 @@ void main() { }); test('should reflect removed elements - last', () async { - var testBed = NgTestBed(ng.createNgForItemsTestFactory()); + var testBed = NgTestBed(ng.createNgForItemsTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForItemsTest component) { component.items!.removeAt(2); @@ -56,7 +56,7 @@ void main() { }); test('should reflect move to end', () async { - var testBed = NgTestBed(ng.createNgForItemsTestFactory()); + var testBed = NgTestBed(ng.createNgForItemsTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForItemsTest component) { component.items!.removeAt(0); @@ -66,7 +66,7 @@ void main() { }); test('should reflect move to start', () async { - var testBed = NgTestBed(ng.createNgForItemsTestFactory()); + var testBed = NgTestBed(ng.createNgForItemsTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForItemsTest component) { component.items!.removeAt(1); @@ -77,7 +77,7 @@ void main() { test('should reflect a mix of all changes (additions/removals/moves)', () async { - var testBed = NgTestBed(ng.createNgForItemsTestFactory()); + var testBed = NgTestBed(ng.createNgForItemsTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForItemsTest component) { component.items = [0, 1, 2, 3, 4, 5]; @@ -89,7 +89,7 @@ void main() { }); test('should iterate over an array of objects', () async { - var testBed = NgTestBed(ng.createNgForOptionsTestFactory()); + var testBed = NgTestBed(ng.createNgForOptionsTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForOptionsTest component) { component.items = [ @@ -112,13 +112,13 @@ void main() { }); test('should gracefully handle nulls', () async { - var testBed = NgTestBed(ng.createNgForNullTestFactory()); + var testBed = NgTestBed(ng.createNgForNullTestFactory()); var testFixture = await testBed.create(); expect(testFixture.rootElement, hasTextContent('')); }); test('should gracefully handle ref changing to null and back', () async { - var testBed = NgTestBed(ng.createNgForItemsTestFactory()); + var testBed = NgTestBed(ng.createNgForItemsTestFactory()); var testFixture = await testBed.create(); expect(testFixture.rootElement, hasTextContent('1;2;3;')); @@ -134,7 +134,7 @@ void main() { test('should throw on non-iterable ref and suggest using an array', () async { - final testBed = NgTestBed(ng.createNgForOptionsTestFactory()); + final testBed = NgTestBed(ng.createNgForOptionsTestFactory()); final testFixture = await testBed.create(); expect(testFixture.update((component) { component.items = 'this is not iterable'; @@ -142,7 +142,7 @@ void main() { }); test('should work with duplicates', () async { - var testBed = NgTestBed(ng.createNgForObjectItemInstanceTestFactory()); + var testBed = NgTestBed(ng.createNgForObjectItemInstanceTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForObjectItemInstanceTest component) { var a = Foo('titleA'); @@ -152,7 +152,7 @@ void main() { }); test('should repeat over nested arrays', () async { - var testBed = NgTestBed(ng.createNgForNestedTestFactory()); + var testBed = NgTestBed(ng.createNgForNestedTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForNestedTest component) { component.items = [ @@ -173,7 +173,7 @@ void main() { test( 'should repeat over nested arrays with no intermediate ' 'element', () async { - var testBed = NgTestBed(ng.createNgForNestedTemplateTestFactory()); + var testBed = NgTestBed(ng.createNgForNestedTemplateTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForNestedTemplateTest component) { component.items = [ @@ -194,7 +194,7 @@ void main() { test( 'should repeat over nested ngIf that are the last node in ' 'the ngFor temlate', () async { - var testBed = NgTestBed(ng.createNgForNestedLastIfTestFactory()); + var testBed = NgTestBed(ng.createNgForNestedLastIfTestFactory()); var testFixture = await testBed.create(); var el = testFixture.rootElement; await testFixture.update((NgForNestedLastIfTest component) { @@ -214,7 +214,7 @@ void main() { }); test('should display indices correctly', () async { - var testBed = NgTestBed(ng.createNgForIndexTestFactory()); + var testBed = NgTestBed(ng.createNgForIndexTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForIndexTest component) { component.items = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; @@ -227,14 +227,12 @@ void main() { }); test('should ignore extra spaces after a let assignment', () async { - final fixture = await NgTestBed( - ng.createLetAssignmentSpacingTestFactory(), - ).create(); + final fixture = await NgTestBed(ng.createLetAssignmentSpacingTestFactory()).create(); expect(fixture.text, '012'); }); test('should display first item correctly', () async { - var testBed = NgTestBed(ng.createNgForFirstTestFactory()); + var testBed = NgTestBed(ng.createNgForFirstTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForFirstTest component) { component.items = [0, 1, 2]; @@ -247,7 +245,7 @@ void main() { }); test('should display last item correctly', () async { - var testBed = NgTestBed(ng.createNgForLastTestFactory()); + var testBed = NgTestBed(ng.createNgForLastTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForLastTest component) { component.items = [0, 1, 2]; @@ -260,7 +258,7 @@ void main() { }); test('should display even items correctly', () async { - var testBed = NgTestBed(ng.createNgForEvenTestFactory()); + var testBed = NgTestBed(ng.createNgForEvenTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForEvenTest component) { component.items = [0, 1, 2]; @@ -273,7 +271,7 @@ void main() { }); test('should display odd items correctly', () async { - var testBed = NgTestBed(ng.createNgForOddTestFactory()); + var testBed = NgTestBed(ng.createNgForOddTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForOddTest component) { component.items = [0, 1, 2, 3]; @@ -286,7 +284,7 @@ void main() { }); test('should allow using a custom template', () async { - var testBed = NgTestBed(ng.createNgForCustomTemplateTestFactory()); + var testBed = NgTestBed(ng.createNgForCustomTemplateTestFactory()); var testFixture = await testBed.create(); await testFixture.update((component) { component.child!.items = ['a', 'b', 'c']; @@ -295,7 +293,7 @@ void main() { }); test('should use a default template if a custom one is null', () async { - var testBed = NgTestBed(ng.createNgForCustomTemplateNullTestFactory()); + var testBed = NgTestBed(ng.createNgForCustomTemplateNullTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForCustomTemplateNullTest component) { component.child!.items = ['a', 'b', 'c']; @@ -307,7 +305,7 @@ void main() { 'should use a custom template (precedence) when both default and a ' 'custom one are present', () async { var testBed = - NgTestBed(ng.createNgForCustomTemplatePrecedenceTestFactory()); + NgTestBed(ng.createNgForCustomTemplatePrecedenceTestFactory()); var testFixture = await testBed.create(); await testFixture.update((NgForCustomTemplatePrecedenceTest component) { component.child!.items = ['a', 'b', 'c']; @@ -317,7 +315,7 @@ void main() { group('track by', () { test('should not replace tracked items', () async { - var testBed = NgTestBed(ng.createTrackByIdTestFactory()); + var testBed = NgTestBed(ng.createTrackByIdTestFactory()); var testFixture = await testBed.create(); await testFixture.update((TrackByIdTest component) { component.items = [ @@ -337,7 +335,7 @@ void main() { }); test('should update implicit local variable on view', () async { - var testBed = NgTestBed(ng.createTrackByIdTestFactory()); + var testBed = NgTestBed(ng.createTrackByIdTestFactory()); var testFixture = await testBed.create(); await testFixture.update((TrackByIdTest component) { component.items = [ @@ -356,7 +354,7 @@ void main() { }); test('should move items around and updated (reorder)', () async { - var testBed = NgTestBed(ng.createTrackByIdTestFactory()); + var testBed = NgTestBed(ng.createTrackByIdTestFactory()); var testFixture = await testBed.create(); await testFixture.update((TrackByIdTest component) { component.items = [ @@ -379,7 +377,7 @@ void main() { test( 'should handle added and removed items properly when tracking ' 'by index', () async { - var testBed = NgTestBed(ng.createTrackByIndexTestFactory()); + var testBed = NgTestBed(ng.createTrackByIndexTestFactory()); var testFixture = await testBed.create(); await testFixture.update((TrackByIndexTest component) { component.items = ['a', 'b', 'c', 'd']; @@ -396,7 +394,7 @@ void main() { test( 'should remove by index when list item or ' 'it\'s hash changes', () async { - var testBed = NgTestBed(ng.createObjectEditorComponentFactory()); + var testBed = NgTestBed(ng.createObjectEditorComponentFactory()); var testFixture = await testBed.create(); await testFixture.update((ObjectEditorComponent component) { component.entities = ['a1', 'b1', 'c1', 'd1', 'e1', 'f1', 'g1', 'h1']; @@ -419,7 +417,7 @@ void main() { test( 'should remove item if hash code is changed before ' 'removing element from list', () async { - var testBed = NgTestBed(ng.createNgForHashcodeTestFactory()); + var testBed = NgTestBed(ng.createNgForHashcodeTestFactory()); var testFixture = await testBed.create(); var testItems = [ HashcodeTestItem(1), diff --git a/_tests/test/common/directives/if_test.dart b/_tests/test/common/directives/if_test.dart index 7e8afef1ce..5ba7beaf1e 100644 --- a/_tests/test/common/directives/if_test.dart +++ b/_tests/test/common/directives/if_test.dart @@ -1,7 +1,7 @@ import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular/src/runtime/check_binding.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngdart/src/runtime/check_binding.dart'; +import 'package:ngtest/angular_test.dart'; import 'if_test.template.dart' as ng; @@ -10,7 +10,7 @@ void main() { tearDown(() => disposeAnyRunningTest()); test('should work in a template element', () async { - var testBed = NgTestBed(ng.createNgIfInTemplateComponentFactory()); + var testBed = NgTestBed(ng.createNgIfInTemplateComponentFactory()); var testFixture = await testBed.create(); var element = testFixture.rootElement; expect(element.querySelectorAll('copy-me'), hasLength(1)); @@ -18,7 +18,7 @@ void main() { }); test('should toggle node when condition changes', () async { - var testBed = NgTestBed(ng.createNgIfToggleTestComponentFactory()); + var testBed = NgTestBed(ng.createNgIfToggleTestComponentFactory()); var testFixture = await testBed.create(); var element = testFixture.rootElement; @@ -39,7 +39,7 @@ void main() { }); test('should handle nested if correctly', () async { - var testBed = NgTestBed(ng.createNgIfNestedTestComponentFactory()); + var testBed = NgTestBed(ng.createNgIfNestedTestComponentFactory()); var testFixture = await testBed.create(); var element = testFixture.rootElement; @@ -75,7 +75,7 @@ void main() { }); test('should update multiple bindings', () async { - var testBed = NgTestBed(ng.createNgIfMultiUpdateTestComponentFactory()); + var testBed = NgTestBed(ng.createNgIfMultiUpdateTestComponentFactory()); var testFixture = await testBed.create(); var element = testFixture.rootElement; // Check startup. @@ -101,7 +101,7 @@ void main() { test('should throw during change detection if getter changes', () async { var testBed = - NgTestBed(ng.createNgIfThrowsDuringChangeDetectionFactory()); + NgTestBed(ng.createNgIfThrowsDuringChangeDetectionFactory()); var fixture = await testBed.create(); expect( fixture.update((c) => c.startFailing = true), diff --git a/_tests/test/common/directives/ng_class_test.dart b/_tests/test/common/directives/ng_class_test.dart index b8769236e0..d640722fad 100644 --- a/_tests/test/common/directives/ng_class_test.dart +++ b/_tests/test/common/directives/ng_class_test.dart @@ -1,8 +1,8 @@ import 'dart:html'; import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'ng_class_test.template.dart' as ng; @@ -11,7 +11,7 @@ void main() { group('ngClass', () { test('should clean up when the directive is destroyed', () async { - var testBed = NgTestBed(ng.createDestroyClassTestFactory()); + var testBed = NgTestBed(ng.createDestroyClassTestFactory()); var testFixture = await testBed.create(); await testFixture.update((DestroyClassTest component) { component.items = [ @@ -31,7 +31,7 @@ void main() { test('should add classes specified in map without change in class names', () async { - var testBed = NgTestBed(ng.createClassWithNamesFactory()); + var testBed = NgTestBed(ng.createClassWithNamesFactory()); var testFixture = await testBed.create(); expect( testFixture.rootElement.querySelector('div')!.classes, @@ -40,7 +40,7 @@ void main() { }); test('should update classes based on changes in map values', () async { - var testBed = NgTestBed(ng.createConditionMapTestFactory()); + var testBed = NgTestBed(ng.createConditionMapTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; expect(content.classes, equals(['foo'])); @@ -51,7 +51,7 @@ void main() { }); test('should update classes based on changes to the map', () async { - var testBed = NgTestBed(ng.createMapUpdateTestFactory()); + var testBed = NgTestBed(ng.createMapUpdateTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; expect(content.classes, equals(['foo'])); @@ -71,7 +71,7 @@ void main() { test('should update classes based on reference changes to the map', () async { - var testBed = NgTestBed(ng.createMapUpdateTestFactory()); + var testBed = NgTestBed(ng.createMapUpdateTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; expect(content.classes, equals(['foo'])); @@ -86,7 +86,7 @@ void main() { }); test('should remove classes when expression is null', () async { - var testBed = NgTestBed(ng.createMapUpdateTestFactory()); + var testBed = NgTestBed(ng.createMapUpdateTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; expect(content.classes, equals(['foo'])); @@ -101,7 +101,7 @@ void main() { }); test('should allow multiple classes per expression', () async { - var testBed = NgTestBed(ng.createMapUpdateTestFactory()); + var testBed = NgTestBed(ng.createMapUpdateTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; await testFixture.update((MapUpdateTest component) { @@ -115,7 +115,7 @@ void main() { }); test('should split by one or more spaces between classes', () async { - var testBed = NgTestBed(ng.createMapUpdateTestFactory()); + var testBed = NgTestBed(ng.createMapUpdateTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; await testFixture.update((MapUpdateTest component) { @@ -125,7 +125,7 @@ void main() { }); test('should update classes based on changes to the list', () async { - var testBed = NgTestBed(ng.createListUpdateTestFactory()); + var testBed = NgTestBed(ng.createListUpdateTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; expect(content.classes, equals(['foo'])); @@ -144,7 +144,7 @@ void main() { }); test('should update classes when list reference changes', () async { - var testBed = NgTestBed(ng.createListUpdateTestFactory()); + var testBed = NgTestBed(ng.createListUpdateTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; expect(content.classes, equals(['foo'])); @@ -156,7 +156,7 @@ void main() { test('should take initial classes into account when a reference changes', () async { - var testBed = NgTestBed(ng.createListUpdateWithInitialTestFactory()); + var testBed = NgTestBed(ng.createListUpdateWithInitialTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; expect(content.classes, equals(['foo'])); @@ -167,7 +167,7 @@ void main() { }); test('should ignore empty or blank class names', () async { - var testBed = NgTestBed(ng.createListUpdateWithInitialTestFactory()); + var testBed = NgTestBed(ng.createListUpdateWithInitialTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; await testFixture.update((ListUpdateWithInitialTest component) { @@ -177,7 +177,7 @@ void main() { }); test('should trim blanks from class names', () async { - var testBed = NgTestBed(ng.createListUpdateWithInitialTestFactory()); + var testBed = NgTestBed(ng.createListUpdateWithInitialTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; await testFixture.update((ListUpdateWithInitialTest component) { @@ -187,7 +187,7 @@ void main() { }); test('should allow multiple classes per item in lists', () async { - var testBed = NgTestBed(ng.createListUpdateTestFactory()); + var testBed = NgTestBed(ng.createListUpdateTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; await testFixture.update((ListUpdateTest component) { @@ -202,7 +202,7 @@ void main() { }); test('should update classes if the set instance changes', () async { - var testBed = NgTestBed(ng.createSetUpdateTestFactory()); + var testBed = NgTestBed(ng.createSetUpdateTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; var set = {}; @@ -220,14 +220,14 @@ void main() { }); test('should add classes specified in a string literal', () async { - var testBed = NgTestBed(ng.createStringLiteralTestFactory()); + var testBed = NgTestBed(ng.createStringLiteralTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; expect(content.classes, equals(['foo', 'bar', 'foo-bar', 'fooBar'])); }); test('should update classes based on changes to the string', () async { - var testBed = NgTestBed(ng.createStringUpdateTestFactory()); + var testBed = NgTestBed(ng.createStringUpdateTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; expect(content.classes, equals(['foo'])); @@ -243,7 +243,7 @@ void main() { test('should remove active classes when switching from string to null', () async { - var testBed = NgTestBed(ng.createStringUpdateTestFactory()); + var testBed = NgTestBed(ng.createStringUpdateTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; expect(content.classes, equals(['foo'])); @@ -256,7 +256,7 @@ void main() { test( 'should take initial classes into account when ' 'switching from string to null', () async { - var testBed = NgTestBed(ng.createStringUpdateWithInitialTestFactory()); + var testBed = NgTestBed(ng.createStringUpdateWithInitialTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; expect(content.classes, equals(['foo'])); @@ -267,7 +267,7 @@ void main() { }); test('should ignore empty and blank strings', () async { - var testBed = NgTestBed(ng.createStringUpdateWithInitialTestFactory()); + var testBed = NgTestBed(ng.createStringUpdateWithInitialTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; await testFixture.update((StringUpdateWithInitialTest component) { @@ -277,7 +277,7 @@ void main() { }); test('should cooperate with the class attribute', () async { - var testBed = NgTestBed(ng.createMapUpdateWithInitialTestFactory()); + var testBed = NgTestBed(ng.createMapUpdateWithInitialTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; await testFixture.update((MapUpdateWithInitialTest component) { @@ -296,7 +296,7 @@ void main() { test('should cooperate with interpolated class attribute', () async { var testBed = - NgTestBed(ng.createMapUpdateWithInitialInterpolationTestFactory()); + NgTestBed(ng.createMapUpdateWithInitialInterpolationTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; await testFixture @@ -318,7 +318,7 @@ void main() { test('should cooperate with class attribute and binding to it', () async { var testBed = - NgTestBed(ng.createMapUpdateWithInitialBindingTestFactory()); + NgTestBed(ng.createMapUpdateWithInitialBindingTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; await testFixture.update((MapUpdateWithInitialBindingTest component) { @@ -338,7 +338,7 @@ void main() { test('should cooperate with class attribute and class.name binding', () async { var testBed = - NgTestBed(ng.createMapUpdateWithConditionBindingTestFactory()); + NgTestBed(ng.createMapUpdateWithConditionBindingTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; expect(content.classes, equals(['init', 'foo', 'baz'])); @@ -359,7 +359,7 @@ void main() { test( 'should cooperate with initial class and class ' 'attribute binding when binding changes', () async { - var testBed = NgTestBed(ng.createMapUpdateWithStringBindingTestFactory()); + var testBed = NgTestBed(ng.createMapUpdateWithStringBindingTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; expect(content.classes, equals(['init', 'foo'])); @@ -381,7 +381,7 @@ void main() { 'should cooperate with interpolated class attribute ' 'and clas.name binding', () async { var testBed = - NgTestBed(ng.createInterpolationWithConditionBindingTestFactory()); + NgTestBed(ng.createInterpolationWithConditionBindingTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; expect(content.classes, equals(['foo', 'baz'])); diff --git a/_tests/test/common/directives/ng_style_test.dart b/_tests/test/common/directives/ng_style_test.dart index 94e2bce508..db05502975 100644 --- a/_tests/test/common/directives/ng_style_test.dart +++ b/_tests/test/common/directives/ng_style_test.dart @@ -1,6 +1,6 @@ import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'ng_style_test.template.dart' as ng; @@ -9,7 +9,7 @@ void main() { tearDown(() => disposeAnyRunningTest()); test('should update styles specified in an map literal', () async { - var testBed = NgTestBed(ng.createMapUpdateTestFactory()); + var testBed = NgTestBed(ng.createMapUpdateTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; await testFixture.update((MapUpdateTest component) { @@ -23,7 +23,7 @@ void main() { }); test('should remove styles when deleting a key in a map literal', () async { - var testBed = NgTestBed(ng.createMapUpdateTestFactory()); + var testBed = NgTestBed(ng.createMapUpdateTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; await testFixture.update((MapUpdateTest component) { @@ -37,7 +37,7 @@ void main() { }); test('should cooperate with the style attribute', () async { - var testBed = NgTestBed(ng.createMapUpdateWithDefaultTestFactory()); + var testBed = NgTestBed(ng.createMapUpdateWithDefaultTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; await testFixture.update((MapUpdateWithDefaultTest component) { @@ -54,7 +54,7 @@ void main() { test('should cooperate with the style.[styleName]="expr" special-case', () async { - var testBed = NgTestBed(ng.createMapUpdateWithStyleExprTestFactory()); + var testBed = NgTestBed(ng.createMapUpdateWithStyleExprTestFactory()); var testFixture = await testBed.create(); var content = testFixture.rootElement.querySelector('div')!; await testFixture.update((MapUpdateWithStyleExprTest component) { diff --git a/_tests/test/common/directives/ng_switch_test.dart b/_tests/test/common/directives/ng_switch_test.dart index d1c3f7c86d..5bfb48a2a3 100644 --- a/_tests/test/common/directives/ng_switch_test.dart +++ b/_tests/test/common/directives/ng_switch_test.dart @@ -1,6 +1,6 @@ import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'ng_switch_test.template.dart' as ng; @@ -9,7 +9,7 @@ void main() { tearDown(() => disposeAnyRunningTest()); test('should switch amongst when values', () async { - var testBed = NgTestBed(ng.createSwitchWhenTestFactory()); + var testBed = NgTestBed(ng.createSwitchWhenTestFactory()); var testFixture = await testBed.create(); expect(testFixture.text!.trim(), ''); await testFixture.update((SwitchWhenTest component) { @@ -22,7 +22,7 @@ void main() { expect(testFixture.text!.trim(), 'when b'); }); test('should switch among when-values with fallback to default', () async { - var testBed = NgTestBed(ng.createSwitchDefaultTestFactory()); + var testBed = NgTestBed(ng.createSwitchDefaultTestFactory()); var testFixture = await testBed.create(); expect(testFixture.text!.trim(), 'when default'); await testFixture.update((SwitchDefaultTest component) { @@ -39,7 +39,7 @@ void main() { expect(testFixture.text!.trim(), 'when default'); }); test('should support multiple whens with the same value', () async { - var testBed = NgTestBed(ng.createSwitchMultipleWhenTestFactory()); + var testBed = NgTestBed(ng.createSwitchMultipleWhenTestFactory()); var testFixture = await testBed.create(); expect(testFixture.text, allOf(contains('when default1;'), contains('when default2;'))); @@ -55,7 +55,7 @@ void main() { testFixture.text, allOf(contains('when b1;'), contains('when b2;'))); }); test('should change after when-values change', () async { - var testBed = NgTestBed(ng.createSwitchWhenValueTestFactory()); + var testBed = NgTestBed(ng.createSwitchWhenValueTestFactory()); var testFixture = await testBed.create(); await testFixture.update((SwitchWhenValueTest component) { component.when1 = 'a'; @@ -81,7 +81,7 @@ void main() { expect(testFixture.text!.trim(), 'when default;'); }); test('should match equal, but not identical, string cases', () async { - final testBed = NgTestBed(ng.createSwitchEqualStringsTestFactory()); + final testBed = NgTestBed(ng.createSwitchEqualStringsTestFactory()); final testFixture = await testBed.create(beforeChangeDetection: (comp) { comp.switchCase = 'one'; }); diff --git a/_tests/test/common/directives/ng_template_outlet_test.dart b/_tests/test/common/directives/ng_template_outlet_test.dart index 2ec5760ee6..293fea3dfc 100644 --- a/_tests/test/common/directives/ng_template_outlet_test.dart +++ b/_tests/test/common/directives/ng_template_outlet_test.dart @@ -1,7 +1,7 @@ import 'package:test/test.dart'; import 'package:_tests/matchers.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'ng_template_outlet_test.template.dart' as ng; @@ -10,14 +10,14 @@ void main() { group('insert', () { test('should do nothing if templateRef is null', () async { - var testBed = NgTestBed(ng.createTestWithNullComponentFactory()); + var testBed = NgTestBed(ng.createTestWithNullComponentFactory()); var testFixture = await testBed.create(); var element = testFixture.rootElement; expect(element, hasTextContent('')); }); test('should insert content specified by TemplateRef', () async { - var testBed = NgTestBed(ng.createTestInsertContentComponentFactory()); + var testBed = NgTestBed(ng.createTestInsertContentComponentFactory()); var testFixture = await testBed.create(); var element = testFixture.rootElement; expect(element, hasTextContent('')); @@ -29,7 +29,7 @@ void main() { }); test('should clear content if TemplateRef becomes null', () async { - var testBed = NgTestBed(ng.createTestClearContentComponentFactory()); + var testBed = NgTestBed(ng.createTestClearContentComponentFactory()); var testFixture = await testBed.create(); var element = testFixture.rootElement; var refs = testFixture.assertOnlyInstance.refs; @@ -45,7 +45,7 @@ void main() { }); test('should swap content if TemplateRef changes', () async { - var testBed = NgTestBed(ng.createTestChangeContentComponentFactory()); + var testBed = NgTestBed(ng.createTestChangeContentComponentFactory()); var testFixture = await testBed.create(); var element = testFixture.rootElement; var refs = testFixture.assertOnlyInstance.refs; @@ -62,7 +62,7 @@ void main() { group('[ngTemplateOutletContext]', () { test('should update on changes', () async { - final testBed = NgTestBed(ng.createTestContextChangeComponentFactory()); + final testBed = NgTestBed(ng.createTestContextChangeComponentFactory()); final testFixture = await testBed.create(); expect(testFixture.text, contains('foo')); await testFixture.update((component) { @@ -72,7 +72,7 @@ void main() { }); test('should update when identity changes', () async { - final testBed = NgTestBed(ng.createTestContextChangeComponentFactory()); + final testBed = NgTestBed(ng.createTestContextChangeComponentFactory()); final testFixture = await testBed.create(); expect(testFixture.text, contains('foo')); await testFixture.update((component) { @@ -85,7 +85,7 @@ void main() { test('should reapply when [ngTemplateOutlet] changes', () async { final testBed = - NgTestBed(ng.createTestContextTemplateRefChangeComponentFactory()); + NgTestBed(ng.createTestContextTemplateRefChangeComponentFactory()); final testFixture = await testBed.create(); expect(testFixture.text, contains('Hello world!')); await testFixture.update((component) { @@ -95,7 +95,7 @@ void main() { }); test('should support *-syntax', () async { - final testBed = NgTestBed(ng.createTestStarSyntaxFactory()); + final testBed = NgTestBed(ng.createTestStarSyntaxFactory()); final testFixture = await testBed.create(); expect( testFixture.text, @@ -105,7 +105,7 @@ void main() { }); test('should support [ngTemplateOutletValue] as a short-hand', () async { - final testBed = NgTestBed(ng.createTestValueInputFactory()); + final testBed = NgTestBed(ng.createTestValueInputFactory()); final testFixture = await testBed.create(beforeChangeDetection: (c) { c.value = 'Hello World'; }); @@ -113,7 +113,7 @@ void main() { }); test('should not crash setting and resetting [ngTemplateOutlet]', () async { - final testBed = NgTestBed(ng.createTestSetTemplateFactory()); + final testBed = NgTestBed(ng.createTestSetTemplateFactory()); final testFixture = await testBed.create(); await testFixture.update((component) { // This sets the active view within `NgTemplateOutlet`. diff --git a/_tests/test/common/pipes/async_pipe_test.dart b/_tests/test/common/pipes/async_pipe_test.dart index af02dd03ba..48aaf4c25a 100644 --- a/_tests/test/common/pipes/async_pipe_test.dart +++ b/_tests/test/common/pipes/async_pipe_test.dart @@ -1,7 +1,7 @@ import 'dart:async'; -import 'package:angular/angular.dart'; -import 'package:angular/src/common/pipes/invalid_pipe_argument_exception.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngdart/src/common/pipes/invalid_pipe_argument_exception.dart'; import 'package:test/test.dart'; void main() { diff --git a/_tests/test/common/pipes/date_pipe_test.dart b/_tests/test/common/pipes/date_pipe_test.dart index 0677eb5892..c23afb9822 100644 --- a/_tests/test/common/pipes/date_pipe_test.dart +++ b/_tests/test/common/pipes/date_pipe_test.dart @@ -1,5 +1,5 @@ import 'package:test/test.dart'; -import 'package:angular/angular.dart'; +import 'package:ngdart/angular.dart'; void main() { group('DatePipe', () { diff --git a/_tests/test/common/pipes/lowercase_pipe_test.dart b/_tests/test/common/pipes/lowercase_pipe_test.dart index d8ed13067d..78458f7e5d 100644 --- a/_tests/test/common/pipes/lowercase_pipe_test.dart +++ b/_tests/test/common/pipes/lowercase_pipe_test.dart @@ -1,5 +1,5 @@ import 'package:test/test.dart'; -import 'package:angular/src/common/pipes/lowercase_pipe.dart'; +import 'package:ngdart/src/common/pipes/lowercase_pipe.dart'; void main() { group('LowerCasePipe', () { diff --git a/_tests/test/common/pipes/number_pipe_test.dart b/_tests/test/common/pipes/number_pipe_test.dart index 778e25cc24..1e5f730df1 100644 --- a/_tests/test/common/pipes/number_pipe_test.dart +++ b/_tests/test/common/pipes/number_pipe_test.dart @@ -1,5 +1,5 @@ import 'package:test/test.dart'; -import 'package:angular/src/common/pipes/number_pipe.dart'; +import 'package:ngdart/src/common/pipes/number_pipe.dart'; void main() { group('Number pipes', () { diff --git a/_tests/test/common/pipes/replace_pipe_test.dart b/_tests/test/common/pipes/replace_pipe_test.dart index 61d48c35c0..db452f3a8f 100644 --- a/_tests/test/common/pipes/replace_pipe_test.dart +++ b/_tests/test/common/pipes/replace_pipe_test.dart @@ -1,6 +1,6 @@ import 'package:test/test.dart'; -import 'package:angular/src/common/pipes/invalid_pipe_argument_exception.dart'; -import 'package:angular/src/common/pipes/replace_pipe.dart'; +import 'package:ngdart/src/common/pipes/invalid_pipe_argument_exception.dart'; +import 'package:ngdart/src/common/pipes/replace_pipe.dart'; final someNumber = 42; final str = 'Douglas Adams'; diff --git a/_tests/test/common/pipes/slice_pipe_test.dart b/_tests/test/common/pipes/slice_pipe_test.dart index 950b2171c9..993699b9d2 100644 --- a/_tests/test/common/pipes/slice_pipe_test.dart +++ b/_tests/test/common/pipes/slice_pipe_test.dart @@ -1,7 +1,7 @@ import 'package:test/test.dart'; import 'package:_tests/matchers.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'slice_pipe_test.template.dart' as ng; @@ -75,7 +75,7 @@ void main() { }); group('integration', () { test('should work with mutable arrays', () async { - var testBed = NgTestBed(ng.createTestCompFactory()); + var testBed = NgTestBed(ng.createTestCompFactory()); var testFixture = await testBed.create(); var el = testFixture.rootElement; var mutable = [1, 2]; diff --git a/_tests/test/common/pipes/uppercase_pipe_test.dart b/_tests/test/common/pipes/uppercase_pipe_test.dart index 176aefc561..0527e4f701 100644 --- a/_tests/test/common/pipes/uppercase_pipe_test.dart +++ b/_tests/test/common/pipes/uppercase_pipe_test.dart @@ -1,5 +1,5 @@ import 'package:test/test.dart'; -import 'package:angular/src/common/pipes/uppercase_pipe.dart'; +import 'package:ngdart/src/common/pipes/uppercase_pipe.dart'; void main() { group('UpperCasePipe', () { diff --git a/_tests/test/compiler/analyzed_class_test.dart b/_tests/test/compiler/analyzed_class_test.dart index f08da98008..89a7ba5e78 100644 --- a/_tests/test/compiler/analyzed_class_test.dart +++ b/_tests/test/compiler/analyzed_class_test.dart @@ -3,8 +3,8 @@ import 'package:analyzer/dart/element/element.dart'; import 'package:analyzer/dart/element/visitor.dart'; import 'package:test/test.dart'; -import 'package:angular_compiler/v1/src/compiler/analyzed_class.dart'; -import 'package:angular_compiler/v1/src/compiler/expression_parser/ast.dart'; +import 'package:ngcompiler/v1/src/compiler/analyzed_class.dart'; +import 'package:ngcompiler/v1/src/compiler/expression_parser/ast.dart'; import '../resolve_util.dart'; diff --git a/_tests/test/compiler/ast_directive_normalizer_test.dart b/_tests/test/compiler/ast_directive_normalizer_test.dart index 115a4dfa4e..2d5ab7011d 100644 --- a/_tests/test/compiler/ast_directive_normalizer_test.dart +++ b/_tests/test/compiler/ast_directive_normalizer_test.dart @@ -3,11 +3,11 @@ import 'package:build_test/build_test.dart'; import 'package:logging/logging.dart'; import 'package:test/test.dart'; -import 'package:angular/src/meta.dart'; -import 'package:angular_compiler/v1/angular_compiler.dart'; -import 'package:angular_compiler/v1/src/compiler/ast_directive_normalizer.dart'; -import 'package:angular_compiler/v1/src/compiler/compile_metadata.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngdart/src/meta.dart'; +import 'package:ngcompiler/v1/angular_compiler.dart'; +import 'package:ngcompiler/v1/src/compiler/ast_directive_normalizer.dart'; +import 'package:ngcompiler/v1/src/compiler/compile_metadata.dart'; +import 'package:ngcompiler/v2/context.dart'; void main() { CompileDirectiveMetadata metadata; diff --git a/_tests/test/compiler/ast_template_optimize_test.dart b/_tests/test/compiler/ast_template_optimize_test.dart index c95087c776..81311843fc 100644 --- a/_tests/test/compiler/ast_template_optimize_test.dart +++ b/_tests/test/compiler/ast_template_optimize_test.dart @@ -1,13 +1,13 @@ // @dart=2.9 import 'package:test/test.dart'; -import 'package:angular_compiler/v1/cli.dart'; -import 'package:angular_compiler/v1/src/compiler/expression_parser/parser.dart'; -import 'package:angular_compiler/v1/src/compiler/schema/dom_element_schema_registry.dart'; -import 'package:angular_compiler/v1/src/compiler/template_ast.dart'; -import 'package:angular_compiler/v1/src/compiler/template_compiler.dart'; -import 'package:angular_compiler/v1/src/compiler/template_parser/ast_template_parser.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v1/cli.dart'; +import 'package:ngcompiler/v1/src/compiler/expression_parser/parser.dart'; +import 'package:ngcompiler/v1/src/compiler/schema/dom_element_schema_registry.dart'; +import 'package:ngcompiler/v1/src/compiler/template_ast.dart'; +import 'package:ngcompiler/v1/src/compiler/template_compiler.dart'; +import 'package:ngcompiler/v1/src/compiler/template_parser/ast_template_parser.dart'; +import 'package:ngcompiler/v2/context.dart'; import '../resolve_util.dart'; import 'template_humanizer_util.dart'; diff --git a/_tests/test/compiler/ast_template_parser_test.dart b/_tests/test/compiler/ast_template_parser_test.dart index 3594dda6d9..b8713f2871 100644 --- a/_tests/test/compiler/ast_template_parser_test.dart +++ b/_tests/test/compiler/ast_template_parser_test.dart @@ -6,20 +6,20 @@ import 'package:logging/logging.dart'; import 'package:term_glyph/term_glyph.dart' as term_glyph; import 'package:test/test.dart'; import 'package:_tests/test_util.dart'; -import 'package:angular_compiler/v1/cli.dart'; -import 'package:angular_compiler/v1/src/compiler/analyzed_class.dart'; -import 'package:angular_compiler/v1/src/compiler/compile_metadata.dart'; -import 'package:angular_compiler/v1/src/compiler/expression_parser/parser.dart'; -import 'package:angular_compiler/v1/src/compiler/identifiers.dart' +import 'package:ngcompiler/v1/cli.dart'; +import 'package:ngcompiler/v1/src/compiler/analyzed_class.dart'; +import 'package:ngcompiler/v1/src/compiler/compile_metadata.dart'; +import 'package:ngcompiler/v1/src/compiler/expression_parser/parser.dart'; +import 'package:ngcompiler/v1/src/compiler/identifiers.dart' show identifierToken, Identifiers; -import 'package:angular_compiler/v1/src/compiler/js_split_facade.dart'; -import 'package:angular_compiler/v1/src/compiler/output/output_ast.dart' as o; -import 'package:angular_compiler/v1/src/compiler/schema/dom_element_schema_registry.dart'; -import 'package:angular_compiler/v1/src/compiler/schema/element_schema_registry.dart' +import 'package:ngcompiler/v1/src/compiler/js_split_facade.dart'; +import 'package:ngcompiler/v1/src/compiler/output/output_ast.dart' as o; +import 'package:ngcompiler/v1/src/compiler/schema/dom_element_schema_registry.dart'; +import 'package:ngcompiler/v1/src/compiler/schema/element_schema_registry.dart' show ElementSchemaRegistry; -import 'package:angular_compiler/v1/src/compiler/template_ast.dart'; -import 'package:angular_compiler/v1/src/compiler/template_parser/ast_template_parser.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v1/src/compiler/template_ast.dart'; +import 'package:ngcompiler/v1/src/compiler/template_parser/ast_template_parser.dart'; +import 'package:ngcompiler/v2/context.dart'; import 'schema_registry_mock.dart' show MockSchemaRegistry; import 'template_humanizer_util.dart'; diff --git a/_tests/test/compiler/expression_parser/analyzer_test.dart b/_tests/test/compiler/expression_parser/analyzer_test.dart index 72e2ea8379..271412e302 100644 --- a/_tests/test/compiler/expression_parser/analyzer_test.dart +++ b/_tests/test/compiler/expression_parser/analyzer_test.dart @@ -1,10 +1,10 @@ // @dart=2.9 import 'package:test/test.dart'; -import 'package:angular_compiler/v1/src/compiler/expression_parser/analyzer_parser.dart'; -import 'package:angular_compiler/v1/src/compiler/expression_parser/ast.dart' +import 'package:ngcompiler/v1/src/compiler/expression_parser/analyzer_parser.dart'; +import 'package:ngcompiler/v1/src/compiler/expression_parser/ast.dart' as ast; -import 'package:angular_compiler/v1/src/compiler/expression_parser/parser.dart'; +import 'package:ngcompiler/v1/src/compiler/expression_parser/parser.dart'; import 'unparser.dart'; diff --git a/_tests/test/compiler/expression_parser/parser_test.dart b/_tests/test/compiler/expression_parser/parser_test.dart index 9fa0b47900..aae70c3881 100644 --- a/_tests/test/compiler/expression_parser/parser_test.dart +++ b/_tests/test/compiler/expression_parser/parser_test.dart @@ -2,13 +2,13 @@ import 'package:test/test.dart'; import 'package:_tests/test_util.dart'; -import 'package:angular_compiler/v1/src/compiler/compile_metadata.dart' +import 'package:ngcompiler/v1/src/compiler/compile_metadata.dart' show CompileIdentifierMetadata; -import 'package:angular_compiler/v1/src/compiler/expression_parser/ast.dart' +import 'package:ngcompiler/v1/src/compiler/expression_parser/ast.dart' show ASTWithSource, Interpolation, PropertyRead; -import 'package:angular_compiler/v1/src/compiler/expression_parser/parser.dart' +import 'package:ngcompiler/v1/src/compiler/expression_parser/parser.dart' show ParseException, ExpressionParser; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; import 'unparser.dart' show Unparser; diff --git a/_tests/test/compiler/expression_parser/unparser.dart b/_tests/test/compiler/expression_parser/unparser.dart index 2f3ebeaf53..3fb6e3bb14 100644 --- a/_tests/test/compiler/expression_parser/unparser.dart +++ b/_tests/test/compiler/expression_parser/unparser.dart @@ -1,6 +1,6 @@ // @dart=2.9 -import 'package:angular_compiler/v1/src/compiler/expression_parser/ast.dart'; +import 'package:ngcompiler/v1/src/compiler/expression_parser/ast.dart'; class Unparser implements AstVisitor { static final _quoteRegExp = RegExp(r'"'); diff --git a/_tests/test/compiler/output/abstract_emitter_test.dart b/_tests/test/compiler/output/abstract_emitter_test.dart index 77457c10d6..65658df834 100644 --- a/_tests/test/compiler/output/abstract_emitter_test.dart +++ b/_tests/test/compiler/output/abstract_emitter_test.dart @@ -1,7 +1,7 @@ // @dart=2.9 import 'package:test/test.dart'; -import 'package:angular_compiler/v1/src/compiler/output/abstract_emitter.dart' +import 'package:ngcompiler/v1/src/compiler/output/abstract_emitter.dart' show escapeSingleQuoteString; void main() { diff --git a/_tests/test/compiler/output/dart_emitter_test.dart b/_tests/test/compiler/output/dart_emitter_test.dart index 0191ec3e8d..c245b1336f 100644 --- a/_tests/test/compiler/output/dart_emitter_test.dart +++ b/_tests/test/compiler/output/dart_emitter_test.dart @@ -1,11 +1,11 @@ // @dart=2.9 import 'package:test/test.dart'; -import 'package:angular_compiler/v1/src/compiler/compile_metadata.dart' +import 'package:ngcompiler/v1/src/compiler/compile_metadata.dart' show CompileIdentifierMetadata; -import 'package:angular_compiler/v1/src/compiler/output/dart_emitter.dart' +import 'package:ngcompiler/v1/src/compiler/output/dart_emitter.dart' show DartEmitter; -import 'package:angular_compiler/v1/src/compiler/output/output_ast.dart' as o; +import 'package:ngcompiler/v1/src/compiler/output/output_ast.dart' as o; var someModuleUrl = 'asset:somePackage/lib/somePath'; var anotherModuleUrl = 'asset:somePackage/lib/someOtherPath'; diff --git a/_tests/test/compiler/output/path_util_test.dart b/_tests/test/compiler/output/path_util_test.dart index e9007bd63a..3799eb8271 100644 --- a/_tests/test/compiler/output/path_util_test.dart +++ b/_tests/test/compiler/output/path_util_test.dart @@ -2,7 +2,7 @@ import 'package:test/test.dart'; import 'package:_tests/test_util.dart'; -import 'package:angular_compiler/v1/src/compiler/output/path_util.dart' +import 'package:ngcompiler/v1/src/compiler/output/path_util.dart' show getImportModulePath; void main() { diff --git a/_tests/test/compiler/provider_forest_test.dart b/_tests/test/compiler/provider_forest_test.dart index 938e5d2481..326fa7db3a 100644 --- a/_tests/test/compiler/provider_forest_test.dart +++ b/_tests/test/compiler/provider_forest_test.dart @@ -1,8 +1,8 @@ // @dart=2.9 import 'package:test/test.dart'; -import 'package:angular_compiler/v1/src/compiler/output/output_ast.dart' as o; -import 'package:angular_compiler/v1/src/compiler/view_compiler/provider_forest.dart'; +import 'package:ngcompiler/v1/src/compiler/output/output_ast.dart' as o; +import 'package:ngcompiler/v1/src/compiler/view_compiler/provider_forest.dart'; void main() { final a = ProviderInstance([], o.NULL_EXPR); diff --git a/_tests/test/compiler/schema/dom_element_schema_registry_test.dart b/_tests/test/compiler/schema/dom_element_schema_registry_test.dart index 469867bbdb..1c1376c2e8 100644 --- a/_tests/test/compiler/schema/dom_element_schema_registry_test.dart +++ b/_tests/test/compiler/schema/dom_element_schema_registry_test.dart @@ -1,9 +1,9 @@ // @dart=2.9 import 'package:test/test.dart'; -import 'package:angular_compiler/v1/src/compiler/schema/dom_element_schema_registry.dart' +import 'package:ngcompiler/v1/src/compiler/schema/dom_element_schema_registry.dart' show DomElementSchemaRegistry; -import 'package:angular_compiler/v1/src/compiler/security.dart'; +import 'package:ngcompiler/v1/src/compiler/security.dart'; void main() { group('DOMElementSchema', () { diff --git a/_tests/test/compiler/schema_registry_mock.dart b/_tests/test/compiler/schema_registry_mock.dart index d9e3b95794..d2379c1612 100644 --- a/_tests/test/compiler/schema_registry_mock.dart +++ b/_tests/test/compiler/schema_registry_mock.dart @@ -1,7 +1,7 @@ // @dart=2.9 -import 'package:angular_compiler/v1/src/compiler/schema/element_schema_registry.dart'; -import 'package:angular_compiler/v1/src/compiler/security.dart'; +import 'package:ngcompiler/v1/src/compiler/schema/element_schema_registry.dart'; +import 'package:ngcompiler/v1/src/compiler/security.dart'; class MockSchemaRegistry implements ElementSchemaRegistry { final Map existingProperties; diff --git a/_tests/test/compiler/selector_test.dart b/_tests/test/compiler/selector_test.dart index 770bed417f..e9a7d9e43b 100644 --- a/_tests/test/compiler/selector_test.dart +++ b/_tests/test/compiler/selector_test.dart @@ -2,8 +2,8 @@ import 'package:test/test.dart'; import 'package:_tests/test_util.dart'; -import 'package:angular_compiler/v1/src/compiler/attribute_matcher.dart'; -import 'package:angular_compiler/v1/src/compiler/selector.dart' +import 'package:ngcompiler/v1/src/compiler/attribute_matcher.dart'; +import 'package:ngcompiler/v1/src/compiler/selector.dart' show CssSelector, SelectorMatcher; void main() { diff --git a/_tests/test/compiler/shadow_css_test.dart b/_tests/test/compiler/shadow_css_test.dart index 0c366823d3..134422af75 100644 --- a/_tests/test/compiler/shadow_css_test.dart +++ b/_tests/test/compiler/shadow_css_test.dart @@ -4,7 +4,7 @@ import 'dart:async'; import 'package:logging/logging.dart'; import 'package:test/test.dart'; -import 'package:angular_compiler/v1/src/compiler/stylesheet_compiler/shadow_css.dart'; +import 'package:ngcompiler/v1/src/compiler/stylesheet_compiler/shadow_css.dart'; const content = 'content'; const host = 'host'; diff --git a/_tests/test/compiler/style_url_resolver_test.dart b/_tests/test/compiler/style_url_resolver_test.dart index 97e45fb4e5..ff5be9d9f9 100644 --- a/_tests/test/compiler/style_url_resolver_test.dart +++ b/_tests/test/compiler/style_url_resolver_test.dart @@ -1,8 +1,8 @@ // @dart=2.9 import 'package:test/test.dart'; -import 'package:angular_compiler/v1/angular_compiler.dart'; -import 'package:angular_compiler/v1/src/compiler/style_url_resolver.dart' +import 'package:ngcompiler/v1/angular_compiler.dart'; +import 'package:ngcompiler/v1/src/compiler/style_url_resolver.dart' show extractStyleUrls, isStyleUrlResolvable; void main() { diff --git a/_tests/test/compiler/template_humanizer_util.dart b/_tests/test/compiler/template_humanizer_util.dart index bbb252e6d7..bb605cc4b4 100644 --- a/_tests/test/compiler/template_humanizer_util.dart +++ b/_tests/test/compiler/template_humanizer_util.dart @@ -1,7 +1,7 @@ // @dart=2.9 -import 'package:angular_compiler/v1/src/compiler/output/dart_emitter.dart'; -import 'package:angular_compiler/v1/src/compiler/template_ast.dart'; +import 'package:ngcompiler/v1/src/compiler/output/dart_emitter.dart'; +import 'package:ngcompiler/v1/src/compiler/template_ast.dart'; import 'expression_parser/unparser.dart' show Unparser; diff --git a/_tests/test/compiler_integration/errors_in_part_of_file_test.dart b/_tests/test/compiler_integration/errors_in_part_of_file_test.dart index 2dfa5bbbd1..66ee9cfb78 100644 --- a/_tests/test/compiler_integration/errors_in_part_of_file_test.dart +++ b/_tests/test/compiler_integration/errors_in_part_of_file_test.dart @@ -2,7 +2,7 @@ import 'package:test/test.dart'; import 'package:_tests/compiler.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; void main() { CompileContext.overrideForTesting(); diff --git a/_tests/test/compiler_integration/inject_optional_non_nullable_test.dart b/_tests/test/compiler_integration/inject_optional_non_nullable_test.dart index 067b44e06e..0f76773460 100644 --- a/_tests/test/compiler_integration/inject_optional_non_nullable_test.dart +++ b/_tests/test/compiler_integration/inject_optional_non_nullable_test.dart @@ -3,7 +3,7 @@ import 'package:build/build.dart'; import 'package:test/test.dart'; import 'package:_tests/compiler.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; void main() { setUp(CompileContext.overrideForTesting); diff --git a/_tests/test/compiler_integration/injectable_annotation_test.dart b/_tests/test/compiler_integration/injectable_annotation_test.dart index 59a27526ef..26d443ef65 100644 --- a/_tests/test/compiler_integration/injectable_annotation_test.dart +++ b/_tests/test/compiler_integration/injectable_annotation_test.dart @@ -1,7 +1,7 @@ // @dart=2.9 import 'package:_tests/compiler.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; import 'package:test/test.dart'; void main() { diff --git a/_tests/test/compiler_integration/invalid_binding_test.dart b/_tests/test/compiler_integration/invalid_binding_test.dart index 9f3a06853f..5dcca008b0 100644 --- a/_tests/test/compiler_integration/invalid_binding_test.dart +++ b/_tests/test/compiler_integration/invalid_binding_test.dart @@ -2,7 +2,7 @@ import 'package:test/test.dart'; import 'package:_tests/compiler.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; void main() { setUp(CompileContext.overrideForTesting); diff --git a/_tests/test/compiler_integration/invalid_change_detection_link_test.dart b/_tests/test/compiler_integration/invalid_change_detection_link_test.dart index e163290e10..cc010f3057 100644 --- a/_tests/test/compiler_integration/invalid_change_detection_link_test.dart +++ b/_tests/test/compiler_integration/invalid_change_detection_link_test.dart @@ -2,7 +2,7 @@ import 'package:test/test.dart'; import 'package:_tests/compiler.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; const ngExperimentalImport = 'package:$ngPackage/experimental.dart'; diff --git a/_tests/test/compiler_integration/invalid_component_test.dart b/_tests/test/compiler_integration/invalid_component_test.dart index 81e75a205c..634b047924 100644 --- a/_tests/test/compiler_integration/invalid_component_test.dart +++ b/_tests/test/compiler_integration/invalid_component_test.dart @@ -3,7 +3,7 @@ import 'package:term_glyph/term_glyph.dart' as term_glyph; import 'package:test/test.dart'; import 'package:_tests/compiler.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; void main() { setUpAll(() { diff --git a/_tests/test/compiler_integration/invalid_global_singleton_service_test.dart b/_tests/test/compiler_integration/invalid_global_singleton_service_test.dart index 41db3fe600..ae36e8a540 100644 --- a/_tests/test/compiler_integration/invalid_global_singleton_service_test.dart +++ b/_tests/test/compiler_integration/invalid_global_singleton_service_test.dart @@ -2,7 +2,7 @@ import 'package:test/test.dart'; import 'package:_tests/compiler.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; void main() { CompileContext.overrideForTesting(); diff --git a/_tests/test/compiler_integration/invalid_host_annotations_test.dart b/_tests/test/compiler_integration/invalid_host_annotations_test.dart index d32fe675ba..0bb82e446f 100644 --- a/_tests/test/compiler_integration/invalid_host_annotations_test.dart +++ b/_tests/test/compiler_integration/invalid_host_annotations_test.dart @@ -2,7 +2,7 @@ import 'package:test/test.dart'; import 'package:_tests/compiler.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; void main() { CompileContext.overrideForTesting(); diff --git a/_tests/test/compiler_integration/invalid_late_fields_test.dart b/_tests/test/compiler_integration/invalid_late_fields_test.dart index 0ec29b9894..a025623f2b 100644 --- a/_tests/test/compiler_integration/invalid_late_fields_test.dart +++ b/_tests/test/compiler_integration/invalid_late_fields_test.dart @@ -2,7 +2,7 @@ import 'package:test/test.dart'; import 'package:_tests/compiler.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; void main() { CompileContext.overrideForTesting(); diff --git a/_tests/test/compiler_integration/invalid_uri_test.dart b/_tests/test/compiler_integration/invalid_uri_test.dart index 5982ffc2ad..165aec5f44 100644 --- a/_tests/test/compiler_integration/invalid_uri_test.dart +++ b/_tests/test/compiler_integration/invalid_uri_test.dart @@ -2,7 +2,7 @@ import 'package:test/test.dart'; import 'package:_tests/compiler.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; void main() { CompileContext.overrideForTesting(); diff --git a/_tests/test/compiler_integration/null_class_attribute_test.dart b/_tests/test/compiler_integration/null_class_attribute_test.dart index 03e70b1c59..57b31e4533 100644 --- a/_tests/test/compiler_integration/null_class_attribute_test.dart +++ b/_tests/test/compiler_integration/null_class_attribute_test.dart @@ -2,7 +2,7 @@ import 'package:test/test.dart'; import 'package:_tests/compiler.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; void main() { CompileContext.overrideForTesting(); diff --git a/_tests/test/compiler_integration/on_push_validation_test.dart b/_tests/test/compiler_integration/on_push_validation_test.dart index b1c5c79580..c55d885f2f 100644 --- a/_tests/test/compiler_integration/on_push_validation_test.dart +++ b/_tests/test/compiler_integration/on_push_validation_test.dart @@ -2,7 +2,7 @@ import 'package:test/test.dart'; import 'package:_tests/compiler.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; void main() { CompileContext.overrideForTesting(); diff --git a/_tests/test/compiler_integration/unresolvable_annotation_test.dart b/_tests/test/compiler_integration/unresolvable_annotation_test.dart index 948d703586..c47f6acf87 100644 --- a/_tests/test/compiler_integration/unresolvable_annotation_test.dart +++ b/_tests/test/compiler_integration/unresolvable_annotation_test.dart @@ -2,7 +2,7 @@ import 'package:test/test.dart'; import 'package:_tests/compiler.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; void main() { CompileContext.overrideForTesting(); diff --git a/_tests/test/compiler_integration/unresolvable_export_test.dart b/_tests/test/compiler_integration/unresolvable_export_test.dart index 067047e046..6590f99291 100644 --- a/_tests/test/compiler_integration/unresolvable_export_test.dart +++ b/_tests/test/compiler_integration/unresolvable_export_test.dart @@ -2,7 +2,7 @@ import 'package:test/test.dart'; import 'package:_tests/compiler.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; void main() { CompileContext.overrideForTesting(); diff --git a/_tests/test/compiler_integration/unrevivable_const_test.dart b/_tests/test/compiler_integration/unrevivable_const_test.dart index 8d4527223a..f101773a78 100644 --- a/_tests/test/compiler_integration/unrevivable_const_test.dart +++ b/_tests/test/compiler_integration/unrevivable_const_test.dart @@ -2,7 +2,7 @@ import 'package:test/test.dart'; import 'package:_tests/compiler.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; void main() { CompileContext.overrideForTesting(); diff --git a/_tests/test/compiler_integration/unsupported_style_url_test.dart b/_tests/test/compiler_integration/unsupported_style_url_test.dart index 3f00f92374..ddd289b998 100644 --- a/_tests/test/compiler_integration/unsupported_style_url_test.dart +++ b/_tests/test/compiler_integration/unsupported_style_url_test.dart @@ -2,7 +2,7 @@ import 'package:test/test.dart'; import 'package:_tests/compiler.dart'; -import 'package:angular_compiler/v2/context.dart'; +import 'package:ngcompiler/v2/context.dart'; void main() { CompileContext.overrideForTesting(); diff --git a/_tests/test/core/application_ref_test.dart b/_tests/test/core/application_ref_test.dart index 0c98584a4f..5d40241c8f 100644 --- a/_tests/test/core/application_ref_test.dart +++ b/_tests/test/core/application_ref_test.dart @@ -2,10 +2,10 @@ import 'dart:async'; import 'dart:html'; import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular/src/core/application_ref.dart'; -import 'package:angular/src/core/linker/app_view_utils.dart'; -import 'package:angular/src/runtime/dom_events.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngdart/src/core/application_ref.dart'; +import 'package:ngdart/src/core/linker/app_view_utils.dart'; +import 'package:ngdart/src/runtime/dom_events.dart'; import 'application_ref_test.template.dart' as ng; @@ -57,7 +57,7 @@ void main() { test('replace an existing element if in the DOM', () { final existing = Element.tag('hello-component')..text = 'Loading...'; document.body!.append(existing); - final comp = appRef.bootstrap(ng.createHelloComponentFactory()); + final comp = appRef.bootstrap(ng.createHelloComponentFactory()); expect(comp.location.text, 'Hello World'); expect( document.body!.querySelector('hello-component'), @@ -66,7 +66,7 @@ void main() { }); test('create a new element if missing from the DOM', () { - final comp = appRef.bootstrap(ng.createHelloComponentFactory()); + final comp = appRef.bootstrap(ng.createHelloComponentFactory()); expect(comp.location.text, 'Hello World'); expect( document.body!.querySelector('hello-component'), diff --git a/_tests/test/core/change_detection/binding_test.dart b/_tests/test/core/change_detection/binding_test.dart index 418e198ec0..317a9d287d 100644 --- a/_tests/test/core/change_detection/binding_test.dart +++ b/_tests/test/core/change_detection/binding_test.dart @@ -1,6 +1,6 @@ import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'binding_test.template.dart' as ng; @@ -8,121 +8,120 @@ void main() { tearDown(disposeAnyRunningTest); test('should support literals', () async { - await _GetValue(ng.createTestLiteralsFactory()).runTest(); + await _GetValue(ng.createTestLiteralsFactory()).runTest(); }); test('should strip quotes from literals', () async { - await _GetValue(ng.createTestStripQuotesFactory()).runTest(); + await _GetValue(ng.createTestStripQuotesFactory()).runTest(); }); test('should support newlines in literals', () async { - await _GetValue(ng.createTestNewLinesFactory()).runTest(); + await _GetValue(ng.createTestNewLinesFactory()).runTest(); }); test('should support + operations', () async { - await _GetValue(ng.createTestAddOperationFactory()).runTest(); + await _GetValue(ng.createTestAddOperationFactory()).runTest(); }); test('should support - operations', () async { - await _GetValue(ng.createTestMinusOperationFactory()).runTest(); + await _GetValue(ng.createTestMinusOperationFactory()).runTest(); }); test('should support * operations', () async { - await _GetValue(ng.createTestMultiplyOperationFactory()).runTest(); + await _GetValue(ng.createTestMultiplyOperationFactory()).runTest(); }); test('should support / operations', () async { - await _GetValue(ng.createTestMultiplyOperationFactory()).runTest(); + await _GetValue(ng.createTestMultiplyOperationFactory()).runTest(); }); test('should support % operations', () async { - await _GetValue(ng.createTestModulusOperationFactory()).runTest(); + await _GetValue(ng.createTestModulusOperationFactory()).runTest(); }); test('should support == operations', () async { - await _GetValue(ng.createTestEqualityOperationFactory()).runTest(); + await _GetValue(ng.createTestEqualityOperationFactory()).runTest(); }); test('should support != operations', () async { - await _GetValue(ng.createTestNotEqualsOperationFactory()).runTest(); + await _GetValue(ng.createTestNotEqualsOperationFactory()).runTest(); }); test('should support === operations', () async { - await _GetValue(ng.createTestIdentityOperationFactory()).runTest(); + await _GetValue(ng.createTestIdentityOperationFactory()).runTest(); }); test('should support !== operations', () async { - await _GetValue(ng.createTestNotIdenticalOperationFactory()).runTest(); + await _GetValue(ng.createTestNotIdenticalOperationFactory()).runTest(); }); test('should support > operations', () async { - await _GetValue(ng.createTestGreaterThanOperationFactory()).runTest(); + await _GetValue(ng.createTestGreaterThanOperationFactory()).runTest(); }); test('should support < operations', () async { - await _GetValue(ng.createTestLessThanOperationFactory()).runTest(); + await _GetValue(ng.createTestLessThanOperationFactory()).runTest(); }); test('should support >= operations', () async { - await _GetValue( - ng.createTestGreaterThanOrEqualsOperationFactory(), + await _GetValue(ng.createTestGreaterThanOrEqualsOperationFactory(), ).runTest(); }); test('should support <= operations', () async { - await _GetValue(ng.createTestLessThanOrEqualsOperationFactory()).runTest(); + await _GetValue(ng.createTestLessThanOrEqualsOperationFactory()).runTest(); }); test('should support && operations', () async { - await _GetValue(ng.createTestAndOperationFactory()).runTest(); + await _GetValue(ng.createTestAndOperationFactory()).runTest(); }); test('should support || operations', () async { - await _GetValue(ng.createTestOrOperationFactory()).runTest(); + await _GetValue(ng.createTestOrOperationFactory()).runTest(); }); test('should support ternary operations', () async { - await _GetValue(ng.createTestTernaryOperationFactory()).runTest(); + await _GetValue(ng.createTestTernaryOperationFactory()).runTest(); }); test('should support ! operations', () async { - await _GetValue(ng.createTestNegateOperationFactory()).runTest(); + await _GetValue(ng.createTestNegateOperationFactory()).runTest(); }); test('should support !! operations', () async { - await _GetValue(ng.createTestDoubleNegationOperationFactory()).runTest(); + await _GetValue(ng.createTestDoubleNegationOperationFactory()).runTest(); }); test('should support keyed access to a map', () async { - await _GetValue(ng.createTestMapAccessFactory()).runTest(); + await _GetValue(ng.createTestMapAccessFactory()).runTest(); }); test('should support keyed access to a list', () async { - await _GetValue(ng.createTestListAccessFactory()).runTest(); + await _GetValue(ng.createTestListAccessFactory()).runTest(); }); test('should support property access', () async { - await _GetValue(ng.createTestPropertyAccessFactory()).runTest(); + await _GetValue(ng.createTestPropertyAccessFactory()).runTest(); }); test('should support chained property access', () async { - await _GetValue(ng.createTestChainedPropertyAccessFactory()).runTest(); + await _GetValue(ng.createTestChainedPropertyAccessFactory()).runTest(); }); test('should support a function call', () async { - await _GetValue(ng.createTestFunctionCallFactory()).runTest(); + await _GetValue(ng.createTestFunctionCallFactory()).runTest(); }); test('should support assigning explicitly to null', () async { - await _GetValue(ng.createTestAssignNullFactory()).runTest(); + await _GetValue(ng.createTestAssignNullFactory()).runTest(); }); test('should support assigning explicitly to null', () async { - await _GetValue(ng.createTestElvisOperationFactory()).runTest(); + await _GetValue(ng.createTestElvisOperationFactory()).runTest(); }); test('should support assigning explicitly to null', () async { - await _GetValue(ng.createTestNullAwareOperationFactory()).runTest(); + await _GetValue(ng.createTestNullAwareOperationFactory()).runTest(); }); } diff --git a/_tests/test/core/change_detection/change_detection_link_test.dart b/_tests/test/core/change_detection/change_detection_link_test.dart index d9fee70345..61477e17d5 100644 --- a/_tests/test/core/change_detection/change_detection_link_test.dart +++ b/_tests/test/core/change_detection/change_detection_link_test.dart @@ -1,7 +1,7 @@ import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular/experimental.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngdart/experimental.dart'; +import 'package:ngtest/angular_test.dart'; import 'change_detection_link_test.template.dart' as ng; diff --git a/_tests/test/core/change_detection/container_test.dart b/_tests/test/core/change_detection/container_test.dart index 8032379f34..38b0480ae9 100644 --- a/_tests/test/core/change_detection/container_test.dart +++ b/_tests/test/core/change_detection/container_test.dart @@ -1,6 +1,6 @@ import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'container_test.template.dart' as ng; @@ -8,7 +8,7 @@ void main() { tearDown(disposeAnyRunningTest); test('should *not* assign any values if the initial value is null', () async { - final fixture = await NgTestBed(ng.createBoundValueTestFactory()).create(); + final fixture = await NgTestBed(ng.createBoundValueTestFactory()).create(); await fixture.update(expectAsync1((comp) { expect(comp.child!.updates, 0, reason: 'No changes should have happened'); expect(comp.child!.value, isNull); @@ -16,7 +16,7 @@ void main() { }); test('should propagate null if the initial value is non-null', () async { - final fixture = await NgTestBed(ng.createBoundValueTestFactory()).create( + final fixture = await NgTestBed(ng.createBoundValueTestFactory()).create( beforeChangeDetection: (comp) => comp.boundValue = 'Hello', ); await fixture.update(expectAsync1((comp) { @@ -31,14 +31,14 @@ void main() { }); test('should support interpolation', () async { - final fixture = await NgTestBed(ng.createBoundValueTestFactory()).create( + final fixture = await NgTestBed(ng.createBoundValueTestFactory()).create( beforeChangeDetection: (comp) => comp.boundValue = 'Hello World', ); expect(fixture.text, 'Hello World'); }); test('should output empty for null values in interpolation', () async { - final fixture = await NgTestBed(ng.createBoundValueTestFactory()).create(); + final fixture = await NgTestBed(ng.createBoundValueTestFactory()).create(); expect(fixture.text, isEmpty); }); } diff --git a/_tests/test/core/change_detection/detached_lifecycle_test.dart b/_tests/test/core/change_detection/detached_lifecycle_test.dart index ee59200253..ade100db6c 100644 --- a/_tests/test/core/change_detection/detached_lifecycle_test.dart +++ b/_tests/test/core/change_detection/detached_lifecycle_test.dart @@ -1,6 +1,6 @@ import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'detached_lifecycle_test.template.dart' as ng; diff --git a/_tests/test/core/change_detection/detect_host_changes_test.dart b/_tests/test/core/change_detection/detect_host_changes_test.dart index 19536f7780..c7d6ceff73 100644 --- a/_tests/test/core/change_detection/detect_host_changes_test.dart +++ b/_tests/test/core/change_detection/detect_host_changes_test.dart @@ -1,8 +1,8 @@ import 'dart:html'; import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'detect_host_changes_test.template.dart' as ng; @@ -16,7 +16,7 @@ void main() { tearDown(() => disposeAnyRunningTest()); test('Should update bound properties when setState is called', () async { - var testBed = NgTestBed(ng.createTestContainerFactory()); + var testBed = NgTestBed(ng.createTestContainerFactory()); var testRoot = await testBed.create(); var targetElement = testRoot.rootElement.querySelector('.mytarget')!; expect(targetElement.firstChild!.text, 'ChildHello'); diff --git a/_tests/test/core/change_detection/differs/default_iterable_differ_test.dart b/_tests/test/core/change_detection/differs/default_iterable_differ_test.dart index d549868247..6a248d273c 100644 --- a/_tests/test/core/change_detection/differs/default_iterable_differ_test.dart +++ b/_tests/test/core/change_detection/differs/default_iterable_differ_test.dart @@ -3,7 +3,7 @@ library angular2.test.core.change_detection.differs.default_iterable_differ_test import 'dart:collection'; import 'package:test/test.dart'; -import 'package:angular/src/core/change_detection/differs/default_iterable_differ.dart'; +import 'package:ngdart/src/core/change_detection/differs/default_iterable_differ.dart'; void main() { group('iterable differ', () { diff --git a/_tests/test/core/change_detection/expect_no_changes_dev_mode_test.dart b/_tests/test/core/change_detection/expect_no_changes_dev_mode_test.dart index 6b6f2d44bc..c8d0bbc4c8 100644 --- a/_tests/test/core/change_detection/expect_no_changes_dev_mode_test.dart +++ b/_tests/test/core/change_detection/expect_no_changes_dev_mode_test.dart @@ -1,6 +1,6 @@ import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'expect_no_changes_dev_mode_test.template.dart' as ng; @@ -8,9 +8,7 @@ void main() { tearDown(disposeAnyRunningTest); test('should throw during change detection', () async { - final testBed = NgTestBed( - ng.createIllegalChangeDetectionComponentFactory(), - ); + final testBed = NgTestBed(ng.createIllegalChangeDetectionComponentFactory()); expect( testBed.create(), throwsA(predicate( @@ -22,9 +20,7 @@ void main() { }); test('misses throwing on a non-primitive expression', () { - final testBed = NgTestBed( - ng.createNonPrimitiveBindingFactory(), - ); + final testBed = NgTestBed(ng.createNonPrimitiveBindingFactory()); expect(testBed.create(), completes); }); @@ -38,9 +34,7 @@ void main() { }); test('should throw during change detection of a primitive', () async { - final testBed = NgTestBed( - ng.createIllegalChangeDetectionComponentFactory(), - ); + final testBed = NgTestBed(ng.createIllegalChangeDetectionComponentFactory()); expect( testBed.create(), throwsA(predicate( @@ -52,9 +46,7 @@ void main() { }); test('should throw during change detection of a non-primitive', () async { - final testBed = NgTestBed( - ng.createNonPrimitiveBindingFactory(), - ); + final testBed = NgTestBed(ng.createNonPrimitiveBindingFactory()); expect( testBed.create(), throwsA(predicate( diff --git a/_tests/test/core/change_detection/mark_child_for_check_test.dart b/_tests/test/core/change_detection/mark_child_for_check_test.dart index d9624b5fb7..8b7c1022c1 100644 --- a/_tests/test/core/change_detection/mark_child_for_check_test.dart +++ b/_tests/test/core/change_detection/mark_child_for_check_test.dart @@ -1,6 +1,6 @@ import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'mark_child_for_check_test.template.dart' as ng; @@ -9,7 +9,7 @@ void main() { group('markChildForCheck() should update', () { test('content child', () async { - final testBed = NgTestBed(ng.createTestContentChildFactory()); + final testBed = NgTestBed(ng.createTestContentChildFactory()); final testFixture = await testBed.create(); expect(testFixture.text, isEmpty); await testFixture.update((component) => component.child!.update('a')); @@ -17,7 +17,7 @@ void main() { }); test('content children', () async { - final testBed = NgTestBed(ng.createTestContentChildrenFactory()); + final testBed = NgTestBed(ng.createTestContentChildrenFactory()); final testFixture = await testBed.create(); expect(testFixture.text, isEmpty); await testFixture.update((component) => component.child!.update('a')); @@ -25,7 +25,7 @@ void main() { }); test('view child', () async { - final testBed = NgTestBed(ng.createTestViewChildFactory()); + final testBed = NgTestBed(ng.createTestViewChildFactory()); final testFixture = await testBed.create(); expect(testFixture.text, isEmpty); await testFixture.update((component) => component.update('a')); @@ -33,7 +33,7 @@ void main() { }); test('view children', () async { - final testBed = NgTestBed(ng.createTestViewChildrenFactory()); + final testBed = NgTestBed(ng.createTestViewChildrenFactory()); final testFixture = await testBed.create(); expect(testFixture.text, isEmpty); await testFixture.update((component) => component.update('a')); @@ -44,7 +44,7 @@ void main() { group('existing provider', () { test('content children', () async { final testBed = - NgTestBed(ng.createTestExistingProviderContentChildrenFactory()); + NgTestBed(ng.createTestExistingProviderContentChildrenFactory()); final testFixture = await testBed.create(); expect(testFixture.text, isEmpty); await testFixture.update((component) => component.child!.update('a')); @@ -53,7 +53,7 @@ void main() { test('view children', () async { final testBed = - NgTestBed(ng.createTestExistingProviderViewChildrenFactory()); + NgTestBed(ng.createTestExistingProviderViewChildrenFactory()); final testFixture = await testBed.create(); expect(testFixture.text, isEmpty); await testFixture.update((component) => component.update('a')); @@ -64,7 +64,7 @@ void main() { group('nested', () { test('content children', () async { final testBed = - NgTestBed(ng.createTestEmbeddedContentChildrenFactory()); + NgTestBed(ng.createTestEmbeddedContentChildrenFactory()); final testFixture = await testBed.create(); expect(testFixture.text, isEmpty); await testFixture.update((component) => component.child!.update('a')); @@ -82,7 +82,7 @@ void main() { }); test('view children', () async { - final testBed = NgTestBed(ng.createTestEmbeddedViewChildrenFactory()); + final testBed = NgTestBed(ng.createTestEmbeddedViewChildrenFactory()); final testFixture = await testBed.create(); expect(testFixture.text, isEmpty); await testFixture.update((component) { diff --git a/_tests/test/core/change_detection/mark_for_check_test.dart b/_tests/test/core/change_detection/mark_for_check_test.dart index 293115d113..5f6ca5271a 100644 --- a/_tests/test/core/change_detection/mark_for_check_test.dart +++ b/_tests/test/core/change_detection/mark_for_check_test.dart @@ -1,6 +1,6 @@ import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'mark_for_check_test.template.dart' as ng; diff --git a/_tests/test/core/change_detection/on_push_embedded_view_test.dart b/_tests/test/core/change_detection/on_push_embedded_view_test.dart index c15dc67330..138a9849e6 100644 --- a/_tests/test/core/change_detection/on_push_embedded_view_test.dart +++ b/_tests/test/core/change_detection/on_push_embedded_view_test.dart @@ -1,8 +1,8 @@ import 'dart:html'; import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'on_push_embedded_view_test.template.dart' as ng; @@ -10,7 +10,7 @@ void main() { late NgTestFixture fixture; setUp(() async { - fixture = await NgTestBed(ng.createTestComponentFactory()).create(); + fixture = await NgTestBed(ng.createTestComponentFactory()).create(); }); tearDown(disposeAnyRunningTest); diff --git a/_tests/test/core/crash_detection_test.dart b/_tests/test/core/crash_detection_test.dart index 597fb0a94c..48c99fb086 100644 --- a/_tests/test/core/crash_detection_test.dart +++ b/_tests/test/core/crash_detection_test.dart @@ -1,8 +1,8 @@ import 'dart:async'; import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'crash_detection_test.template.dart' as ng; @@ -11,8 +11,7 @@ void main() { test('Should normally run change detection', () async { final valueService = ValueService()..value = 'Hello'; - final testBed = NgTestBed( - ng.createNoCrashFactory(), + final testBed = NgTestBed(ng.createNoCrashFactory(), ).addInjector( (i) => Injector.map({ ValueService: valueService, @@ -32,8 +31,7 @@ void main() { test('Should disable change detection on components that throw', () async { final valueService = ValueService()..value = '1'; - final testBed = NgTestBed( - ng.createCrashFactory(), + final testBed = NgTestBed(ng.createCrashFactory(), ).addInjector( (i) => Injector.map({ ValueService: valueService, @@ -67,8 +65,7 @@ void main() { test('Should disable change detection to avoid infinite ngOnInit', () async { final valueService = ValueService()..value = '1'; final rpcService = RpcService(); - final testBed = NgTestBed( - ng.createCrashOnInitFactory(), + final testBed = NgTestBed(ng.createCrashOnInitFactory(), ).addInjector( (i) => Injector.map({ ValueService: valueService, diff --git a/_tests/test/core/di/visibility_test.dart b/_tests/test/core/di/visibility_test.dart index 166438e885..5b27f5cd3b 100644 --- a/_tests/test/core/di/visibility_test.dart +++ b/_tests/test/core/di/visibility_test.dart @@ -1,6 +1,6 @@ import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'visibility_test.template.dart' as ng; @@ -13,54 +13,54 @@ void main() { group('local', () { test('component should not be injectable by child component', () async { final testBed = - NgTestBed(ng.createShouldFailToInjectParentComponentFactory()); + NgTestBed(ng.createShouldFailToInjectParentComponentFactory()); expect(testBed.create(), throwsNoProviderError); }); test('directive should be accessible via a query', () async { - final testBed = NgTestBed(ng.createShouldQueryDirectiveFactory()); + final testBed = NgTestBed(ng.createShouldQueryDirectiveFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.directive, isNotNull); }); test('directive should be injectable on same element', () async { - final testBed = NgTestBed(ng.createShouldInjectFromElementFactory()); + final testBed = NgTestBed(ng.createShouldInjectFromElementFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.child!.directive, isNotNull); }); test('directive should be injectable in same view', () async { - final testBed = NgTestBed(ng.createShouldInjectFromViewFactory()); + final testBed = NgTestBed(ng.createShouldInjectFromViewFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.child!.directive, isNotNull); }); test('directive should not be injectable in child view', () async { final testBed = - NgTestBed(ng.createShouldFailToInjectFromParentViewFactory()); + NgTestBed(ng.createShouldFailToInjectFromParentViewFactory()); expect(testBed.create(), throwsNoProviderError); }); test('directive should inject host component', () async { - final testBed = NgTestBed(ng.createShouldInjectHostFactory()); + final testBed = NgTestBed(ng.createShouldInjectHostFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.directive!.host, isNotNull); }); test('service on Visibility.none component is injectable', () async { - final testBed = NgTestBed(ng.createMyComponentWithServiceTestFactory()); + final testBed = NgTestBed(ng.createMyComponentWithServiceTestFactory()); var testFixture = await testBed.create(); expect(testFixture.rootElement, isNotNull); }); test('component may provide itself via another token', () async { - final testBed = NgTestBed(ng.createShouldInjectAliasedLocalFactory()); + final testBed = NgTestBed(ng.createShouldInjectAliasedLocalFactory()); final testFixture = await testBed.create(); expect(testFixture.text, testFixture.assertOnlyInstance.text); }); test('directive may provide itself for a multi-token', () async { - final testBed = NgTestBed(ng.createShouldInjectMultiTokenFactory()); + final testBed = NgTestBed(ng.createShouldInjectMultiTokenFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.child!.dependencies, [ const TypeMatcher(), @@ -70,13 +70,13 @@ void main() { test('should support $FactoryProvider', () async { final testBed = - NgTestBed(ng.createShouldSupportFactoryProviderFactory()); + NgTestBed(ng.createShouldSupportFactoryProviderFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.child!.interface, isNotNull); }); test('should support $ClassProvider', () async { - final testBed = NgTestBed(ng.createShouldSupportClassProviderFactory()); + final testBed = NgTestBed(ng.createShouldSupportClassProviderFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.child!.interface, isNotNull); }); @@ -85,7 +85,7 @@ void main() { group('all', () { test('component should be injectable by child component', () async { final testBed = - NgTestBed(ng.createShouldInjectParentComponentFactory()); + NgTestBed(ng.createShouldInjectParentComponentFactory()); final testFixture = await testBed.create(); final testComponent = testFixture.assertOnlyInstance; expect(testComponent.child!.parent, testComponent); diff --git a/_tests/test/core/directive_inheritance_test.dart b/_tests/test/core/directive_inheritance_test.dart index 5c3c390cd0..d425a56932 100644 --- a/_tests/test/core/directive_inheritance_test.dart +++ b/_tests/test/core/directive_inheritance_test.dart @@ -2,8 +2,8 @@ import 'dart:async'; import 'dart:html'; import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'directive_inheritance_test.template.dart' as ng; @@ -13,7 +13,7 @@ void main() { group('@ContentChildren', () { test('should be inherited', () async { late final TestDerivedComponent testComponent; - final testBed = NgTestBed(ng.createTestDerivedComponentFactory()); + final testBed = NgTestBed(ng.createTestDerivedComponentFactory()); await testBed.create(beforeChangeDetection: (component) { testComponent = component; }); @@ -23,7 +23,7 @@ void main() { test('selector should be overriden', () async { late final TestAnnotatedDerivedComponent testComponent; final testBed = - NgTestBed(ng.createTestAnnotatedDerivedComponentFactory()); + NgTestBed(ng.createTestAnnotatedDerivedComponentFactory()); await testBed.create(beforeChangeDetection: (component) { testComponent = component; }); @@ -33,14 +33,14 @@ void main() { group('@HostBinding', () { test('should be inherited', () async { - final testBed = NgTestBed(ng.createTestDerivedComponentFactory()); + final testBed = NgTestBed(ng.createTestDerivedComponentFactory()); final testFixture = await testBed.create(); final hostElement = testFixture.rootElement.querySelector('derived')!; expect(hostElement.attributes, containsPair('title', 'inherited')); }); test('implementation should be overriden', () async { - final testBed = NgTestBed(ng.createTestOverrideComponentFactory()); + final testBed = NgTestBed(ng.createTestOverrideComponentFactory()); final testFixture = await testBed.create(); final hostElement = testFixture.rootElement.querySelector('override')!; expect(hostElement.attributes, containsPair('title', 'overridden')); @@ -48,7 +48,7 @@ void main() { test('should allow multiple bindings to inherited property', () async { final testBed = - NgTestBed(ng.createTestAnnotatedDerivedComponentFactory()); + NgTestBed(ng.createTestAnnotatedDerivedComponentFactory()); final testFixture = await testBed.create(); final hostElement = testFixture.rootElement.querySelector('annotated-derived')!; @@ -59,7 +59,7 @@ void main() { group('@HostListener', () { test('should be inherited', () async { - final testBed = NgTestBed(ng.createTestDerivedComponentFactory()); + final testBed = NgTestBed(ng.createTestDerivedComponentFactory()); final testFixture = await testBed.create() ..rootElement .querySelector('derived')! @@ -70,7 +70,7 @@ void main() { }); test('implementation should be overriden', () async { - final testBed = NgTestBed(ng.createTestOverrideComponentFactory()); + final testBed = NgTestBed(ng.createTestOverrideComponentFactory()); final testFixture = await testBed.create() ..rootElement .querySelector('override')! @@ -84,7 +84,7 @@ void main() { group('@Input', () { test('should be inherited', () async { late final TestDerivedComponent testComponent; - final testBed = NgTestBed(ng.createTestDerivedComponentFactory()); + final testBed = NgTestBed(ng.createTestDerivedComponentFactory()); await testBed.create(beforeChangeDetection: (component) { testComponent = component..input = 'Hello'; }); @@ -93,7 +93,7 @@ void main() { test('implementation should be overridden', () async { late final TestOverrideComponent testComponent; - final testBed = NgTestBed(ng.createTestOverrideComponentFactory()); + final testBed = NgTestBed(ng.createTestOverrideComponentFactory()); await testBed.create(beforeChangeDetection: (component) { testComponent = component..input = 'Hello'; }); @@ -104,7 +104,7 @@ void main() { group('@Output', () { test('should be inherited', () async { late final TestDerivedComponent testComponent; - final testBed = NgTestBed(ng.createTestDerivedComponentFactory()); + final testBed = NgTestBed(ng.createTestDerivedComponentFactory()); await testBed.create(beforeChangeDetection: (component) { testComponent = component..derivedComponent!.dispatchOutput('Bye'); }); @@ -113,7 +113,7 @@ void main() { test('implementation should be overridden', () async { late final TestOverrideComponent testComponent; - final testBed = NgTestBed(ng.createTestOverrideComponentFactory()); + final testBed = NgTestBed(ng.createTestOverrideComponentFactory()); await testBed.create(beforeChangeDetection: (component) { testComponent = component..derivedComponent!.dispatchOutput('Bye'); }); @@ -124,7 +124,7 @@ void main() { group('@ViewChildren', () { test('should be inherited', () async { late final TestDerivedComponent testComponent; - final testBed = NgTestBed(ng.createTestDerivedComponentFactory()); + final testBed = NgTestBed(ng.createTestDerivedComponentFactory()); await testBed.create(beforeChangeDetection: (component) { testComponent = component; }); @@ -134,7 +134,7 @@ void main() { test('selector should be overriden', () async { late final TestAnnotatedDerivedComponent testComponent; final testBed = - NgTestBed(ng.createTestAnnotatedDerivedComponentFactory()); + NgTestBed(ng.createTestAnnotatedDerivedComponentFactory()); await testBed.create(beforeChangeDetection: (component) { testComponent = component; }); @@ -145,7 +145,7 @@ void main() { group('Component should inherit metadata', () { test('from Directive', () async { final testBed = - NgTestBed(ng.createTestDirectiveDerivedComponentFactory()); + NgTestBed(ng.createTestDirectiveDerivedComponentFactory()); final testFixture = await testBed.create(beforeChangeDetection: (component) { component.input = 'Hello!'; @@ -154,7 +154,7 @@ void main() { }); test('from super', () async { - final testBed = NgTestBed(ng.createTestInheritMetadataComponentFactory()); + final testBed = NgTestBed(ng.createTestInheritMetadataComponentFactory()); final testFixture = await testBed.create(beforeChangeDetection: (component) { component.description = 'Inherited description'; @@ -164,7 +164,7 @@ void main() { test('from interface', () async { final testBed = - NgTestBed(ng.createTestImplementMetadataComponentFactory()); + NgTestBed(ng.createTestImplementMetadataComponentFactory()); final testFixture = await testBed.create(beforeChangeDetection: (component) { component.description = 'Implemented description'; @@ -173,7 +173,7 @@ void main() { }); test('from interface implemented by mixin', () async { - final testBed = NgTestBed(ng.createTestMixesInInterfaceFactory()); + final testBed = NgTestBed(ng.createTestMixesInInterfaceFactory()); final testFixture = await testBed.create(beforeChangeDetection: (component) { component.input = 'Implemented through mixin'; @@ -182,7 +182,7 @@ void main() { }); test('from mixin', () async { - final testBed = NgTestBed(ng.createTestMixinMetadataComponentFactory()); + final testBed = NgTestBed(ng.createTestMixinMetadataComponentFactory()); final testFixture = await testBed.create(beforeChangeDetection: (component) { component.description = 'Mixed-in description'; @@ -192,7 +192,7 @@ void main() { test('from all supertypes', () async { final testBed = - NgTestBed(ng.createTestMultipleSupertypesComponentFactory()); + NgTestBed(ng.createTestMultipleSupertypesComponentFactory()); final testFixture = await testBed.create(beforeChangeDetection: (component) { component.viewChild! @@ -209,7 +209,7 @@ void main() { test('from most derived binding', () async { final testBed = - NgTestBed(ng.createTestMostDerivedMetadataComponentFactory()); + NgTestBed(ng.createTestMostDerivedMetadataComponentFactory()); final testFixture = await testBed.create(beforeChangeDetection: (component) { component @@ -225,7 +225,7 @@ void main() { test('should inherit metadata', () async { late final TestDirectiveInheritMetadataComponent testComponent; final testBed = - NgTestBed(ng.createTestDirectiveInheritMetadataComponentFactory()); + NgTestBed(ng.createTestDirectiveInheritMetadataComponentFactory()); await testBed.create(beforeChangeDetection: (component) { testComponent = component..tooltipMessage = 'Successfully inherited!'; }); @@ -235,7 +235,7 @@ void main() { test('can alias input name to match selector', () async { late final TestDirectiveAliasInputComponent testComponent; final testBed = - NgTestBed(ng.createTestDirectiveAliasInputComponentFactory()); + NgTestBed(ng.createTestDirectiveAliasInputComponentFactory()); await testBed.create(beforeChangeDetection: (component) { testComponent = component..tooltipMessage = 'Successfully aliased!'; }); diff --git a/_tests/test/core/directive_lifecycle_integration_test.dart b/_tests/test/core/directive_lifecycle_integration_test.dart index 7cb196cf6c..55e7946f81 100644 --- a/_tests/test/core/directive_lifecycle_integration_test.dart +++ b/_tests/test/core/directive_lifecycle_integration_test.dart @@ -1,8 +1,8 @@ library angular2.test.core.directive_lifecycle_integration_test; import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'directive_lifecycle_integration_test.template.dart' as ng; @@ -14,8 +14,7 @@ void main() { setUp(() async { log = Log(); - var testBed = NgTestBed( - ng.createMyCompFactory(), + var testBed = NgTestBed(ng.createMyCompFactory(), rootInjector: (parent) => Injector.map({Log: log}, parent), ); fixture = await testBed.create(); diff --git a/_tests/test/core/event_handler_test.dart b/_tests/test/core/event_handler_test.dart index 316c7e372d..57dbe8366d 100644 --- a/_tests/test/core/event_handler_test.dart +++ b/_tests/test/core/event_handler_test.dart @@ -1,8 +1,8 @@ import 'dart:async'; import 'dart:html'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'package:test/test.dart'; import 'event_handler_test.template.dart' as ng; diff --git a/_tests/test/core/exports_test.dart b/_tests/test/core/exports_test.dart index 37bf06d963..d56f4157b2 100644 --- a/_tests/test/core/exports_test.dart +++ b/_tests/test/core/exports_test.dart @@ -1,6 +1,6 @@ import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'exports_statics.dart' as lib; import 'exports_statics.dart'; @@ -12,42 +12,42 @@ void main() { group('can interpolate', () { test('constants', () async { - var testBed = NgTestBed(ng.createInterpolateConstantTestFactory()); + var testBed = NgTestBed(ng.createInterpolateConstantTestFactory()); var fixture = await testBed.create(); expect(fixture.text, 'hello'); }); test('static fields', () async { - var testBed = NgTestBed(ng.createInterpolateStaticFieldTestFactory()); + var testBed = NgTestBed(ng.createInterpolateStaticFieldTestFactory()); var fixture = await testBed.create(); expect(fixture.text, 'static field'); }); test('enums', () async { - var testBed = NgTestBed(ng.createInterpolateEnumTestFactory()); + var testBed = NgTestBed(ng.createInterpolateEnumTestFactory()); var fixture = await testBed.create(); expect(fixture.text, 'MyEnum.a'); }); test('top-level functions', () async { var testBed = - NgTestBed(ng.createInterpolateTopLevelFunctionTestFactory()); + NgTestBed(ng.createInterpolateTopLevelFunctionTestFactory()); var fixture = await testBed.create(); expect(fixture.text, 'hello!!!'); }); test('static functions', () async { var testBed = - NgTestBed(ng.createInterpolateStaticFunctionTestFactory()); + NgTestBed(ng.createInterpolateStaticFunctionTestFactory()); var fixture = await testBed.create(); expect(fixture.text, 'hello???'); }); }); test('can be used in NgFor', () async { - var testBed = NgTestBed(ng.createStaticNgForTestFactory()); + var testBed = NgTestBed(ng.createStaticNgForTestFactory()); var fixture = await testBed.create(); expect(fixture.text, '123'); }); test('can be used in event handlers', () async { - var testBed = NgTestBed(ng.createStaticEventHandlerTestFactory()); + var testBed = NgTestBed(ng.createStaticEventHandlerTestFactory()); var fixture = await testBed.create(); var div = fixture.rootElement.querySelector('div')!; clickHandled = false; @@ -58,7 +58,7 @@ void main() { }); test('can be assigned in an event handler', () async { - var testBed = NgTestBed(ng.createStaticEventHandlerTargetTestFactory()); + var testBed = NgTestBed(ng.createStaticEventHandlerTargetTestFactory()); var fixture = await testBed.create(); var div = fixture.rootElement.querySelector('div')!; MyClass.clickHandled = false; @@ -69,7 +69,7 @@ void main() { }); test('can be used as event handler arguments', () async { - var testBed = NgTestBed(ng.createStaticEventHandlerArgTestFactory()); + var testBed = NgTestBed(ng.createStaticEventHandlerArgTestFactory()); var fixture = await testBed.create(); var div = fixture.rootElement.querySelector('div')!; late List listArg; @@ -83,7 +83,7 @@ void main() { }); test('can refer to own statics automatically', () async { - var testBed = NgTestBed(ng.createSelfReferTestFactory()); + var testBed = NgTestBed(ng.createSelfReferTestFactory()); var fixture = await testBed.create(); expect(fixture.text, 'hello'); await fixture.update((_) { @@ -93,7 +93,7 @@ void main() { }); test('can refer to own statics automatically with @HostBinding', () async { - var testBed = NgTestBed(ng.createSelfReferHostBindingTestFactory()); + var testBed = NgTestBed(ng.createSelfReferHostBindingTestFactory()); var fixture = await testBed.create(); expect(fixture.rootElement.title, 'hello'); await fixture.update((_) { @@ -104,7 +104,7 @@ void main() { group('can be prefixed', () { test('with library prefix', () async { - var testBed = NgTestBed(ng.createStaticLibraryPrefixTestFactory()); + var testBed = NgTestBed(ng.createStaticLibraryPrefixTestFactory()); var fixture = await testBed.create(); expect(fixture.text, 'hello'); }); diff --git a/_tests/test/core/generics/generics_test.dart b/_tests/test/core/generics/generics_test.dart index 3fb316c5a4..8f6688fe24 100644 --- a/_tests/test/core/generics/generics_test.dart +++ b/_tests/test/core/generics/generics_test.dart @@ -1,8 +1,8 @@ import 'dart:async'; import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'bound.dart'; import 'generics_test.template.dart' as ng; @@ -13,7 +13,7 @@ void main() { group('components', () { test('should support a single concrete type argument', () async { final testBed = - NgTestBed(ng.createTestSingleConcreteTypeArgumentFactory()); + NgTestBed(ng.createTestSingleConcreteTypeArgumentFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.child, const TypeMatcher>()); @@ -21,7 +21,7 @@ void main() { test('should support multiple concrete type arguments', () async { final testBed = - NgTestBed(ng.createTestMultipleConcreteTypeArgumentFactory()); + NgTestBed(ng.createTestMultipleConcreteTypeArgumentFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.child, const TypeMatcher>()); @@ -29,14 +29,14 @@ void main() { test('should support a nested concrete type argument', () async { final testBed = - NgTestBed(ng.createTestNestedConcreteTypeArgumentFactory()); + NgTestBed(ng.createTestNestedConcreteTypeArgumentFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.child, const TypeMatcher>>()); }); test('should flow a type argument', () async { - final testBed = NgTestBed(ng.createTestFlowTypeArgumentFactory()); + final testBed = NgTestBed(ng.createTestFlowTypeArgumentFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.child, const TypeMatcher>()); @@ -46,7 +46,7 @@ void main() { test('should distinctly type unique instances of same component', () async { final testBed = - NgTestBed(ng.createTestDistinctlyTypedDirectivesFactory()); + NgTestBed(ng.createTestDistinctlyTypedDirectivesFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.children, [ const TypeMatcher>(), @@ -55,7 +55,7 @@ void main() { }); test('should instantiate to bounds', () async { - final testBed = NgTestBed(ng.createTestBoundedGenericComponentFactory()); + final testBed = NgTestBed(ng.createTestBoundedGenericComponentFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.child, const TypeMatcher>()); @@ -65,7 +65,7 @@ void main() { group('component factories', () { test('should support a single type argument', () async { final testBed = - NgTestBed(ng.createSingleGenericComponentFactory()); + NgTestBed(ng.createSingleGenericComponentFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance, const TypeMatcher>()); @@ -73,14 +73,14 @@ void main() { test('should support multiple type arguments', () async { final testBed = - NgTestBed(ng.createMultipleGenericComponentFactory()); + NgTestBed(ng.createMultipleGenericComponentFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance, const TypeMatcher>()); }); test('should instantiate to bounds', () async { - final testBed = NgTestBed(ng.createBoundedGenericComponentFactory()); + final testBed = NgTestBed(ng.createBoundedGenericComponentFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance, const TypeMatcher>()); @@ -89,7 +89,7 @@ void main() { group('directives', () { test('should support generics', () async { - final testBed = NgTestBed(ng.createTestGenericDirectiveFactory()); + final testBed = NgTestBed(ng.createTestGenericDirectiveFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.directive, const TypeMatcher>()); @@ -97,15 +97,14 @@ void main() { test('with a change detector host should support generics', () async { final testBed = - NgTestBed(ng.createTestGenericDirectiveWithChangeDetectorFactory()); + NgTestBed(ng.createTestGenericDirectiveWithChangeDetectorFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.directive, const TypeMatcher>()); }); test('should instantiate to bounds', () async { - final testBed = NgTestBed( - ng.createTestBoundedGenericDirectiveWithChangeDetectorFactory()); + final testBed = NgTestBed(ng.createTestBoundedGenericDirectiveWithChangeDetectorFactory()); final testFixture = await testBed.create(); expect( testFixture.assertOnlyInstance.directive, @@ -115,7 +114,7 @@ void main() { }); test('generic function member should return normally', () async { - final testBed = NgTestBed(ng.createTestFunctionComponentFactory()); + final testBed = NgTestBed(ng.createTestFunctionComponentFactory()); final testFixture = await testBed.create(); expect(testFixture.text, 'foo'); }); diff --git a/_tests/test/core/host_annotation_test.dart b/_tests/test/core/host_annotation_test.dart index 7144a5512b..6b6aae8a5a 100644 --- a/_tests/test/core/host_annotation_test.dart +++ b/_tests/test/core/host_annotation_test.dart @@ -1,7 +1,7 @@ import 'dart:html'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'package:test/test.dart'; import 'host_annotation_test.template.dart' as ng; @@ -19,14 +19,14 @@ void main() { group('@HostBinding', () { test('should assign "title" based on a static', () async { - final element = await rootElementOf( + final element = await rootElementOf( ng.createHostBindingStaticTitleFactory(), ); expect(element.title, 'Hello World'); }); test('should assign "title" based on an instance member', () async { - final element = await rootElementOf( + final element = await rootElementOf( ng.createHostBindingInstanceTitleFactory(), ); expect(element.title, 'Hello World'); @@ -41,50 +41,49 @@ void main() { // instance getter or field and everything would work exactly as intended. // // https://github.com/angulardart/angular/issues/1272 - final element = await rootElementOf( + final element = await rootElementOf( ng.createHostBindingStaticTitleNotInheritedFactory(), ); expect(element.title, isEmpty); }); test('should assign "title" based on an inherited instance', () async { - final element = await rootElementOf( + final element = await rootElementOf( ng.createHostBindingInstanceTitleInheritedFactory(), ); expect(element.title, 'Hello World'); }); test('should support tabIndex of 0', () async { - final element = await rootElementOf( + final element = await rootElementOf( ng.createHostBindingTabIndex0Factory(), ); expect(element.tabIndex, 0); }); test('should support tabIndex of 0', () async { - final element = await rootElementOf( + final element = await rootElementOf( ng.createHostBindingTabIndexNegative1Factory(), ); expect(element.tabIndex, -1); }); test('should support class [static]', () async { - final element = await rootElementOf( + final element = await rootElementOf( ng.createHostBindingStaticClassFactory(), ); expect(element.className, 'themeable'); }); test('should support class [instance]', () async { - final element = await rootElementOf( + final element = await rootElementOf( ng.createHostBindingInstanceClassFactory(), ); expect(element.className, 'themeable'); }); test('should support conditional attributes', () async { - final testBed = NgTestBed( - ng.createHostBindingConditionalAttributeFactory(), + final testBed = NgTestBed(ng.createHostBindingConditionalAttributeFactory(), ); final fixture = await testBed.create(); final element = fixture.rootElement; @@ -101,9 +100,7 @@ void main() { }); test('should support conditional attributes on static members', () async { - final testBed = NgTestBed( - ng.createHostBindingConditionalStaticsFactory(), - ); + final testBed = NgTestBed(ng.createHostBindingConditionalStaticsFactory(),); final fixture = await testBed.create(); final element = fixture.rootElement; expect(element.attributes, contains('disabled')); @@ -111,8 +108,7 @@ void main() { }); test('should support conditional classes', () async { - final testBed = NgTestBed( - ng.createHostBindingConditionalClassFactory(), + final testBed = NgTestBed(ng.createHostBindingConditionalClassFactory(), ); final fixture = await testBed.create(); final element = fixture.rootElement; @@ -126,7 +122,7 @@ void main() { }); test('should support multiple annotations on a single field', () async { - final element = await rootElementOf(ng.createHostBindingMultiFactory()); + final element = await rootElementOf(ng.createHostBindingMultiFactory()); expect(element.className, 'hello'); expect(element.title, 'hello'); }); @@ -134,27 +130,21 @@ void main() { group('@HostListener', () { test('should support click', () async { - final testBed = NgTestBed( - ng.createHostListenerClickFactory(), - ); + final testBed = NgTestBed(ng.createHostListenerClickFactory()); final fixture = await testBed.create(); fixture.assertOnlyInstance.clickHandler = expectAsync0(() {}); await fixture.update((_) => fixture.rootElement.click()); }); test('should support click through inheritance', () async { - final testBed = NgTestBed( - ng.createHostListenerInheritedClickFactory(), - ); + final testBed = NgTestBed(ng.createHostListenerInheritedClickFactory()); final fixture = await testBed.create(); fixture.assertOnlyInstance.clickHandler = expectAsync0(() {}); await fixture.update((_) => fixture.rootElement.click()); }); test('should support multiple annotations on a single field', () async { - final testBed = NgTestBed( - ng.createHostListenerMultiFactory(), - ); + final testBed = NgTestBed(ng.createHostListenerMultiFactory()); final fixture = await testBed.create(); fixture.assertOnlyInstance.blurOrFocusHandler = expectAsync0( () {}, diff --git a/_tests/test/core/i18n_escape_test.dart b/_tests/test/core/i18n_escape_test.dart index dfc9b0363b..44b1641bfa 100644 --- a/_tests/test/core/i18n_escape_test.dart +++ b/_tests/test/core/i18n_escape_test.dart @@ -1,8 +1,8 @@ import 'dart:html'; import 'package:test/test.dart'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'i18n_escape_test.template.dart' as ng; @@ -14,26 +14,26 @@ void main() { group('should escape special characters in', () { test('text', () async { - final testBed = NgTestBed(ng.createShouldEscapeI18nTextFactory()); + final testBed = NgTestBed(ng.createShouldEscapeI18nTextFactory()); final testFixture = await testBed.create(); expect(testFixture.text, matches(regExp)); }); test('text with HTML', () async { - final testBed = NgTestBed(ng.createShouldEscapeI18nHtmlFactory()); + final testBed = NgTestBed(ng.createShouldEscapeI18nHtmlFactory()); final testFixture = await testBed.create(); expect(testFixture.text, matches(regExp)); }); test('attributes', () async { - final testBed = NgTestBed(ng.createShouldEscapeI18nAttributeFactory()); + final testBed = NgTestBed(ng.createShouldEscapeI18nAttributeFactory()); final testFixture = await testBed.create(); final element = testFixture.rootElement.querySelector('[foo]')!; expect(element.getAttribute('foo'), matches(regExp)); }); test('properties', () async { - final testBed = NgTestBed(ng.createShouldEscapeI18nPropertyFactory()); + final testBed = NgTestBed(ng.createShouldEscapeI18nPropertyFactory()); final testFixture = await testBed.create(); final imgElement = testFixture.rootElement.querySelector('img') as ImageElement; @@ -41,7 +41,7 @@ void main() { }); test('inputs', () async { - final testBed = NgTestBed(ng.createShouldEscapeI18nInputFactory()); + final testBed = NgTestBed(ng.createShouldEscapeI18nInputFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.greeting!.message, matches(regExp)); }); diff --git a/_tests/test/core/i18n_test.dart b/_tests/test/core/i18n_test.dart index 985930fc7d..ddc7488b53 100644 --- a/_tests/test/core/i18n_test.dart +++ b/_tests/test/core/i18n_test.dart @@ -1,7 +1,7 @@ import 'dart:html'; -import 'package:angular/angular.dart'; -import 'package:angular_test/angular_test.dart'; +import 'package:ngdart/angular.dart'; +import 'package:ngtest/angular_test.dart'; import 'package:test/test.dart'; import 'i18n_test.template.dart' as ng; @@ -10,13 +10,13 @@ void main() { tearDown(disposeAnyRunningTest); test('should render message', () async { - final testBed = NgTestBed(ng.createTestI18nNodeFactory()); + final testBed = NgTestBed(ng.createTestI18nNodeFactory()); final testFixture = await testBed.create(); expect(testFixture.text, 'A message.'); }); test('should render message in attribute', () async { - final testBed = NgTestBed(ng.createTestI18nAttributeFactory()); + final testBed = NgTestBed(ng.createTestI18nAttributeFactory()); final testFixture = await testBed.create(); final imgElement = testFixture.rootElement.querySelector('img') as ImageElement; @@ -24,7 +24,7 @@ void main() { }); test('should render message with HTML', () async { - final testBed = NgTestBed(ng.createTestI18nNodeWithHtmlFactory()); + final testBed = NgTestBed(ng.createTestI18nNodeWithHtmlFactory()); final testFixture = await testBed.create(); expect(testFixture.text, 'A message with emphasis!'); final lineBreaks = testFixture.rootElement.querySelectorAll('br'); @@ -34,7 +34,7 @@ void main() { }); test('should render message with unsafe HTML', () async { - final testBed = NgTestBed(ng.createTestI18nNodeWithUnsafeHtmlFactory()); + final testBed = NgTestBed(ng.createTestI18nNodeWithUnsafeHtmlFactory()); final testFixture = await testBed.create(); expect(testFixture.text, 'Click here to file an issue.'); final anchorElement = testFixture.rootElement.querySelector('a')!; @@ -43,14 +43,13 @@ void main() { test('should render message with escaped HTML characters', () async { final testBed = - NgTestBed(ng.createTestI18nNodeWithEscapedHtmlCharactersFactory()); + NgTestBed(ng.createTestI18nNodeWithEscapedHtmlCharactersFactory()); final testFixture = await testBed.create(); expect(testFixture.text, 'Not italic.'); }); test('should render message with HTML and escaped HTML characters', () async { - final testBed = NgTestBed( - ng.createTestI18nNodeWithHtmlAndEscapedHtmlCharactersFactory()); + final testBed = NgTestBed(ng.createTestI18nNodeWithHtmlAndEscapedHtmlCharactersFactory()); final testFixture = await testBed.create(); expect(testFixture.text, 'Italic, not italic.'); final italicElement = testFixture.rootElement.querySelector('i')!; @@ -59,7 +58,7 @@ void main() { // This test ensures none of our Intl.message() parameters are invalid. test('should render message with i18n parameters', () async { - final testBed = NgTestBed(ng.createTestI18nParametersFactory()); + final testBed = NgTestBed(ng.createTestI18nParametersFactory()); final testFixture = await testBed.create(); expect(testFixture.text, 'A paragraph.'); final imgElement = testFixture.rootElement.querySelector('img')!; @@ -67,7 +66,7 @@ void main() { }); test('should render a message from a template', () async { - final testBed = NgTestBed(ng.createTestI18nTemplateFactory()); + final testBed = NgTestBed(ng.createTestI18nTemplateFactory()); final testFixture = await testBed.create(); expect(testFixture.text, isEmpty); await testFixture.update((component) { @@ -77,7 +76,7 @@ void main() { }); test('should inject an i18n attribute', () async { - final testBed = NgTestBed(ng.createTestInjectI18nAttributeFactory()); + final testBed = NgTestBed(ng.createTestInjectI18nAttributeFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.injectsMessage!.message, 'An internationalized message.'); @@ -85,14 +84,14 @@ void main() { group('should set internationalized property', () { test('explicitly', () async { - final testBed = NgTestBed(ng.createTestExplicitI18nInputFactory()); + final testBed = NgTestBed(ng.createTestExplicitI18nInputFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.greeting!.message, 'An internationalized property'); }); test('implicitly', () async { - final testBed = NgTestBed(ng.createTestImplicitI18nInputFactory()); + final testBed = NgTestBed(ng.createTestImplicitI18nInputFactory()); final testFixture = await testBed.create(); expect(testFixture.assertOnlyInstance.greeting!.message, 'An internationalized property'); @@ -100,7 +99,7 @@ void main() { }); test('should support internationalized property on