diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index dee64bd..4df095b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -30,7 +30,7 @@ jobs: - name: Test Webkit run: | - sudo apt-get install libegl1 libopus0 libwoff1 libharfbuzz-icu0 gstreamer1.0-plugins-base libgstreamer-gl1.0-0 gstreamer1.0-plugins-bad libopenjp2-7 libwebpdemux2 libenchant1c2a libhyphen0 libgles2 gstreamer1.0-libav + sudo apt-get -qq install libegl1 libopus0 libwoff1 libharfbuzz-icu0 gstreamer1.0-plugins-base libgstreamer-gl1.0-0 gstreamer1.0-plugins-bad libopenjp2-7 libwebpdemux2 libenchant1c2a libhyphen0 libgles2 gstreamer1.0-libav BROWSER=webkit npm run test - name: Upload artifact diff --git a/package.json b/package.json index ed6845b..3ef5655 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "@rollup/plugin-typescript": "^8.2.1", "@types/jest": "^26.0.23", "@types/jest-image-snapshot": "^4.3.0", - "hass-taste-test": "^0.0.7", + "hass-taste-test": "^0.0.8", "jest": "^27.0.6", "jest-image-snapshot": "^4.5.1", "playwright": "^1.12.3", diff --git a/test/util.ts b/test/util.ts index f472d52..dcb280e 100644 --- a/test/util.ts +++ b/test/util.ts @@ -1,5 +1,5 @@ import { durationToSeconds } from "custom-card-helpers"; -import { HomeAssistant, PlaywrightElement } from "hass-taste-test"; +import { HomeAssistant, HassCard, PlaywrightElement } from "hass-taste-test"; import { entitiesColl } from "home-assistant-js-websocket"; import { toMatchImageSnapshot } from "jest-image-snapshot"; import { toMatchSnapshot } from "jest-snapshot"; @@ -15,7 +15,7 @@ export async function getEntity(hass: HomeAssistant, entity_id: string) { } /** Wait for a timer to reach the time specified. */ -export async function waitForTimerTime(card: any, time: string) { +export async function waitForTimerTime(card: HassCard, time: string) { const element: PlaywrightElement = await card.element(); const textContent = await element.$(".text-content"); const frame = await element.ownerFrame(); @@ -51,7 +51,7 @@ export async function synchronizeTimerPaused(hass: HomeAssistant, entity_id } /** Match both html and image snapshot */ -export async function toMatchDualSnapshot(this: any, received: any, name?: string) { +export async function toMatchDualSnapshot(this: any, received: HassCard, name?: string) { const html = await received.html({ ignoreAttributes: ["style"] }); const htmlResult = toMatchSnapshot.call(this, html, name);