/
githubmirror
/
tldraw
Обзор
Документация
Войти
/
githubmirror
/
tldraw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
apps/dotcom/client/e2e/fixtures/ErrorPages.ts
30 строк
858 B
Mitja Bezenšek
Sharing tests (#4824)
30 окт 2024, 17:30
Не верифицирован
30 окт 2024, 17:30
cae63a3
Код
Авторство
О чём код?
import { Locator, Page } from '@playwright/test' import { expect } from '../fixtures/tla-test' export class ErrorPage { public readonly notFound: Locator public readonly pageNotFound: Locator public readonly privateFile: Locator constructor(public readonly page: Page) { this.notFound = this.page.getByRole('heading', { name: 'Not found' }) this.pageNotFound = this.page.getByRole('heading', { name: 'Page not found' }) this.privateFile = this.page.getByRole('heading', { name: 'Private file' }) } async expectNotFoundVisible() { await expect(this.notFound).toBeVisible() } async expectNotFoundNotVisible() { await expect(this.notFound).not.toBeVisible() } async expectPageNotFoundVisible() { await expect(this.pageNotFound).toBeVisible() } async expectPrivateFileVisible() { await expect(this.privateFile).toBeVisible() } }