Skip to content

Commit

Permalink
unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackbaud-ErikaMcVey committed Jan 29, 2024
1 parent c5d1a55 commit 83ce2e4
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,18 @@ describe('Checkbox component', () => {
expect(label?.textContent?.trim()).toBe('Simple checkbox');
});

it('should render the labelText when provided', () => {
const labelText = 'Label text';
testComponent.labelText = labelText;
fixture.detectChanges();

const label = checkboxNativeElement?.querySelector(
'.sky-checkbox-wrapper sky-checkbox-label',
);

expect(label?.textContent?.trim()).toBe(labelText);
});

it('should make the host element a tab stop', () => {
expect(inputElement?.tabIndex).toBe(0);
});
Expand Down

0 comments on commit 83ce2e4

Please sign in to comment.