Skip to content

Refactor: Every stacked toast renders with the same data-testid="error-tooltip" and testId="error-tooltip-close". With multiple warnings visible (which is the entire point of this refactor), getByTestId queries become ambiguous and existing e2e/unit tests that target these IDs will break or match a single one non-deterministically. #10157

Description

@AlexeyGirin

Every stacked toast renders with the same data-testid="error-tooltip" and testId="error-tooltip-close". With multiple warnings visible (which is the entire point of this refactor), getByTestId queries become ambiguous and existing e2e/unit tests that target these IDs will break or match a single one non-deterministically.

Suggest suffixing per toast (e.g. error-tooltip-${index} or a slug of the message) and keeping a single stable id (e.g. error-tooltip-list) on the container.

Originally posted by @claude[bot] in #10140 (comment)

Metadata

Metadata

Assignees

Labels

refactorCode refactoring, without changing the functionality

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions