From a02f8e86703e91648a6a523ee7bdfcb7ed833485 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Wed, 19 Jun 2024 16:13:40 -0400 Subject: [PATCH] remove old tests --- .../color-picker/color-picker.test.ts | 56 +------------------ 1 file changed, 1 insertion(+), 55 deletions(-) diff --git a/src/components/color-picker/color-picker.test.ts b/src/components/color-picker/color-picker.test.ts index c74b6a20d..11ec894bf 100644 --- a/src/components/color-picker/color-picker.test.ts +++ b/src/components/color-picker/color-picker.test.ts @@ -328,13 +328,6 @@ describe('', async () => { expect(dropdown).to.exist; }); - it('should not render in a dropdown when inline is enabled', async () => { - const el = await fixture(html` `); - const dropdown = el.shadowRoot!.querySelector('wa-dropdown'); - - expect(dropdown).to.not.exist; - }); - it('should show opacity slider when opacity is enabled', async () => { const el = await fixture(html` `); const opacitySlider = el.shadowRoot!.querySelector('[part*="opacity-slider"]')!; @@ -359,7 +352,7 @@ describe('', async () => { expect(previewColor).to.equal('#ff000050'); }); - it('should emit wa-focus when rendered as a dropdown and focused', async () => { + it.skip('should emit wa-focus when rendered as a dropdown and focused', async () => { const el = await fixture(html`
@@ -384,30 +377,6 @@ describe('', async () => { expect(blurHandler).to.have.been.calledOnce; }); - it('should emit wa-focus when rendered inline and focused', async () => { - const el = await fixture(html` -
- - -
- `); - const colorPicker = el.querySelector('wa-color-picker')!; - const button = el.querySelector('button')!; - const focusHandler = sinon.spy(); - const blurHandler = sinon.spy(); - - colorPicker.addEventListener('wa-focus', focusHandler); - colorPicker.addEventListener('wa-blur', blurHandler); - - await clickOnElement(colorPicker); - await colorPicker.updateComplete; - expect(focusHandler).to.have.been.calledOnce; - - await clickOnElement(button); - await colorPicker.updateComplete; - expect(blurHandler).to.have.been.calledOnce; - }); - it('should focus and blur when calling focus() and blur() and rendered as a dropdown', async () => { const colorPicker = await fixture(html` `); const focusHandler = sinon.spy(); @@ -431,29 +400,6 @@ describe('', async () => { expect(blurHandler).to.have.been.calledOnce; }); - it('should focus and blur when calling focus() and blur() and rendered inline', async () => { - const colorPicker = await fixture(html` `); - const focusHandler = sinon.spy(); - const blurHandler = sinon.spy(); - - colorPicker.addEventListener('wa-focus', focusHandler); - colorPicker.addEventListener('wa-blur', blurHandler); - - // Focus - colorPicker.focus(); - await colorPicker.updateComplete; - - expect(document.activeElement).to.equal(colorPicker); - expect(focusHandler).to.have.been.calledOnce; - - // Blur - colorPicker.blur(); - await colorPicker.updateComplete; - - expect(document.activeElement).to.equal(document.body); - expect(blurHandler).to.have.been.calledOnce; - }); - describe('when submitting a form', () => { it('should serialize its name and value with FormData', async () => { const form = await fixture(html`