Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/formatters/SnapshotFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
) {
Expand Down
6 changes: 3 additions & 3 deletions tests/formatters/snapshotFormatter.test.js.snapshot
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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"

Expand Down
Loading