From 08e7927500b11de2293b5a4ffe574112ae38b12b Mon Sep 17 00:00:00 2001 From: Kamil Stasiak Date: Tue, 4 Jun 2024 10:40:59 +0200 Subject: [PATCH] Fix e2e tests --- e2e/app/package-lock.json | 2 ++ e2e/app/src/MockComponent.tsx | 11 +++++++---- e2e/app/src/VideoPlayerWithDetector.tsx | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/e2e/app/package-lock.json b/e2e/app/package-lock.json index d2d06877..036094ed 100644 --- a/e2e/app/package-lock.json +++ b/e2e/app/package-lock.json @@ -52,6 +52,8 @@ "eslint-config-prettier": "^9.1.0", "eslint-plugin-react-hooks": "^4.6.0", "fake-mediastreamtrack": "^1.2.0", + "husky": "^9.0.11", + "lint-staged": "^15.2.5", "prettier": "^3.1.0", "prettier-plugin-tailwindcss": "^0.5.7", "react": "^18.2.0", diff --git a/e2e/app/src/MockComponent.tsx b/e2e/app/src/MockComponent.tsx index f76586ed..91936207 100644 --- a/e2e/app/src/MockComponent.tsx +++ b/e2e/app/src/MockComponent.tsx @@ -7,11 +7,12 @@ import { SimulcastConfig, WebRTCEndpoint, } from '@fishjam-dev/ts-client'; +import { MuteTrackTest } from "./MuteTrackTest"; -const brainMock = createStream('🧠', 'white', 'low', 24); -const brain2Mock = createStream('🤯', '#00ff00', 'low', 24); -const heartMock = createStream('🫀', 'white', 'low', 24); -const heart2Mock = createStream('💝', '#FF0000', 'low', 24); +export const brainMock = createStream('🧠', 'white', 'low', 24); +export const brain2Mock = createStream('🤯', '#00ff00', 'low', 24); +export const heartMock = createStream('🫀', 'white', 'low', 24); +export const heart2Mock = createStream('💝', '#FF0000', 'low', 24); type Props = { webrtc: WebRTCEndpoint; @@ -148,6 +149,8 @@ export const MockComponent = ({ webrtc }: Props) => { + + ); }; diff --git a/e2e/app/src/VideoPlayerWithDetector.tsx b/e2e/app/src/VideoPlayerWithDetector.tsx index ce452422..c486f430 100644 --- a/e2e/app/src/VideoPlayerWithDetector.tsx +++ b/e2e/app/src/VideoPlayerWithDetector.tsx @@ -1,5 +1,6 @@ import { useEffect, useRef, useState } from 'react'; import { getPixel, Pixel } from './mocks'; +import { WebRTCEndpoint } from "@fishjam-dev/ts-client"; type Props = { stream?: MediaStream;