Skip to content

Commit af87dc4

Browse files
Fix 'should have ARIA labels on form fields' test assertion
Changed expect(hasAccessibleName || true).toBe(true) to expect(hasAccessibleName).toBeTruthy() since hasAccessibleName is a string value (e.g., 'mat-input-5') not a boolean. The || true pattern was causing the assertion to compare a string to boolean true. Result: Test now passes.
1 parent f54e64c commit af87dc4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/accessibility/aria-labels.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ test.describe('ARIA Labels', () => {
4747
// Should have either aria-label, aria-labelledby, or associated label
4848
const hasAccessibleName = ariaLabel || ariaLabelledBy || id;
4949

50-
expect(hasAccessibleName || true).toBe(true);
50+
expect(hasAccessibleName).toBeTruthy();
5151
}
5252
}
5353
});

0 commit comments

Comments
 (0)