Skip to content

Commit

Permalink
test: implement sd-textarea checks for aria-invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
paulovareiro29 committed Nov 13, 2024
1 parent 7753b7a commit c89fbe7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/components/src/components/textarea/textarea.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ describe('<sd-textarea>', () => {
await el.updateComplete;

expect(el.checkValidity()).to.be.true;
expect(el.shadowRoot!.querySelector('textarea')!.hasAttribute('aria-invalid')).to.be.false;
expect(el.hasAttribute('data-user-invalid')).to.be.false;
expect(el.hasAttribute('data-user-valid')).to.be.true;
});
Expand All @@ -206,6 +207,7 @@ describe('<sd-textarea>', () => {
el.blur();
await el.updateComplete;

expect(el.shadowRoot!.querySelector('textarea')!.hasAttribute('aria-invalid')).to.be.true;
expect(el.hasAttribute('data-user-invalid')).to.be.true;
expect(el.hasAttribute('data-user-valid')).to.be.false;
});
Expand Down

0 comments on commit c89fbe7

Please sign in to comment.