mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-10 18:36:15 -08:00
fix(pwa): restore xtream rail and vod navigation
This commit is contained in:
1 parent
89df1ada0a
commit
6829c667bd
7 files changed
+335
-38
No files matched your search
@@ -133,11 +133,37 @@ test('@self-hosted Xtream portal loads through web-backend proxy', async ({
|
||||
page,
|
||||
}) => {
|
||||
const xtreamRequests = collectBackendRequests(page, '/xtream');
|
||||
const consoleErrors: string[] = [];
|
||||
page.on('console', (message) => {
|
||||
if (message.type() === 'error') {
|
||||
consoleErrors.push(message.text());
|
||||
}
|
||||
});
|
||||
|
||||
await addXtreamPortal(page);
|
||||
|
||||
const rail = page.locator('app-workspace-shell-rail');
|
||||
await expect(rail.locator('a[aria-label="Movies"]')).toBeVisible();
|
||||
await expect(rail.locator('a[aria-label="Live TV"]')).toBeVisible();
|
||||
await expect(rail.locator('a[aria-label="Series"]')).toBeVisible();
|
||||
await expect(rail.locator('a[aria-label="Recently added"]')).toBeVisible();
|
||||
await expect(rail.locator('a[aria-label="Advanced search"]')).toBeVisible();
|
||||
|
||||
const categoryItems = page.locator('.category-item');
|
||||
await expect(categoryItems.first()).toBeVisible({ timeout: 15_000 });
|
||||
const vodItem = page.locator('app-grid-list mat-card').first();
|
||||
await expect(vodItem).toBeVisible({ timeout: 30_000 });
|
||||
await vodItem.click();
|
||||
await expect(page).toHaveURL(/\/workspace\/xtreams\/[^/]+\/vod\/\d+\/\d+/);
|
||||
await expect(
|
||||
page.getByRole('button', { name: 'Play', exact: true })
|
||||
).toBeVisible({ timeout: 15_000 });
|
||||
|
||||
expect(
|
||||
consoleErrors.filter((message) =>
|
||||
/db(SetAppState|GetContentByXtreamId)/.test(message)
|
||||
)
|
||||
).toEqual([]);
|
||||
expectRequestsUseTargetId(xtreamRequests, '/xtream');
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user