Skip to content

Commit

Permalink
fix(color-slider): use correct focus events in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Westbrook committed Oct 4, 2021
1 parent bc971f2 commit b974c12
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/color-slider/test/color-slider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ describe('ColorSlider', () => {

await elementUpdated(el);

el.focusElement.dispatchEvent(new FocusEvent('focus'));
el.dispatchEvent(new FocusEvent('focusin'));
await elementUpdated(el);

expect(el.focused);
expect(el.focused).to.be.true;

el.focusElement.dispatchEvent(new FocusEvent('blur'));
el.dispatchEvent(new FocusEvent('focusout'));
await elementUpdated(el);

expect(!el.focused);
expect(el.focused).to.be.false;
});
it('dispatches input and change events in response to "Arrow*" keypresses', async () => {
const inputSpy = spy();
Expand Down Expand Up @@ -356,7 +356,7 @@ describe('ColorSlider', () => {

await elementUpdated(el);

const { handle } = (el as unknown) as { handle: HTMLElement };
const { handle } = el as unknown as { handle: HTMLElement };

handle.setPointerCapture = () => {
return;
Expand Down Expand Up @@ -461,7 +461,7 @@ describe('ColorSlider', () => {

await elementUpdated(el);

const { handle } = (el as unknown) as { handle: HTMLElement };
const { handle } = el as unknown as { handle: HTMLElement };

handle.setPointerCapture = () => {
return;
Expand Down Expand Up @@ -526,7 +526,7 @@ describe('ColorSlider', () => {
document.documentElement.dir = 'rtl';
await elementUpdated(el);

const { handle } = (el as unknown) as { handle: HTMLElement };
const { handle } = el as unknown as { handle: HTMLElement };
const clientWidth = document.documentElement.offsetWidth;

handle.setPointerCapture = () => {
Expand Down

0 comments on commit b974c12

Please sign in to comment.