fix: note about missing elements should not show in verbose mode (#1950)

Closes https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/1947
This commit is contained in:
Alex Rudenko
2026-04-24 09:29:05 +02:00
committed by GitHub
parent 136da6a350
commit 80bee1e6cd
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ export class SnapshotFormatter {
// Top-level content of the snapshot.
if (
this.#snapshot.verbose &&
!this.#snapshot.verbose &&
this.#snapshot.hasSelectedElement &&
!this.#snapshot.selectedElementUid
) {
@@ -1,7 +1,4 @@
exports[`snapshotFormatter > does not include a note if the snapshot is already verbose 1`] = `
Note: there is a selected element in the DevTools Elements panel but it is not included into the current a11y tree snapshot.
Get a verbose snapshot to include all elements if you are interested in the selected element.
uid=1_1 checkbox "checkbox" checked
uid=1_2 statictext "text"
@@ -14,6 +11,9 @@ uid=1_1 checkbox "checkbox" checked [selected in the DevTools Elements panel]
`;
exports[`snapshotFormatter > formats with DevTools data not included into a snapshot 1`] = `
Note: there is a selected element in the DevTools Elements panel but it is not included into the current a11y tree snapshot.
Get a verbose snapshot to include all elements if you are interested in the selected element.
uid=1_1 checkbox "checkbox" checked
uid=1_2 statictext "text"