27 lines
895 B
TypeScript
27 lines
895 B
TypeScript
import { test, expect } from '@playwright/test'
|
|
|
|
test('page loaded correctly', async ({ page }) => {
|
|
await page.goto('http://localhost:4321')
|
|
|
|
await expect(page).toHaveTitle('FWT')
|
|
|
|
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('Fast WebApp Template')
|
|
})
|