remove test because we can't reliably suppress retargeted clicks

pull/1460/head
Cory LaViska 2023-07-18 13:11:08 -04:00
rodzic 7218a19357
commit 5016d27af7
2 zmienionych plików z 1 dodań i 22 usunięć

Wyświetl plik

@ -455,7 +455,7 @@ const App = () => (
### Disabled
Use the `disabled` attribute to disable a button. Clicks will be suppressed until the disabled state is removed.
Use the `disabled` attribute to disable a button.
```html:preview
<sl-button variant="default" disabled>Default</sl-button>

Wyświetl plik

@ -68,27 +68,6 @@ describe('<sl-button>', () => {
const el = await fixture<SlButton>(html` <sl-button href="some/path" disabled>Button Label</sl-button> `);
expect(el.shadowRoot!.querySelector('a[disabled]')).not.to.exist;
});
it('should not bubble up clicks', async () => {
const button = await fixture<SlButton>(html` <sl-button disabled>Button Label</sl-button> `);
const handleClick = sinon.spy();
button.addEventListener('click', handleClick);
button.click();
expect(handleClick).not.to.have.been.called;
button.shadowRoot!.querySelector('button')!.click();
expect(handleClick).not.to.have.been.called;
const buttonLink = await fixture<SlButton>(html` <sl-button href="some/path" disabled>Button Label</sl-button> `);
buttonLink.addEventListener('click', handleClick);
buttonLink.click();
expect(handleClick).not.to.have.been.called;
buttonLink.shadowRoot!.querySelector('a')!.click();
expect(handleClick).not.to.have.been.called;
});
});
it('should have title if title attribute is set', async () => {