Skip to content

Update within_testid and find_by_testid helper to include context

What does this MR do and why?

Update dom_helpers to allow passing in a context to allow something like:

my_scope = page.find("selector")
within(my_scope) do
    find_by_testid('my_button').click
end

To something like this:

my_scope = page.find("selector")
find_by_testid('my_button', context: my_scope).click

This is the original intent of #433496 (closed). This MR also marks violations related to be_axe_clean as todo, since we have to explore other ways to fix them.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #433496 (closed)

Edited by Roy Liu

Merge request reports