remove test because we can't reliably prevent retargeted click handlers

pull/1460/head
Cory LaViska 2023-07-18 12:58:22 -04:00
rodzic c6281859fd
commit cca40ca710
1 zmienionych plików z 0 dodań i 11 usunięć

Wyświetl plik

@ -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');