test(e2e): add end-to-end tests for playlist import, providers, and settings persistence

- Implemented tests for importing M3U playlists via native dialog.
- Added smoke tests for loading Xtream and Stalker content through IPC.
- Created tests to verify persistence of remote control settings across app restarts.
- Updated smoke tests to check for main window properties and workspace content rendering.

refactor(electron-backend): enhance store service and database path handling

- Modified store service to use a dynamic configuration directory based on environment.
- Refactored database connection to utilize new path utility functions for better path management.

fix(e2e): improve test selectors and structure for better reliability

- Updated test selectors in web-e2e tests to use role-based queries for better accessibility.
- Refactored settings tests to reduce redundancy and improve clarity.

chore(e2e): update TypeScript configuration for better inclusion of test files

- Adjusted tsconfig.json to ensure proper inclusion of e2e test files.

Entire-Checkpoint: bb9a8e2e351e
This commit is contained in:
4gray committed 2026-03-17 23:30:16 +01:00
1 parent 0c451b0dd7
commit 81c2aab829
23 files changed
+955 -443

No files matched your search

+11 -4
View File
@@ -1,4 +1,7 @@
import { expect, test } from '@playwright/test';
import { join } from 'path';
const fixturePath = join(__dirname, 'fixtures/test.m3u');
test('basic test', async ({ page }) => {
await page.goto('/');
@@ -7,8 +10,12 @@ test('basic test', async ({ page }) => {
expect(await page.title()).toBe('IPTVnator');
// Upload playlist test
await page.getByTestId('add-playlist').click();
await page.click('"Add via file upload"');
await page.setInputFiles('input[type="file"]', './e2e/fixtures/test.m3u');
await expect(page.getByTestId('channel-item')).toHaveCount(4);
await page.getByRole('button', { name: 'Add playlist' }).click();
await page.getByRole('menuitem', { name: 'Add via file upload' }).click();
await page.setInputFiles('input[type="file"]', fixturePath);
await page.waitForURL(/\/workspace\/playlists\/.+\/all$/);
await expect(page.getByText('test.m3u')).toBeVisible();
await expect(page.getByText('4 channels')).toBeVisible();
await expect(page.getByText('1. Channel 1')).toBeVisible();
await expect(page.getByText('4. HappyKids TV')).toBeVisible();
});