mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
Added title attribute (#1043)
* added title attribute Fixes #1042 * added tests for title * also some other tests * clarify why title was added
This commit is contained in:
committed by
GitHub
parent
31e1f2fc59
commit
35aa56d334
@@ -18,6 +18,7 @@ describe('<sl-input>', () => {
|
||||
expect(el.name).to.equal('');
|
||||
expect(el.value).to.equal('');
|
||||
expect(el.defaultValue).to.equal('');
|
||||
expect(el.title).to.equal('');
|
||||
expect(el.filled).to.be.false;
|
||||
expect(el.pill).to.be.false;
|
||||
expect(el.label).to.equal('');
|
||||
@@ -47,6 +48,13 @@ describe('<sl-input>', () => {
|
||||
expect(isNaN(el.valueAsNumber)).to.be.true;
|
||||
});
|
||||
|
||||
it('should have title if title attribute isset', async () => {
|
||||
const el = await fixture<SlInput>(html` <sl-input title="Test"></sl-input> `);
|
||||
const input = el.shadowRoot!.querySelector<HTMLInputElement>('[part~="input"]')!;
|
||||
|
||||
expect(input.title).to.equal('Test');
|
||||
});
|
||||
|
||||
it('should be disabled with the disabled attribute', async () => {
|
||||
const el = await fixture<SlInput>(html` <sl-input disabled></sl-input> `);
|
||||
const input = el.shadowRoot!.querySelector<HTMLInputElement>('[part~="input"]')!;
|
||||
|
||||
Reference in New Issue
Block a user