mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-10 10:06:15 -08:00
test(playback): wait for PiP video in Electron E2E
This commit is contained in:
1 parent
422c0315e3
commit
df9dda153e
1 file changed
+5
-11
@@ -278,16 +278,11 @@ test.describe('Electron Settings', () => {
|
||||
|
||||
await expect(firstChannel).toBeVisible({ timeout: 20000 });
|
||||
await firstChannel.click();
|
||||
await app.mainWindow.evaluate(() => {
|
||||
const video = document.querySelector<HTMLVideoElement>(
|
||||
'app-html-video-player video'
|
||||
);
|
||||
if (!video) {
|
||||
throw new Error(
|
||||
'Expected app-html-video-player video after the HTML5 player mounted'
|
||||
);
|
||||
}
|
||||
|
||||
const video = app.mainWindow.locator(
|
||||
'app-html-video-player video'
|
||||
);
|
||||
await expect(video).toBeAttached();
|
||||
await video.evaluate<void, HTMLVideoElement>((video) => {
|
||||
const ownerDocument = video.ownerDocument;
|
||||
let activePictureInPictureElement: Element | null = null;
|
||||
video.dataset['pictureInPictureRequestCount'] = '0';
|
||||
@@ -364,7 +359,6 @@ test.describe('Electron Settings', () => {
|
||||
await expect(
|
||||
app.mainWindow.locator('app-html-video-player video[controls]')
|
||||
).toHaveCount(0);
|
||||
const video = app.mainWindow.locator('app-html-video-player video');
|
||||
const enterPictureInPicture = playerControls.getByRole('button', {
|
||||
name: 'Enter picture-in-picture',
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user