Skip to content

Commit 73d4d1c

Browse files
committed
Update progress-spinner-harness.ts
1 parent 0f02d98 commit 73d4d1c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/material/progress-spinner/testing/progress-spinner-harness.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,15 @@ export class MatProgressSpinnerHarness extends ComponentHarness {
4848

4949
/** Gets the progress spinner's diameter. */
5050
async getDiameter(): Promise<number | null> {
51-
const diameterAttr = (await this.host()).getAttribute('data-mat-progress-spinner-diameter');
52-
return (await diameterAttr) as ProgressSpinnerMode;
51+
const host = await this.host();
52+
const diameterAttr = await host.getAttribute('data-mat-progress-spinner-diameter');
53+
return diameterAttr ? coerceNumberProperty(diameterAttr) : null;
5354
}
5455

5556
/** Gets the progress spinner's strokeWidth. */
5657
async getStrokeWidth(): Promise<number | null> {
57-
const strokeWidthAttr = (await this.host()).getAttribute('data-mat-progress-spinner-strokeWidth');
58-
return (await strokeWidthAttr) as ProgressSpinnerMode;
58+
const host = await this.host();
59+
const strokeWidthAttr = await host.getAttribute('data-mat-progress-spinner-strokeWidth');
60+
return strokeWidthAttr ? coerceNumberProperty(strokeWidthAttr) : null;
5961
}
6062
}

0 commit comments

Comments
 (0)