mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-13 04:26:16 -08:00
test(e2e): add PWA source details coverage
Add PWA web-e2e source details coverage and shared web-e2e helpers.
This commit is contained in:
1 parent
dfdb5bb8ad
commit
bc7d0fd1b0
5 files changed
+467
-34
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import type { Locator, Page } from '@playwright/test';
|
||||
import type { Page } from '@playwright/test';
|
||||
import { setInputValue } from './e2e-helpers';
|
||||
import { expect, test } from './fixtures';
|
||||
|
||||
const WEB_BACKEND_URL = 'http://localhost:3333';
|
||||
@@ -18,21 +19,6 @@ async function installRuntimeConfig(page: Page): Promise<void> {
|
||||
});
|
||||
}
|
||||
|
||||
async function setInputValue(input: Locator, value: string): Promise<void> {
|
||||
await input.fill('');
|
||||
await input.fill(value);
|
||||
|
||||
if ((await input.inputValue()) === value) {
|
||||
return;
|
||||
}
|
||||
|
||||
await input.click();
|
||||
await input.press('ControlOrMeta+A');
|
||||
await input.press('Backspace');
|
||||
await input.type(value);
|
||||
await expect(input).toHaveValue(value);
|
||||
}
|
||||
|
||||
async function addXtreamPortal(page: Page): Promise<void> {
|
||||
await page.getByRole('button', { name: 'Add playlist' }).click();
|
||||
const dialog = page.locator('mat-dialog-container');
|
||||
|
||||
Reference in new issue
Block a user