Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Playwright e2e sample test fails #39194

Closed
CyrusVorwald2 opened this issue Jul 31, 2022 · 1 comment · Fixed by #39195
Closed

Docs: Playwright e2e sample test fails #39194

CyrusVorwald2 opened this issue Jul 31, 2022 · 1 comment · Fixed by #39195
Labels
Documentation Related to Next.js' official documentation.

Comments

@CyrusVorwald2
Copy link

What is the improvement or update you wish to see?

Playwright e2e docs fail to pass the sample test. This test should pass.

Is there any context that might help us understand?

The test fails because of the following code:

In pages/index.js, the text says "About"

<Link href="/about">
        <a>About</a>
</Link>

But the test in e2e/example.spec.ts is looking for an element with the text "About Page"

// Find an element with the text 'About Page' and click on it
  await page.click('text=About Page')

The solution would be to either have the text in pages/index.js say "About Page" or the test in e2e/example.spec.ts check for 'text=About'

Does the docs page already exist? Please link to it.

https://nextjs.org/docs/testing#creating-your-first-playwright-end-to-end-test

@CyrusVorwald2 CyrusVorwald2 added the Documentation Related to Next.js' official documentation. label Jul 31, 2022
santidalmasso added a commit to santidalmasso/next.js that referenced this issue Jul 31, 2022
Change `e2e/example.spec.ts` to fix the failed test.
@kodiakhq kodiakhq bot closed this as completed in #39195 Jul 31, 2022
kodiakhq bot pushed a commit that referenced this issue Jul 31, 2022
Update `e2e/example.spec.ts` ([/docs/testing](https://nextjs.org/docs/testing#creating-your-first-playwright-end-to-end-test) page) to fix the failed test. Fixes: #39194
## Bug

- [ ] Related issues linked using fixes #number
- [ ]  Integration tests added
- [ ]  Errors have helpful link attached, see contributing.md

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ]  Related issues linked using fixes #number
- [ ]  Integration tests added
- [X]  Documentation added
- [ ]  Telemetry added. In case of a feature if it's used or not.
- [ ]  Errors have helpful link attached, see contributing.md

## Documentation / Examples

- [ ] Make sure the linting passes by running pnpm lint
- [ ]  The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md?rgh-link-date=2022-07-13T09%3A09%3A13Z#adding-examples)
@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation Related to Next.js' official documentation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant