Skip to content

Commit

Permalink
test: use locator assertion for body text
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Mar 16, 2024
1 parent 9b5bffb commit 3d77e26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/basic.test.ts
Expand Up @@ -411,6 +411,7 @@ describe('pages', () => {

it('/wrapper-expose/page', async () => {
const { page, pageErrors, consoleLogs } = await renderPage('/wrapper-expose/page')
await page.waitForLoadState('networkidle')
await page.locator('#log-foo').click()
expect(consoleLogs.at(-1)?.text).toBe('bar')
// change page
Expand Down Expand Up @@ -2497,9 +2498,8 @@ describe('teleports', () => {
describe('Node.js compatibility for client-side', () => {
it('should work', async () => {
const { page } = await renderPage('/node-compat')
const html = await page.innerHTML('body')
expect(html).toContain('Nuxt is Awesome!')
expect(html).toContain('CWD: [available]')
await page.locator('body').getByText('Nuxt is Awesome!').waitFor()
expect(await page.innerHTML('body')).toContain('CWD: [available]')
await page.close()
})
})
Expand Down

0 comments on commit 3d77e26

Please sign in to comment.