chore(playwright): enable type checking (#25034)

This commit is contained in:
Sean Perkins
2022-03-31 15:42:09 -04:00
committed by GitHub
parent 0aa6d124d6
commit 2af24494f5
63 changed files with 163 additions and 173 deletions

View File

@ -1,10 +1,11 @@
import { testLoading } from '../test.utils';
import { newE2EPage } from '@stencil/core/testing';
import { testLoading } from '../test.utils';
const DIRECTORY = 'basic';
const getActiveElementText = async (page) => {
const getActiveElementText = async page => {
const activeElement = await page.evaluateHandle(() => document.activeElement);
return await page.evaluate(el => el && el.textContent, activeElement);
return page.evaluate(el => el && el.textContent, activeElement);
}
test('loading: focus trap', async () => {
@ -13,7 +14,7 @@ test('loading: focus trap', async () => {
await page.click('#html-content-loading');
await page.waitForSelector('#html-content-loading');
let loading = await page.find('ion-loading');
const loading = await page.find('ion-loading');
expect(loading).not.toBe(null);
await loading.waitForVisible();
@ -102,12 +103,12 @@ test('loading: htmlAttributes', async () => {
await page.click('#basic-loading');
await page.waitForSelector('#basic-loading');
let alert = await page.find('ion-loading');
const alert = await page.find('ion-loading');
expect(alert).not.toBe(null);
await alert.waitForVisible();
const attribute = await page.evaluate((el) => document.querySelector('ion-loading').getAttribute('data-testid'));
const attribute = await page.evaluate(el => document.querySelector('ion-loading').getAttribute('data-testid'));
expect(attribute).toEqual('basic-loading');
});

View File

@ -1,5 +1,4 @@
import { newE2EPage } from '@stencil/core/testing';
import { generateE2EUrl } from '@utils/test';
export const testLoading = async (