diff --git a/packages/core/src/render3/component_ref.ts b/packages/core/src/render3/component_ref.ts index 78721801a4..794508126a 100644 --- a/packages/core/src/render3/component_ref.ts +++ b/packages/core/src/render3/component_ref.ts @@ -10,6 +10,7 @@ import {ChangeDetectorRef as ViewEngine_ChangeDetectorRef} from '../change_detec import {InjectionToken} from '../di/injection_token'; import {Injector} from '../di/injector'; import {inject} from '../di/injector_compatibility'; +import {InjectFlags} from '../di/interface/injector'; import {Type} from '../interface/type'; import {ComponentFactory as viewEngine_ComponentFactory, ComponentRef as viewEngine_ComponentRef} from '../linker/component_factory'; import {ComponentFactoryResolver as viewEngine_ComponentFactoryResolver} from '../linker/component_factory_resolver'; @@ -77,8 +78,8 @@ export const SCHEDULER = new InjectionToken<((fn: () => void) => void)>('SCHEDUL function createChainedInjector(rootViewInjector: Injector, moduleInjector: Injector): Injector { return { - get: (token: Type| InjectionToken, notFoundValue?: T): T => { - const value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR); + get: (token: Type| InjectionToken, notFoundValue?: T, flags?: InjectFlags): T => { + const value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as T, flags); if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR || notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) { @@ -90,7 +91,7 @@ function createChainedInjector(rootViewInjector: Injector, moduleInjector: Injec return value; } - return moduleInjector.get(token, notFoundValue); + return moduleInjector.get(token, notFoundValue, flags); } }; } diff --git a/packages/core/src/render3/di.ts b/packages/core/src/render3/di.ts index ca0a8f66c6..56accc32b5 100644 --- a/packages/core/src/render3/di.ts +++ b/packages/core/src/render3/di.ts @@ -392,10 +392,18 @@ export function getOrCreateInjectable( if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) { const moduleInjector = lView[INJECTOR]; - if (moduleInjector) { - return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional); - } else { - return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional); + // switch to `injectInjectorOnly` implementation for module injector, since module injector + // should not have access to Component/Directive DI scope (that may happen through + // `directiveInject` implementation) + const previousInjectImplementation = setInjectImplementation(undefined); + try { + if (moduleInjector) { + return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional); + } else { + return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional); + } + } finally { + setInjectImplementation(previousInjectImplementation); } } if (flags & InjectFlags.Optional) { diff --git a/packages/core/test/acceptance/di_spec.ts b/packages/core/test/acceptance/di_spec.ts index 7be5795430..108e598b13 100644 --- a/packages/core/test/acceptance/di_spec.ts +++ b/packages/core/test/acceptance/di_spec.ts @@ -7,10 +7,11 @@ */ import {CommonModule} from '@angular/common'; -import {ChangeDetectorRef, Component, Pipe, PipeTransform} from '@angular/core'; +import {ChangeDetectorRef, Component, Directive, Inject, LOCALE_ID, Optional, Pipe, PipeTransform, SkipSelf, ViewChild} from '@angular/core'; import {ViewRef} from '@angular/core/src/render3/view_ref'; import {TestBed} from '@angular/core/testing'; + describe('di', () => { describe('ChangeDetectorRef', () => { it('should inject host component ChangeDetectorRef into directives on templates', () => { @@ -39,4 +40,94 @@ describe('di', () => { expect((pipeInstance !.cdr as ViewRef).context).toBe(fixture.componentInstance); }); }); + + it('should not cause cyclic dependency if same token is requested in deps with @SkipSelf', () => { + @Component({ + selector: 'my-comp', + template: '...', + providers: [{ + provide: LOCALE_ID, + useFactory: () => 'ja-JP', + // Note: `LOCALE_ID` is also provided within APPLICATION_MODULE_PROVIDERS, so we use it here + // as a dep and making sure it doesn't cause cyclic dependency (since @SkipSelf is present) + deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]] + }] + }) + class MyComp { + constructor(@Inject(LOCALE_ID) public localeId: string) {} + } + + TestBed.configureTestingModule({declarations: [MyComp]}); + const fixture = TestBed.createComponent(MyComp); + fixture.detectChanges(); + expect(fixture.componentInstance.localeId).toBe('ja-JP'); + }); + + it('module-level deps should not access Component/Directive providers', () => { + @Component({ + selector: 'my-comp', + template: '...', + providers: [{ + provide: 'LOCALE_ID_DEP', // + useValue: 'LOCALE_ID_DEP_VALUE' + }] + }) + class MyComp { + constructor(@Inject(LOCALE_ID) public localeId: string) {} + } + + TestBed.configureTestingModule({ + declarations: [MyComp], + providers: [{ + provide: LOCALE_ID, + // we expect `localeDepValue` to be undefined, since it's not provided at a module level + useFactory: (localeDepValue: any) => localeDepValue || 'en-GB', + deps: [[new Inject('LOCALE_ID_DEP'), new Optional()]] + }] + }); + const fixture = TestBed.createComponent(MyComp); + fixture.detectChanges(); + expect(fixture.componentInstance.localeId).toBe('en-GB'); + }); + + it('should skip current level while retrieving tokens if @SkipSelf is defined', () => { + @Component({ + selector: 'my-comp', + template: '...', + providers: [{provide: LOCALE_ID, useFactory: () => 'en-GB'}] + }) + class MyComp { + constructor(@SkipSelf() @Inject(LOCALE_ID) public localeId: string) {} + } + + TestBed.configureTestingModule({declarations: [MyComp]}); + const fixture = TestBed.createComponent(MyComp); + fixture.detectChanges(); + // takes `LOCALE_ID` from module injector, since we skip Component level with @SkipSelf + expect(fixture.componentInstance.localeId).toBe('en-US'); + }); + + it('should work when injecting dependency in Directives', () => { + @Directive({ + selector: '[dir]', // + providers: [{provide: LOCALE_ID, useValue: 'ja-JP'}] + }) + class MyDir { + constructor(@SkipSelf() @Inject(LOCALE_ID) public localeId: string) {} + } + @Component({ + selector: 'my-comp', + template: '
', + providers: [{provide: LOCALE_ID, useValue: 'en-GB'}] + }) + class MyComp { + @ViewChild(MyDir) myDir !: MyDir; + constructor(@Inject(LOCALE_ID) public localeId: string) {} + } + + TestBed.configureTestingModule({declarations: [MyDir, MyComp, MyComp]}); + const fixture = TestBed.createComponent(MyComp); + fixture.detectChanges(); + expect(fixture.componentInstance.myDir.localeId).toBe('en-GB'); + }); }); diff --git a/tools/material-ci/angular_material_test_blocklist.js b/tools/material-ci/angular_material_test_blocklist.js index 3bdb22e467..6a1e80b095 100644 --- a/tools/material-ci/angular_material_test_blocklist.js +++ b/tools/material-ci/angular_material_test_blocklist.js @@ -349,222 +349,6 @@ window.testBlocklist = { "error": "TypeError: Cannot read property 'accordion' of undefined", "notes": "Unknown" }, - "CdkDrag standalone draggable should enable native drag interactions when there is a drag handle": { - "error": "TypeError: Cannot read property 'removeEventListener' of null", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag draggable with a handle should not be able to drag the entire element if it has a handle": { - "error": "TypeError: Cannot read property 'removeEventListener' of null", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag draggable with a handle should be able to drag an element using its handle": { - "error": "TypeError: Cannot read property 'removeEventListener' of null", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag draggable with a handle should not be able to drag the element if the handle is disabled": { - "error": "TypeError: Cannot read property 'removeEventListener' of null", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag draggable with a handle should not be able to drag using the handle if the element is disabled": { - "error": "TypeError: Cannot read property 'removeEventListener' of null", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag draggable with a handle should be able to use a handle that was added after init": { - "error": "TypeError: Cannot read property 'removeEventListener' of null", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag draggable with a handle should be able to use more than one handle to drag the element": { - "error": "TypeError: Cannot read property 'removeEventListener' of null", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag draggable with a handle should be able to drag with a handle that is not a direct descendant": { - "error": "TypeError: Cannot read property 'removeEventListener' of null", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag draggable with a handle should disable the tap highlight while dragging via the handle": { - "error": "TypeError: Cannot read property 'removeEventListener' of null", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag draggable with a handle should preserve any existing `webkitTapHighlightColor`": { - "error": "TypeError: Cannot read property 'removeEventListener' of null", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag in a drop container should dispatch the `sorted` event as an item is being sorted": { - "error": "TypeError: Cannot read property 'args' of undefined", - "notes": "Unknown" - }, - "CdkDrag in a drop container should not move items in a vertical list if the pointer is too far away": { - "error": "Error: Expected $.previousIndex = -1 to equal 0.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should not move items in a horizontal list if pointer is too far away": { - "error": "Error: Expected $.previousIndex = -1 to equal 0.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should move the placeholder as an item is being sorted down": { - "error": "Error: Expected 0 to be 1.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should move the placeholder as an item is being sorted down on a scrolled page": { - "error": "Error: Expected 0 to be 1.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should move the placeholder as an item is being sorted up": { - "error": "Error: Expected 3 to be 2.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should move the placeholder as an item is being sorted up on a scrolled page": { - "error": "Error: Expected 3 to be 2.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should move the placeholder as an item is being sorted to the right": { - "error": "Error: Expected 0 to be 1.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should move the placeholder as an item is being sorted to the left": { - "error": "Error: Expected 3 to be 2.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should lay out the elements correctly, if an element skips multiple positions when sorting vertically": { - "error": "Error: Expected $[0] = 'Zero' to equal 'One'.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should lay out the elements correctly, when swapping down with a taller element": { - "error": "Error: Expected '' to be 'translate3d(0px, 25px, 0px)'.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should lay out the elements correctly, when swapping up with a taller element": { - "error": "Error: Expected '' to be 'translate3d(0px, -25px, 0px)'.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should lay out elements correctly, when swapping an item with margin": { - "error": "Error: Expected '' to be 'translate3d(0px, 37px, 0px)'.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should lay out the elements correctly, if an element skips multiple positions when sorting horizontally": { - "error": "Error: Expected $[0] = 'Zero' to equal 'One'.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should lay out the elements correctly, when swapping to the right with a wider element": { - "error": "Error: Expected '' to be 'translate3d(75px, 0px, 0px)'.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should lay out the elements correctly, when swapping left with a wider element": { - "error": "Error: Expected '' to be 'translate3d(-75px, 0px, 0px)'.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should lay out elements correctly, when horizontally swapping an item with margin": { - "error": "Error: Expected '' to be 'translate3d(87px, 0px, 0px)'.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should not swap position for tiny pointer movements": { - "error": "Error: Expected $[0] = 'Zero' to equal 'One'.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should swap position for pointer movements in the opposite direction": { - "error": "Error: Expected $[0] = 'Zero' to equal 'One'.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should be able to customize the preview element": { - "error": "Error: Expected cdk-drag cdk-drag-preview to contain 'custom-preview'.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should position custom previews next to the pointer": { - "error": "Error: Expected 'translate3d(8px, 3533px, 0px)' to be 'translate3d(50px, 50px, 0px)'.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should lock position inside a drop container along the x axis": { - "error": "Error: Expected 'translate3d(58px, 3533px, 0px)' to be 'translate3d(100px, 50px, 0px)'.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should lock position inside a drop container along the y axis": { - "error": "Error: Expected 'translate3d(8px, 3583px, 0px)' to be 'translate3d(50px, 100px, 0px)'.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should inherit the position locking from the drop container": { - "error": "Error: Expected 'translate3d(58px, 3533px, 0px)' to be 'translate3d(100px, 50px, 0px)'.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should be able to customize the placeholder": { - "error": "Error: Expected cdk-drag cdk-drag-placeholder to contain 'custom-placeholder'.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should clear the `transform` value from siblings when item is dropped`": { - "error": "Error: Expected '' to be truthy.", - "notes": "Unknown" - }, - "CdkDrag in a drop container should not move the item if the group is disabled": { - "error": "Error: Expected $.length = 0 to equal 4.", - "notes": "Unknown" - }, - "CdkDrag in a connected drop container should dispatch the `dropped` event when an item has been dropped into a new container": { - "error": "TypeError: Cannot read property 'element' of undefined", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag in a connected drop container should be able to move the element over a new container and return it": { - "error": "TypeError: Cannot read property 'element' of undefined", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag in a connected drop container should be able to move the element over a new container and return it to the initial one, even if it no longer matches the enterPredicate": { - "error": "TypeError: Cannot read property 'element' of undefined", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag in a connected drop container should transfer the DOM element from one drop zone to another": { - "error": "TypeError: Cannot read property 'element' of undefined", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag in a connected drop container should not be able to transfer an item into a container that is not in `connectedTo`": { - "error": "TypeError: Cannot read property 'element' of undefined", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag in a connected drop container should not be able to transfer an item that does not match the `enterPredicate`": { - "error": "TypeError: Cannot read property 'element' of undefined", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag in a connected drop container should call the `enterPredicate` with the item and the container it is entering": { - "error": "TypeError: Cannot read property 'element' of undefined", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag in a connected drop container should be able to start dragging after an item has been transferred": { - "error": "TypeError: Cannot read property 'element' of undefined", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag in a connected drop container should be able to return the last item inside its initial container": { - "error": "TypeError: Cannot read property 'element' of undefined", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag in a connected drop container should be able to connect two drop zones by id": { - "error": "TypeError: Cannot read property 'element' of undefined", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag in a connected drop container should be able to connect two drop zones using the drop list group": { - "error": "TypeError: Cannot read property 'element' of undefined", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag in a connected drop container should be able to pass a single id to `connectedTo`": { - "error": "TypeError: Cannot read property 'element' of undefined", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag in a connected drop container should return DOM element to its initial container after it is dropped, in a container with one draggable item": { - "error": "Error: Expected $.container.element.nativeElement =
...
to equal
...
.", - "notes": "Unknown" - }, - "CdkDrag in a connected drop container should be able to return an element to its initial container in the same sequence, even if it is not connected to the current container": { - "error": "TypeError: Cannot read property 'element' of undefined", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag in a connected drop container should not be able to drop an element into a container that is under another element": { - "error": "TypeError: Cannot read property 'element' of undefined", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag in a connected drop container should set a class when a container can receive an item": { - "error": "TypeError: Cannot read property 'element' of undefined", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, - "CdkDrag in a connected drop container should toggle the `receiving` class when the item enters a new list": { - "error": "TypeError: Cannot read property 'element' of undefined", - "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" - }, "CdkTable in a typical simple use case should initialize with a connected data source": { "error": "TypeError: Cannot read property 'viewContainer' of undefined", "notes": "FW-1019: Design new API to replace static queries" @@ -797,6 +581,70 @@ window.testBlocklist = { "error": "TypeError: Cannot read property 'viewContainer' of undefined", "notes": "FW-1019: Design new API to replace static queries" }, + "CdkDrag standalone draggable should enable native drag interactions when there is a drag handle": { + "error": "TypeError: Cannot read property 'removeEventListener' of null", + "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" + }, + "CdkDrag draggable with a handle should not be able to drag the entire element if it has a handle": { + "error": "TypeError: Cannot read property 'removeEventListener' of null", + "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" + }, + "CdkDrag draggable with a handle should be able to drag an element using its handle": { + "error": "TypeError: Cannot read property 'removeEventListener' of null", + "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" + }, + "CdkDrag draggable with a handle should not be able to drag the element if the handle is disabled": { + "error": "TypeError: Cannot read property 'removeEventListener' of null", + "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" + }, + "CdkDrag draggable with a handle should not be able to drag using the handle if the element is disabled": { + "error": "TypeError: Cannot read property 'removeEventListener' of null", + "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" + }, + "CdkDrag draggable with a handle should be able to use a handle that was added after init": { + "error": "TypeError: Cannot read property 'removeEventListener' of null", + "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" + }, + "CdkDrag draggable with a handle should be able to use more than one handle to drag the element": { + "error": "TypeError: Cannot read property 'removeEventListener' of null", + "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" + }, + "CdkDrag draggable with a handle should be able to drag with a handle that is not a direct descendant": { + "error": "TypeError: Cannot read property 'removeEventListener' of null", + "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" + }, + "CdkDrag draggable with a handle should disable the tap highlight while dragging via the handle": { + "error": "TypeError: Cannot read property 'removeEventListener' of null", + "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" + }, + "CdkDrag draggable with a handle should preserve any existing `webkitTapHighlightColor`": { + "error": "TypeError: Cannot read property 'removeEventListener' of null", + "notes": "FW-1010: onDestroy hook is called twice for directives that are also used in a provider" + }, + "CdkDrag in a drop container should be able to customize the preview element": { + "error": "Error: Expected cdk-drag cdk-drag-preview to contain 'custom-preview'.", + "notes": "Unknown" + }, + "CdkDrag in a drop container should position custom previews next to the pointer": { + "error": "Error: Expected 'translate3d(8px, 33px, 0px)' to be 'translate3d(50px, 50px, 0px)'.", + "notes": "Unknown" + }, + "CdkDrag in a drop container should lock position inside a drop container along the x axis": { + "error": "Error: Expected 'translate3d(58px, 33px, 0px)' to be 'translate3d(100px, 50px, 0px)'.", + "notes": "Unknown" + }, + "CdkDrag in a drop container should lock position inside a drop container along the y axis": { + "error": "Error: Expected 'translate3d(8px, 83px, 0px)' to be 'translate3d(50px, 100px, 0px)'.", + "notes": "Unknown" + }, + "CdkDrag in a drop container should inherit the position locking from the drop container": { + "error": "Error: Expected 'translate3d(58px, 33px, 0px)' to be 'translate3d(100px, 50px, 0px)'.", + "notes": "Unknown" + }, + "CdkDrag in a drop container should be able to customize the placeholder": { + "error": "Error: Expected cdk-drag cdk-drag-placeholder to contain 'custom-placeholder'.", + "notes": "Unknown" + }, "CdkTree should clear out the `mostRecentTreeNode` on destroy": { "error": "Error: Expected false to be true.", "notes": "Unknown" @@ -1005,10 +853,6 @@ window.testBlocklist = { "error": "Error: Expected true to be false.", "notes": "Unknown" }, - "MatChipList StandardChipList with selected chips should have role listbox": { - "error": "Error: Expected null to be 'listbox'.", - "notes": "Unknown" - }, "MatChipList StandardChipList focus behaviors should focus the first chip on focus": { "error": "Error: Expected -1 to be 0.", "notes": "Unknown" @@ -1029,10 +873,6 @@ window.testBlocklist = { "error": "TypeError: Cannot read property 'focus' of undefined", "notes": "MatChipList does not find MatChip content children because descendants is not true anymore. TODO: Fix spec so that it does not have the wrapping div" }, - "MatChipList StandardChipList focus behaviors on chip destroy should move focus to the last chip when the focused chip was deleted inside acomponent with animations": { - "error": "TypeError: Cannot read property 'focus' of undefined", - "notes": "MatChipList does not find MatChip content children because descendants is not true anymore. TODO: Fix spec so that it does not have the wrapping div" - }, "MatChipList StandardChipList keyboard behavior LTR (default) should focus previous item when press LEFT ARROW": { "error": "TypeError: Cannot read property 'focus' of undefined", "notes": "MatChipList does not find MatChip content children because descendants is not true anymore. TODO: Fix spec so that it does not have the wrapping div" @@ -1081,166 +921,38 @@ window.testBlocklist = { "error": "TypeError: Cannot read property 'focus' of undefined", "notes": "MatChipList does not find MatChip content children because descendants is not true anymore. TODO: Fix spec so that it does not have the wrapping div" }, - "MatChipList selection logic should float placeholder if chip is selected": { - "error": "Error: Expected false to be true, 'placeholder should be floating'.", - "notes": "Unknown" - }, - "MatChipList selection logic should select an option that was added after initialization": { - "error": "Error: Expected undefined to contain 'potatoes-8', 'Expect value contain the value of the last option'.", - "notes": "Unknown" - }, - "MatChipList selection logic should not select disabled chips": { - "error": "TypeError: Cannot read property 'selected' of undefined", - "notes": "Unknown" - }, - "MatChipList forms integration single selection should take an initial view value with reactive forms": { - "error": "Error: Expected false to be truthy 'Expect pizza-1 chip to be selected'.", - "notes": "Unknown" - }, - "MatChipList forms integration single selection should set the view value from the form": { - "error": "Error: Expected false to be truthy 'Expect chip to be selected'.", - "notes": "Unknown" - }, - "MatChipList forms integration single selection should update the form value when the view changes": { - "error": "Error: Expected null to equal 'steak-0'.", - "notes": "Unknown" - }, - "MatChipList forms integration single selection should clear the selection when a nonexistent option value is selected": { - "error": "Error: Expected false to be truthy 'Expected chip with the value to be selected.'.", - "notes": "Unknown" - }, - "MatChipList forms integration single selection should set the control to dirty when the chip list's value changes in the DOM": { - "error": "Error: Expected false to equal true.", - "notes": "Unknown" - }, - "MatChipList forms integration single selection should be able to programmatically select a falsy option": { - "error": "Error: Expected false to be true, 'Expected first option to be selected'.", - "notes": "Unknown" - }, - "MatChipList forms integration single selection should blur the form field when the active chip is blurred": { - "error": "Error: Expected ng-tns-c10704-0 mat-primary mat-form-field mat-form-field-type-mat-chip-list mat-form-field-appearance-legacy mat-form-field-can-float mat-form-field-has-label mat-form-field-hide-placeholder ng-untouched ng-pristine ng-valid _mat-animation-noopable to contain 'mat-focused'.", - "notes": "Unknown" - }, - "MatChipList forms integration multiple selection should take an initial view value with reactive forms": { - "error": "Error: Expected false to be truthy 'Expect pizza-1 chip to be selected'.", - "notes": "Unknown" - }, - "MatChipList forms integration multiple selection should set the view value from the form": { - "error": "Error: Expected false to be truthy 'Expect chip to be selected'.", - "notes": "Unknown" - }, - "MatChipList forms integration multiple selection should update the form value when the view changes": { - "error": "Error: Expected null to equal [ 'steak-0' ].", - "notes": "Unknown" - }, - "MatChipList forms integration multiple selection should clear the selection when a nonexistent option value is selected": { - "error": "Error: Expected false to be truthy 'Expected chip with the value to be selected.'.", - "notes": "Unknown" - }, - "MatChipList chip list with chip input should take an initial view value with reactive forms": { - "error": "Error: Expected false to be truthy 'Expect pizza-1 chip to be selected'.", - "notes": "Unknown" - }, - "MatChipList chip list with chip input should set the view value from the form": { - "error": "Error: Expected false to be truthy 'Expect chip to be selected'.", - "notes": "Unknown" - }, - "MatChipList chip list with chip input should update the form value when the view changes": { - "error": "Error: Expected null to equal [ 'steak-0' ].", - "notes": "Unknown" - }, - "MatChipList chip list with chip input should clear the selection when a nonexistent option value is selected": { - "error": "Error: Expected false to be truthy 'Expected chip with the value to be selected.'.", - "notes": "Unknown" - }, - "MatChipList chip list with chip input should set the control to dirty when the chip list's value changes in the DOM": { - "error": "Error: Expected false to equal true.", - "notes": "Unknown" - }, - "MatChipList chip list with chip input should set aria-invalid if the form field is invalid": { - "error": "Error: Expected 'true' to be 'false'.", - "notes": "Unknown" - }, - "MatStepper basic stepper should change selected index on header click": { - "error": "TypeError: Cannot read property 'nativeElement' of undefined", - "notes": "Unknown" - }, - "MatStepper basic stepper should display the correct label": { - "error": "Error: cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.", - "notes": "Unknown" - }, "MatStepper basic stepper should go to next available step when the next button is clicked": { - "error": "TypeError: Cannot read property 'nativeElement' of undefined", - "notes": "Unknown" - }, - "MatStepper basic stepper should set the next stepper button type to \"submit\"": { - "error": "TypeError: Cannot read property 'nativeElement' of null", + "error": "Error: Expected 2 to be 1.", "notes": "Unknown" }, "MatStepper basic stepper should go to previous available step when the previous button is clicked": { - "error": "Error: cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.", - "notes": "Unknown" - }, - "MatStepper basic stepper should set the previous stepper button type to \"button\"": { - "error": "TypeError: Cannot read property 'nativeElement' of null", - "notes": "Unknown" - }, - "MatStepper basic stepper should set the correct step position for animation": { - "error": "Error: cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.", + "error": "TypeError: Cannot read property 'nativeElement' of undefined", "notes": "Unknown" }, "MatStepper basic stepper should not set focus on header of selected step if header is not clicked": { - "error": "TypeError: Cannot read property 'nativeElement' of undefined", + "error": "Error: Expected 2 to be 1.", "notes": "Unknown" }, "MatStepper basic stepper should focus next step header if focus is inside the stepper": { - "error": "TypeError: Cannot read property 'nativeElement' of undefined", + "error": "Error: Expected 2 to be 1.", "notes": "Unknown" }, "MatStepper basic stepper should only be able to return to a previous step if it is editable": { "error": "TypeError: Cannot read property 'nativeElement' of undefined", "notes": "Unknown" }, - "MatStepper basic stepper should set create icon if step is editable and completed": { - "error": "TypeError: Cannot read property 'nativeElement' of undefined", - "notes": "Unknown" - }, - "MatStepper basic stepper should set done icon if step is not editable and is completed": { - "error": "TypeError: Cannot read property 'nativeElement' of undefined", - "notes": "Unknown" - }, "MatStepper basic stepper should set the correct aria-posinset and aria-setsize": { "error": "Error: Expected $.length = 0 to equal 3.", "notes": "Unknown" }, "MatStepper basic stepper should adjust the index when removing a step before the current one": { - "error": "Error: cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.", - "notes": "Unknown" - }, - "MatStepper RTL should reverse animation in RTL mode": { - "error": "Error: cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.", + "error": "Error: Expected 2 to be 1.", "notes": "Unknown" }, "MatStepper linear stepper should not move to next step if current step is pending": { "error": "TypeError: Cannot read property 'nativeElement' of undefined", "notes": "Unknown" }, - "MatStepper linear stepper with no `stepControl` should not move to the next step if the current one is not completed ": { - "error": "TypeError: Cannot read property 'nativeElement' of undefined", - "notes": "Unknown" - }, - "MatStepper linear stepper with `stepControl` should have the `stepControl` take precedence when `completed` is set": { - "error": "TypeError: Cannot read property 'nativeElement' of undefined", - "notes": "Unknown" - }, - "MatStepper vertical stepper should support using the left/right arrows to move focus": { - "error": "TypeError: Cannot read property 'nativeElement' of undefined", - "notes": "Unknown" - }, - "MatStepper vertical stepper should support using the up/down arrows to move focus": { - "error": "TypeError: Cannot read property 'nativeElement' of undefined", - "notes": "Unknown" - }, "MatStepper aria labelling should not set aria-label or aria-labelledby attributes if they are not passed in": { "error": "TypeError: Cannot read property 'hasAttribute' of null", "notes": "Unknown" @@ -1294,7 +1006,7 @@ window.testBlocklist = { "notes": "Unknown" }, "MatDrawer methods should restore focus on close if focus is inside drawer": { - "error": "Error: Expected to be to be