### What?
Increase the `waitForElementByCss('#page-2', ...)` timeout in the `app
dir - basepath › should successfully hard navigate from pages -> app`
test from the default 10 s to 30 s.
### Why?
[Datadog test
runs](https://app.datadoghq.com/ci/test/runs?query=test_level%3Atest%20%40test.source.file%3Atest%2Fe2e%2Fapp-dir%2Fapp-basepath%2Findex.test.ts%20%40test.name%3A%22app%20dir%20-%20basepath%20should%20successfully%20hard%20navigate%20from%20pages%20-%3E%20app%22&agg_m=count&agg_m_source=base&agg_t=count&cols=%40test.status%2Ctimestamp%2C%40duration%2C%40test.type%2C%40test.is_known_flaky%2C%40test.name¤tTab=overview&eventStack=&fromUser=false&index=citest&start=1773951667400&end=1774556467400&paused=false)
The test navigates from a Pages Router page (`/base/pages-path`) to an
App Router page (`/base/another`) via a hard (non-client-side)
navigation. In dev mode, the destination App Router page is compiled on
demand the first time it is visited. That compilation can take longer
than the default 10 s `waitForElementByCss` timeout, causing the test to
fail spuriously with:
```
page.waitForSelector: Timeout 10000ms exceeded
```
### How?
Pass `30000` (30 s) as the second argument to `waitForElementByCss`.
This matches the pattern used elsewhere in the test suite for dev-mode
tests that are subject to on-demand compilation latency. No runtime code
changes are needed — this is purely a test-side fix.
Co-authored-by: Tobias Koppers <[email protected]>
Co-authored-by: Claude <[email protected]>
Getting Started
Used by some of the world's largest companies, Next.js enables you to create full-stack web applications by extending the latest React features, and integrating powerful Rust-based JavaScript tooling for the fastest builds.
- Visit our Learn Next.js course to get started with Next.js.
- Visit the Next.js Showcase to see more sites built with Next.js.
Documentation
Visit https://nextjs.org/docs to view the full documentation.
Community
The Next.js community can be found on GitHub Discussions where you can ask questions, voice ideas, and share your projects with other people.
To chat with other community members you can join the Next.js Discord server.
Do note that our Code of Conduct applies to all Next.js community channels. Users are highly encouraged to read and adhere to it to avoid repercussions.
Contributing
Contributions to Next.js are welcome and highly appreciated. However, before you jump right into it, we would like you to review our Contribution Guidelines to make sure you have a smooth experience contributing to Next.js.
Good First Issues:
We have a list of good first issues that contain bugs that have a relatively limited scope. This is a great place for newcomers and beginners alike to get started, gain experience, and get familiar with our contribution process.
Security
If you believe you have found a security vulnerability in Next.js, we encourage you to responsibly disclose this and NOT open a public issue.
To participate in our Open Source Software Bug Bounty program, please email [email protected]. We will add you to the program and provide further instructions for submitting your report.