Skip to content

Commit

Permalink
test(sbb-toggle-check): improved test consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMenga committed Oct 10, 2023
1 parent 1be5f69 commit 582e048
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/sbb-toggle-check/sbb-toggle-check.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert, expect, fixture } from '@open-wc/testing';
import { assert, expect, fixture, nextFrame } from '@open-wc/testing';
import { sendKeys } from '@web/test-runner-commands';
import { html } from 'lit/static-html.js';
import { waitForCondition } from '../../global/testing';
Expand Down Expand Up @@ -66,6 +66,7 @@ describe('sbb-toggle-check', () => {
toggle.focus();
await sendKeys({ press: ' ' });
await toggle.updateComplete;
await nextFrame(); // Needed because there is a setTimeout in sbb-toggle-check

expect(toggle).to.have.attribute('checked');
expect(document.querySelector('#scroll-context').scrollTop).to.be.equal(0);
Expand Down

0 comments on commit 582e048

Please sign in to comment.