Spaces:
Paused
Paused
Download web/e2e/docs.spec.ts from stremio-db/a: direct link, hf CLI and curl.
- Browser
- Download file 662 Bytes
-
https://huggingface.co/spaces/stremio-db/a/resolve/main/web/e2e/docs.spec.ts
- Command line
-
hf download hf://spaces/stremio-db/a/web/e2e/docs.spec.ts
-
curl -L -o docs.spec.ts https://huggingface.co/spaces/stremio-db/a/resolve/main/web/e2e/docs.spec.ts
662 Bytes
| import { test, expect } from '@playwright/test' | |
| test.describe('docs page', () => { | |
| test.beforeEach(async ({ request }) => { | |
| await request.post('/api/auth/setup', { | |
| data: { username: 'admin', password: 'testpassword123' }, | |
| }) | |
| }) | |
| test('loads docs page', async ({ page }) => { | |
| await page.goto('/docs') | |
| await expect(page.locator('text=API Reference')).toBeVisible() | |
| }) | |
| test('back link navigates home', async ({ page }) => { | |
| await page.goto('/docs') | |
| const backLink = page.locator('a:has-text("OpenPosterDB")') | |
| await expect(backLink).toBeVisible() | |
| await backLink.click() | |
| await expect(page).toHaveURL('/') | |
| }) | |
| }) | |