@@ -40,17 +40,44 @@ describe('MatProgressSpinnerHarness', () => {
4040 expect ( await indeterminate . getMode ( ) ) . toBe ( 'indeterminate' ) ;
4141 expect ( await impliedIndeterminate . getMode ( ) ) . toBe ( 'indeterminate' ) ;
4242 } ) ;
43+
44+ it ( 'should get the diameter' , async ( ) => {
45+ const withAttributs =
46+ await loader . getHarness ( MatProgressSpinnerHarness . with ( { selector : '.with-attributs' } ) ) ;
47+ expect ( await withAttributs . getDiameter ( ) ) . toBe ( 30 ) ;
48+ fixture . componentInstance . diameter . set ( 20 ) ;
49+ expect ( await withAttributs . getDiameter ( ) ) . toBe ( 20 ) ;
50+ } ) ;
51+
52+ it ( 'should get the strokeWidth' , async ( ) => {
53+ const withAttributs =
54+ await loader . getHarness ( MatProgressSpinnerHarness . with ( { selector : '.with-attributs' } ) ) ;
55+ expect ( await withAttributs . getStrokeWidth ( ) ) . toBe ( 3 ) ;
56+ fixture . componentInstance . strokeWidth . set ( 5 ) ;
57+ expect ( await withAttributs . getStrokeWidth ( ) ) . toBe ( 5 ) ;
58+ } ) ;
59+
60+ it ( 'should get the strokeWidth when undefined' , async ( ) => {
61+ const withAttributs =
62+ await loader . getHarness ( MatProgressSpinnerHarness . with ( { selector : '.with-attributs' } ) ) ;
63+ expect ( await withAttributs . getStrokeWidth ( ) ) . toBe ( 3 ) ;
64+ fixture . componentInstance . diameter . set ( 20 ) ;
65+ expect ( await withAttributs . getStrokeWidth ( ) ) . toBe ( 2 ) ;
66+ } ) ;
4367} ) ;
4468
4569@Component ( {
4670 template : `
4771 <mat-progress-spinner mode="determinate" [value]="value()"></mat-progress-spinner>
4872 <mat-progress-spinner mode="indeterminate"></mat-progress-spinner>
4973 <mat-spinner></mat-spinner>
74+ <mat-spinner class="with-attributs" [diameter]="diameter()" [strokeWidth]="strokeWidth()"></mat-spinner>
5075 ` ,
5176 standalone : true ,
5277 imports : [ MatProgressSpinnerModule ] ,
5378} )
5479class ProgressSpinnerHarnessTest {
5580 value = signal ( 0 ) ;
81+ diameter = signal ( 30 ) ;
82+ strokeWidth = signal ( 3 ) ;
5683}
0 commit comments