Did some things, made more improvements.
Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
35
frontend/tests/e2e/app.spec.ts
Normal file
35
frontend/tests/e2e/app.spec.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* End-to-end tests using Playwright
|
||||
*/
|
||||
|
||||
import { test, expect } from '@playwright/test'
|
||||
|
||||
test.describe('Plex Playlist App', () => {
|
||||
test('should display app title', async ({ page }) => {
|
||||
await page.goto('/')
|
||||
|
||||
await expect(page.locator('h1')).toContainText('Plex Playlist')
|
||||
})
|
||||
|
||||
test('should have welcome message', async ({ page }) => {
|
||||
await page.goto('/')
|
||||
|
||||
await expect(page.locator('p')).toContainText('Welcome to the Plex Playlist Manager')
|
||||
})
|
||||
|
||||
test('should load without errors', async ({ page }) => {
|
||||
const errors: string[] = []
|
||||
page.on('console', (msg) => {
|
||||
if (msg.type() === 'error') {
|
||||
errors.push(msg.text())
|
||||
}
|
||||
})
|
||||
|
||||
await page.goto('/')
|
||||
|
||||
// Wait for app to fully load
|
||||
await page.waitForLoadState('networkidle')
|
||||
|
||||
expect(errors).toHaveLength(0)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user