Moved files

This commit is contained in:
Patrick Alvin Alcala 2025-08-26 18:01:16 +08:00
parent ff96ee6ace
commit b559b0b2e4
4 changed files with 7 additions and 0 deletions

27
tests/pages/index.spec.ts Normal file
View file

@ -0,0 +1,27 @@
import { test, expect } from '@playwright/test'
test('page loaded correctly', async ({ page }) => {
await page.goto('http://localhost:4321')
await expect(page).toHaveTitle('Home')
const descriptionMeta = await page.getAttribute('meta[name="name"]', 'content')
expect(descriptionMeta).toBe('Template')
const keywordsMeta = await page.getAttribute('meta[name="description"]', 'content')
expect(keywordsMeta).toBe('This is just a template.')
})
test('background loaded correctly', async ({ page }) => {
await page.goto('http://localhost:4321')
const headerTitle = await page.textContent('h1')
expect(headerTitle).toBe('Fast WebApp Template')
})
test('header title is visible and contains correct text', async ({ page }) => {
await page.goto('http://localhost:4321')
const headerTitle = await page.textContent('h1')
expect(headerTitle).toBe('Main Page')
})

0
tests/pages/next.spec.ts Normal file
View file