kopia lustrzana https://github.com/shoelace-style/shoelace
remove test because we can't reliably prevent retargeted click handlers
rodzic
c6281859fd
commit
cca40ca710
|
@ -1,5 +1,4 @@
|
|||
import '../../../dist/shoelace.js';
|
||||
import { clickOnElement } from '../../internal/test.js';
|
||||
import { expect, fixture, html, waitUntil } from '@open-wc/testing';
|
||||
import sinon from 'sinon';
|
||||
import type SlMenuItem from './menu-item';
|
||||
|
@ -32,16 +31,6 @@ describe('<sl-menu-item>', () => {
|
|||
expect(el.getAttribute('aria-disabled')).to.equal('true');
|
||||
});
|
||||
|
||||
it('should not emit the click event when disabled', async () => {
|
||||
const el = await fixture<SlMenuItem>(html` <sl-menu-item disabled>Test</sl-menu-item> `);
|
||||
const clickHandler = sinon.spy();
|
||||
el.addEventListener('click', clickHandler);
|
||||
await clickOnElement(el);
|
||||
await el.updateComplete;
|
||||
|
||||
expect(clickHandler).to.not.have.been.called;
|
||||
});
|
||||
|
||||
it('should return a text label when calling getTextLabel()', async () => {
|
||||
const el = await fixture<SlMenuItem>(html` <sl-menu-item>Test</sl-menu-item> `);
|
||||
expect(el.getTextLabel()).to.equal('Test');
|
||||
|
|
Ładowanie…
Reference in New Issue