Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Angular] Fix deprecated signature for tableRow.injector.get #26529

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-%>
import { Component, DebugElement, inject } from '@angular/core';
import { Component, DebugElement, Type, inject } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { FaIconComponent, FaIconLibrary } from '@fortawesome/angular-fontawesome';
Expand Down Expand Up @@ -72,7 +72,7 @@ describe('Directive: SortByDirective', () => {
it('should have a neutral state for predicate column and undefined order value', () => {
// GIVEN
component.sortState.set({ predicate: 'name' });
const sortByDirective = tableHead.injector.get(SortByDirective);
const sortByDirective = tableHead.injector.get(SortByDirective as Type<SortByDirective>);

// WHEN
fixture.detectChanges();
Expand All @@ -85,7 +85,7 @@ describe('Directive: SortByDirective', () => {
it('should have an asc state for predicate column and true asc value', () => {
// GIVEN
component.sortState.set({ predicate: 'name', order: 'asc' });
const sortByDirective = tableHead.injector.get(SortByDirective);
const sortByDirective = tableHead.injector.get(SortByDirective as Type<SortByDirective>);

// WHEN
fixture.detectChanges();
Expand All @@ -98,7 +98,7 @@ describe('Directive: SortByDirective', () => {
it('should have a desc state for predicate column and desc value', () => {
// GIVEN
component.sortState.set({ predicate: 'name', order: 'desc' });
const sortByDirective = tableHead.injector.get(SortByDirective);
const sortByDirective = tableHead.injector.get(SortByDirective as Type<SortByDirective>);

// WHEN
fixture.detectChanges();
Expand All @@ -111,7 +111,7 @@ describe('Directive: SortByDirective', () => {
it('should have a neutral state for non-predicate column', () => {
// GIVEN
component.sortState.set({ predicate: 'non-existing-column', order: 'asc' });
const sortByDirective = tableHead.injector.get(SortByDirective);
const sortByDirective = tableHead.injector.get(SortByDirective as Type<SortByDirective>);

// WHEN
fixture.detectChanges();
Expand All @@ -123,7 +123,7 @@ describe('Directive: SortByDirective', () => {

it('multiple clicks at same component, should call SortDirective sort', () => {
// GIVEN
const sortDirective = tableHead.injector.get(SortDirective);
const sortDirective = tableHead.injector.get(SortDirective as Type<SortDirective>);
sortDirective.sort = jest.fn();

// WHEN
Expand Down
Loading