Files
qwerty-learner/tests/e2e/main.spec.ts
rubickecho b47fd0a8c2 test: Add e2e tests with playwright for website (#736)
* docs: update README, add deploy to vercel

* docs: update README

* feat: add e2e tests

* feat: add main feature e2e tests with playwright

* fix: ci env value and update gitignore

* fix: ci job conditions for execution

* chore: merge from main

---------

Co-authored-by: KaiyiWing <Zhang.kaiyi42@gmail.com>
2024-02-17 16:04:59 +08:00

16 lines
500 B
TypeScript

import { test, expect } from '@playwright/test'
test.describe('Main page', () => {
test('has title', async ({ page }) => {
await page.goto('/')
await expect(await page.locator('h1').getByText('Qwerty Learner').isVisible()).toBeTruthy()
})
// you should run 'yarn update:snapshots' before this test, create base snapshots for visual comparison
// test('visual comparison', async ({ page }) => {
// await page.goto('/');
// await expect(page).toHaveScreenshot();
// });
})