Skip to content

Commit 8ec7782

Browse files
committed
test: update cucumber test for nuxt v4 welcome screen template
1 parent fb0dea2 commit 8ec7782

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/app-cucumber/test/acceptance/features/playwright/step-definitions/playwright.given-steps.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ import assert from 'node:assert'
22
import { Given } from '@cucumber/cucumber'
33
import { $fetch, createPage } from '@nuxt/test-utils/e2e'
44

5-
Given(/^the user goes on the home page$/u, async function (): Promise<void> {
5+
Given(/^the user goes on the home page$/u, { timeout: 10000 }, async function (): Promise<void> {
66
// Browser test
77
const page = await createPage('/')
8-
const text = await page.getByRole('heading', { name: 'Welcome to Nuxt!' }).textContent()
9-
assert.match(text!, /Welcome to Nuxt!/)
8+
// nuxt v3 or nuxt v4 welcome page text
9+
const text = await page.getByRole('heading', { name: /Welcome to Nuxt!|Get started/ }).textContent()
10+
assert.match(text!, /Welcome to Nuxt!|Get started/)
1011
await page.close()
1112

1213
// SSR test

0 commit comments

Comments
 (0)