diff --git a/src/components/core/testing/private/fixture.ts b/src/components/core/testing/private/fixture.ts index 444971dd05..32dde0b039 100644 --- a/src/components/core/testing/private/fixture.ts +++ b/src/components/core/testing/private/fixture.ts @@ -91,7 +91,7 @@ export async function visualRegressionFixture( const fix = await fixture( html`
${template}
`, diff --git a/src/components/core/testing/private/visual-regression-snapshot.ts b/src/components/core/testing/private/visual-regression-snapshot.ts index b27da02bdf..501f1bb538 100644 --- a/src/components/core/testing/private/visual-regression-snapshot.ts +++ b/src/components/core/testing/private/visual-regression-snapshot.ts @@ -2,8 +2,6 @@ import { aTimeout } from '@open-wc/testing'; import { resetMouse, sendKeys, sendMouse } from '@web/test-runner-commands'; import { visualDiff } from '@web/test-runner-visual-regression'; -import { waitForCondition } from '../wait-for-condition.js'; - export function imageName(test: Mocha.Runnable): string { return test!.fullTitle().replaceAll(', ', '-').replaceAll(' ', '_'); } @@ -30,12 +28,8 @@ export function testVisualDiff(snapshotElement: () => HTMLElement): void { export function testVisualDiffFocus(snapshotElement: () => HTMLElement): void { it('focus', async function () { - await waitForCondition(() => { - snapshotElement().focus(); - return document.activeElement === snapshotElement(); - }); + snapshotElement().focus(); await sendKeys({ press: 'Tab' }); - await aTimeout(60); await visualDiff(snapshotElement(), imageName(this.test!)); }); }