Skip to content

Test error: Modal being returned by getByLabelText queries when it shouldn't #11011

@wise-king-sullyman

Description

@wise-king-sullyman

Please describe the issue
In Koku we're seeing Modal being returned by getByLabelText queries when it isn't labelled with the query term and wasn't returned with the old label. Specifically it appears that when a modal has an aria-label it's setting the aria-labelledby automatically in a way that is self referential and causes it to turn up in queries that it shouldn't.

Are there visuals for this issue? Please provide screenshots
Include screenshots or links to Marvel or other mockups.
image

Could you point to a branch or draft PR where this issue exists? Please provide a link to the code

One example query: https://github.com/dlabrecq/koku-ui/blob/3be30d4579ecd3d9fff9693b42e03f990d906df4/src/routes/settings/costModels/costModel/updateRateModel.test.tsx#L332

Any other information?

Discovered while working on #10926. CC @dlabrecq for awareness.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions