frontend.e2e.spec.ts 531 B

1234567891011121314151617181920
  1. import { test, expect, Page } from '@playwright/test'
  2. test.describe('Frontend', () => {
  3. let page: Page
  4. test.beforeAll(async ({ browser }, testInfo) => {
  5. const context = await browser.newContext()
  6. page = await context.newPage()
  7. })
  8. test('can go on homepage', async ({ page }) => {
  9. await page.goto('http://localhost:3000')
  10. await expect(page).toHaveTitle(/Payload Blank Template/)
  11. const heading = page.locator('h1').first()
  12. await expect(heading).toHaveText('Welcome to your new project.')
  13. })
  14. })