diff --git a/src/browser/fixture.js b/src/browser/fixture.js index b57f55c5..3fe9f2e8 100644 --- a/src/browser/fixture.js +++ b/src/browser/fixture.js @@ -1,3 +1,5 @@ +/* eslint no-console: 0 */ + import { nextFrame, fixture as wcFixture } from '@open-wc/testing'; import { reset } from './reset.js'; @@ -48,11 +50,19 @@ async function waitForElem(elem, awaitLoadingComplete = true) { } export async function fixture(element, opts = {}) { + console.log('before reset'); await Promise.all([reset(opts), document.fonts.ready]); + console.log('after reset'); + console.log('before wcFixture'); const elem = await wcFixture(element); + console.log('after wcFixture'); + console.log('before waitForElem'); await waitForElem(elem, opts.awaitLoadingComplete); + console.log('after waitForElem'); + console.log('before pause'); await pause(); + console.log('after pause'); return elem; } diff --git a/src/browser/reset.js b/src/browser/reset.js index 491088ab..991d1e7e 100644 --- a/src/browser/reset.js +++ b/src/browser/reset.js @@ -1,3 +1,5 @@ +/* eslint no-console: 0 */ + import { sendMouse, setViewport } from '@web/test-runner-commands'; import { nextFrame } from '@open-wc/testing'; @@ -18,7 +20,6 @@ export function requestMouseReset() { } export async function reset(opts) { - opts = opts || {}; opts.lang = opts.lang || DEFAULT_LANG; opts.mathjax = opts.mathjax || {}; diff --git a/test/browser/commands.test.js b/test/browser/commands.test.js index c5ce639a..4b3bbe9d 100644 --- a/test/browser/commands.test.js +++ b/test/browser/commands.test.js @@ -1,3 +1,5 @@ +/* eslint no-console: 0 */ + import { clickAt, clickElem, expect, fixture, focusElem, hoverAt, hoverElem, sendKeys, sendKeysElem } from '../../src/browser/index.js'; import { html } from 'lit'; import { spy } from 'sinon'; @@ -7,7 +9,9 @@ describe('commands', () => { let elem; const input = html``; beforeEach(async() => { + console.log('before fixture'); elem = await fixture(input); + console.log('after fixture'); }); it('should click on element', async() => {