Commit Graph

16 Commits

Author SHA1 Message Date
Tim Neutkens e860cec656 test: migrate webdriver callers to next.browser (#93941)
### What?

Migrate remaining direct `next-webdriver` test callers that have a
`NextInstance` to `next.browser()`, and expose the shared `Playwright`
browser type from `e2e-utils`.

### Why?

`NextInstance.browser` should be the supported browser-opening interface
for test fixtures, with `next-webdriver` kept as the private
implementation detail.

### How?

Updated affected development, e2e, and production tests to call
`next.browser()` directly, passing `baseUrl` where tests intentionally
target a manually spawned or proxied server. Shared helpers now receive
browser callbacks from the test context, and browser types import
`Playwright` from `e2e-utils` instead of deriving from `next.browser` or
importing from private paths.

<!-- NEXT_JS_LLM_PR -->
2026-05-22 14:01:58 +02:00
Jiachi Liu dcd0a60065 [devtool] unify the bundler field (#86514) 2025-12-01 17:02:33 +01:00
Sebastian "Sebbie" Silbermann 0b58a32c45 [test] assert* -> waitFor* when the util is not instant (#85450) 2025-10-30 14:44:08 +01:00
Zack Tanner 7336e834f9 [cache components]: show cache components enabled in DevTools (#85048)
Similar to how in DevTools we show if Turbopack is enabled, this shows
that Cache Components is enabled. In the future, we might have a similar
CTA to suggest enabling the feature. For now it only shows if it's
actually enabled.
2025-10-18 22:00:25 -07:00
Jiachi Liu afec9909a0 [segment explorer] hide for pages router (#81813)
Hide the segment explorer menu item in pages router 

Closes NEXT-4635
2025-07-18 23:07:49 +02:00
Jiachi Liu 10fb5bc683 [devtool] enable segment explorer by default (#81737)
Enable `experimental.devtoolSegmentExplorer` on canary by default and update snapshots
2025-07-17 13:01:50 +02:00
Niklas Mischkulnig 7131d706ae Fix flakey devtools test (#81127)
A regression from #81085 @huozhi 


The problem is that `openDevToolsIndicatorPopover` doesn't tell anymore whether the popup menu is open, but if the panel is open, but the "Try Turbopack" text is in the popup menu (only in the old UI).
2025-07-01 18:01:18 +02:00
Sebastian "Sebbie" Silbermann 322adb9835 [devtools] Fix Turbopack indicator (#80753) 2025-06-22 10:13:42 +02:00
Janka Uryga 4282bc6f91 remove BrowserInterface (#78308)
rip. you served a purpose once, but now you're just getting in the way. this improves typesafety quite a bit, because `BrowserInterface` had a whole bunch of random `any`s everywhere

also
- removes `evalAsync`. no idea why that was needed, but we're happily using promises in normal eval, so it can be dropped
- adds more safety to `chain`
2025-04-18 11:16:15 -07:00
Zack Tanner 56fe93b144 [dev-overlay]: add preference panel (#76522)
Adds user preferences for:

- Toggling theme (localstorage)
- Position (localstorage)
- Hiding the overlay (existing dev session heuristic)



https://github.com/user-attachments/assets/0f08ce66-4107-4751-80d3-a42d3315966a


![CleanShot 2025-02-25 at 17 59
11@2x](https://github.com/user-attachments/assets/e65fdfb0-23b3-4c47-b8af-f55dd60e7b95)

![CleanShot 2025-02-25 at 17 59
15@2x](https://github.com/user-attachments/assets/86d33590-18f7-44f6-acd2-9639c098476a)
2025-02-25 19:26:47 -08:00
Jiwon Choi 1c9e8af8bb [dev-overlay] hide dev indicator for server session or 1 day (#76430)
### Why?

When users want to hide the dev indicator, they might be frustrated if
it reappears every reload. Hence, make a default to hide it for the
current server session or a day.

Closes NDX-890

---------

Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
2025-02-25 13:51:54 -08:00
Zack Tanner 025657cf90 [dev-overlay]: hiding devtools shouldn't hide errors (#76399)
Currently when you select "Hide Dev Tools", if an error comes in you
won't see the error indicator anymore.

This follows the same treatment as when the indicator is disabled in
next config, which is to only show you errors, and not the regular
indicator/popover.
2025-02-23 17:30:00 +00:00
Zack Tanner 1c85b755b5 [DevOverlay]: enable by default (#75882)
- `newDevOverlay: true` by default (enables experimental React builds on
canary until owner stacks progress further)
- `run-tests` now sets the env var for tests that were relying on it for
forking behavior
- PPR runners now run with the flag disabled to help catch regressions
in the old overlay until we remove it
- Fixed a number of tests that had outdated snapshots or missed forking
behavior because they weren't running in CI
- Disabled a test that was failing in Turbopack + Experimental React
that is unrelated to the overlay (see:
https://github.com/vercel/next.js/pull/75989)

---------

Co-authored-by: devjiwonchoi <devjiwonchoi@gmail.com>
2025-02-13 10:57:32 -08:00
Sebastian Silbermann ed4d772359 Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
Zack Tanner ee15b3be5d fix: error overlay hijacking application focus (safari) (#53693)
### What?
When Safari is in the background and HMR triggers a full page reload,
Safari hijacks application focus.

### Why?
Having a `role="dialog"` is correctly prompting Safari to autofocus the
first focusable element (the close button). However, Safari's behavior
seems to also bring the application to the foreground when a background
focus event occurs.

### How?
This only adds the role when the document is focused. 

#### Before

https://github.com/vercel/next.js/assets/1939140/9d2cce52-c6ee-4d49-9262-03620efad86c

#### After

https://github.com/vercel/next.js/assets/1939140/dc7d337c-b621-49e9-9a17-03b5d8b5c3f4

Confirmed voiceover behavior still appears to be correct
<img width="1371" alt="CleanShot 2023-08-07 at 12 14 34@2x"
src="https://github.com/vercel/next.js/assets/1939140/e53acfbc-cf6b-4d74-8b83-cf98edb2c2ab">

slack x-ref:
https://vercel.slack.com/archives/C03KAR5DCKC/p1691264077313599

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-08 21:45:03 +02:00
John Pham be5dedf676 Allowing hiding the ReactDevOverlay (#37417)
* Add hide button

* Update label

* Add data attributes for testing

* Add e2e tests

* update test

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-06-06 14:21:53 -04:00