5
5
createMouseEvent ,
6
6
dispatchMouseEvent ,
7
7
wrappedErrorMessage ,
8
- } from '../.. /cdk/testing/private' ;
8
+ } from '@angular /cdk/testing/private' ;
9
9
import { Component , ElementRef , ViewChild } from '@angular/core' ;
10
10
import { waitForAsync , ComponentFixture , fakeAsync , TestBed , tick } from '@angular/core/testing' ;
11
11
import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
@@ -35,8 +35,11 @@ describe('MatSort', () => {
35
35
36
36
beforeEach ( waitForAsync ( ( ) => {
37
37
TestBed . configureTestingModule ( {
38
- imports : [ MatSortModule , MatTableModule , CdkTableModule , NoopAnimationsModule ] ,
39
- declarations : [
38
+ imports : [
39
+ MatSortModule ,
40
+ MatTableModule ,
41
+ CdkTableModule ,
42
+ NoopAnimationsModule ,
40
43
SimpleMatSortApp ,
41
44
CdkTableMatSortApp ,
42
45
MatTableMatSortApp ,
@@ -507,8 +510,13 @@ describe('MatSort', () => {
507
510
508
511
beforeEach ( waitForAsync ( ( ) => {
509
512
TestBed . configureTestingModule ( {
510
- imports : [ MatSortModule , MatTableModule , CdkTableModule , NoopAnimationsModule ] ,
511
- declarations : [ MatSortWithoutExplicitInputs ] ,
513
+ imports : [
514
+ MatSortModule ,
515
+ MatTableModule ,
516
+ CdkTableModule ,
517
+ NoopAnimationsModule ,
518
+ MatSortWithoutExplicitInputs ,
519
+ ] ,
512
520
providers : [
513
521
{
514
522
provide : MAT_SORT_DEFAULT_OPTIONS ,
@@ -541,8 +549,13 @@ describe('MatSort', () => {
541
549
542
550
beforeEach ( waitForAsync ( ( ) => {
543
551
TestBed . configureTestingModule ( {
544
- imports : [ MatSortModule , MatTableModule , CdkTableModule , NoopAnimationsModule ] ,
545
- declarations : [ MatSortWithoutInputs ] ,
552
+ imports : [
553
+ MatSortModule ,
554
+ MatTableModule ,
555
+ CdkTableModule ,
556
+ NoopAnimationsModule ,
557
+ MatSortWithoutInputs ,
558
+ ] ,
546
559
providers : [
547
560
{
548
561
provide : MAT_SORT_DEFAULT_OPTIONS ,
@@ -648,6 +661,8 @@ type SimpleMatSortAppColumnIds = 'defaultA' | 'defaultB' | 'overrideStart' | 'ov
648
661
</div>
649
662
</div>
650
663
` ,
664
+ standalone : true ,
665
+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
651
666
} )
652
667
class SimpleMatSortApp {
653
668
latestSortEvent : Sort ;
@@ -728,6 +743,8 @@ class FakeDataSource extends DataSource<any> {
728
743
<cdk-row *cdkRowDef="let row; columns: columnsToRender"></cdk-row>
729
744
</cdk-table>
730
745
` ,
746
+ standalone : true ,
747
+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
731
748
} )
732
749
class CdkTableMatSortApp {
733
750
@ViewChild ( MatSort ) matSort : MatSort ;
@@ -758,6 +775,8 @@ class CdkTableMatSortApp {
758
775
<mat-row *matRowDef="let row; columns: columnsToRender"></mat-row>
759
776
</mat-table>
760
777
` ,
778
+ standalone : true ,
779
+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
761
780
} )
762
781
class MatTableMatSortApp {
763
782
@ViewChild ( MatSort ) matSort : MatSort ;
@@ -768,6 +787,8 @@ class MatTableMatSortApp {
768
787
769
788
@Component ( {
770
789
template : `<div mat-sort-header="a"> A </div>` ,
790
+ standalone : true ,
791
+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
771
792
} )
772
793
class MatSortHeaderMissingMatSortApp { }
773
794
@@ -778,6 +799,8 @@ class MatSortHeaderMissingMatSortApp {}
778
799
<div mat-sort-header="duplicateId"> A </div>
779
800
</div>
780
801
` ,
802
+ standalone : true ,
803
+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
781
804
} )
782
805
class MatSortDuplicateMatSortableIdsApp { }
783
806
@@ -787,6 +810,8 @@ class MatSortDuplicateMatSortableIdsApp {}
787
810
<div mat-sort-header> A </div>
788
811
</div>
789
812
` ,
813
+ standalone : true ,
814
+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
790
815
} )
791
816
class MatSortableMissingIdApp { }
792
817
@@ -796,6 +821,8 @@ class MatSortableMissingIdApp {}
796
821
<div mat-sort-header="a"> A </div>
797
822
</div>
798
823
` ,
824
+ standalone : true ,
825
+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
799
826
} )
800
827
class MatSortableInvalidDirection { }
801
828
@@ -810,6 +837,8 @@ class MatSortableInvalidDirection {}
810
837
</div>
811
838
</div>
812
839
` ,
840
+ standalone : true ,
841
+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
813
842
} )
814
843
class MatSortWithoutExplicitInputs {
815
844
latestSortEvent : Sort ;
@@ -843,6 +872,8 @@ class MatSortWithoutExplicitInputs {
843
872
</div>
844
873
</div>
845
874
` ,
875
+ standalone : true ,
876
+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
846
877
} )
847
878
class MatSortWithArrowPosition {
848
879
arrowPosition ?: 'before' | 'after' ;
@@ -862,6 +893,8 @@ class MatSortWithArrowPosition {
862
893
</div>
863
894
</div>
864
895
` ,
896
+ standalone : true ,
897
+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
865
898
} )
866
899
class MatSortWithoutInputs {
867
900
@ViewChild ( MatSort ) matSort : MatSort ;
0 commit comments