test(playback): cover shared controls setting

This commit is contained in:
4gray committed 2026-07-17 08:29:42 +02:00
1 parent 40d5238071
commit c51f8b89c2
2 files changed
+73

No files matched your search

@@ -169,6 +169,11 @@ test.describe('Electron Settings', () => {
'select-video-player',
'html5'
);
const sharedControlsCheckbox = firstLaunch.mainWindow
.getByTestId('web-player-shared-controls-setting')
.locator('input[type="checkbox"]');
await expect(sharedControlsCheckbox).toBeVisible();
await sharedControlsCheckbox.check();
await selectSettingsOption(
firstLaunch.mainWindow,
'select-stream-format',
@@ -206,6 +211,11 @@ test.describe('Electron Settings', () => {
await expect(
secondLaunch.mainWindow.getByTestId('select-video-player')
).toContainText(/HTML5/i);
await expect(
secondLaunch.mainWindow
.getByTestId('web-player-shared-controls-setting')
.locator('input[type="checkbox"]')
).toBeChecked();
await expect(
secondLaunch.mainWindow.getByTestId('select-stream-format')
).toContainText('ts');
@@ -231,6 +241,49 @@ test.describe('Electron Settings', () => {
}
});
test('@settings @playback @electron applies shared controls to the next HTML5 session', async ({
dataDir,
}) => {
const app = await launchElectronApp(dataDir);
try {
await openSettings(app.mainWindow);
await selectSettingsOption(
app.mainWindow,
'select-video-player',
'html5'
);
const sharedControlsCheckbox = app.mainWindow
.getByTestId('web-player-shared-controls-setting')
.locator('input[type="checkbox"]');
await expect(sharedControlsCheckbox).toBeVisible();
await sharedControlsCheckbox.check();
await saveSettings(app.mainWindow);
await goToDashboard(app.mainWindow);
await importM3uPlaylistFromNativeDialog(app, m3uFixturePath);
await app.mainWindow.waitForURL(/\/workspace\/playlists\/.+/);
const firstChannel = channelItemByTitle(
app.mainWindow,
'Channel 1'
).first();
await expect(firstChannel).toBeVisible({ timeout: 20000 });
await firstChannel.click();
await expect(
app.mainWindow.locator(
'app-html-video-player app-player-controls'
)
).toBeVisible();
await expect(
app.mainWindow.locator('app-html-video-player video[controls]')
).toHaveCount(0);
} finally {
await closeElectronApp(app);
}
});
test('@settings @persistence @electron persists the EPG view mode across app restart', async ({
dataDir,
}) => {
+20
View File
@@ -48,6 +48,26 @@ test.describe('Settings', () => {
);
});
test('@settings @web Enable shared web player controls', async ({
page,
}) => {
await openSettings(page);
const setting = page.locator(
'[data-test-id="web-player-shared-controls-setting"]'
);
const checkbox = setting.locator('input[type="checkbox"]');
await expect(setting).toBeVisible();
await expect(checkbox).not.toBeChecked();
await checkbox.check();
await saveSettings(page);
await page.reload();
await openSettings(page);
await expect(checkbox).toBeChecked();
});
test('@settings @web Change app theme', async ({ page }) => {
await openSettings(page);
// v0.22 compact theme picker exposes the segmented control as a