Skip to content

← All questions

Healing picked the wrong one of three matching elements and the test still passed

Asked 2,380 views0 answers

Product grid, several cards, each with an "Add" button. The context on our add-to-basket locator is:

ts
{ role: 'button', name: 'Add', text: 'Add', description: 'add to basket' }

The primary broke after a class rename. The healer found three matching buttons, scored the candidate above minScore anyway, took the first one and added the wrong product. The scenario passed, because the assertion afterwards only checks the basket count.

The event records count: 3, so the healer knew. I understand that uniqueness lowers the score rather than disqualifying the candidate, and that it resolves to the first match. What I would like to know is whether there is a supported way to say "refuse to heal when more than one thing matches", short of raising minScore far enough that non-unique candidates fall below it — which also takes out plenty of heals I do want.

asked by Devon Marsh183 ·

No answers yet

Nobody has answered this one. If you have hit the same thing and worked it out, that is worth writing down.

Ask a related question

Have the same question?

Ask it with the command you ran and the output you got, and it will be answered here.

Ask a question

Related