webapp/tests/basic-routes.spec.ts
Untone 57d78f4c44
Some checks failed
deploy / Linting (push) Successful in 1m3s
deploy / Playwright (push) Failing after 2m45s
deploy / Update templates on Mailgun (push) Has been skipped
deploy / Github (push) Failing after 1s
e2e
2024-02-04 15:26:47 +03:00

31 lines
1.1 KiB
TypeScript

import { expect, test } from '@playwright/test'
const pagesTitles = {
'http://localhost:3000/': 'Дискурс',
'http://localhost:3000/feed': 'Дискурс: лента',
'http://localhost:3000/create': 'Дискурс',
'http://localhost:3000/about/donate': 'Дискурс: поддержка',
'http://localhost:3000/authors': 'Дискурс: авторы',
'http://localhost:3000/topics': 'Дискурс: темы',
'http://localhost:3000/inbox': 'Дискурс',
}
test('has title', async ({ page }) => {
await page.goto('http://localhost:3000/')
// Expect a title "to contain" a substring.
await expect(page).toHaveTitle(/Дискурс/)
})
test('check some links', async ({ page }) => {
await page.goto('http://localhost:3000/feed')
await expect(page).toHaveTitle(/Дискурс/)
// Click the get started link.
// await page.getByRole('link', { name: 'Get started' }).click();
// Expects page to have a heading with the name of Installation.
//await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
})