[QA] Add extensible selection mechanism to more common actions

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

The next iteration for data-qa-* selectors should allow for more common actions.

Currently only Page::Base#has_element? and Page::Base#has_no_element has support.

It'd be nice for our tests to be able to execute these actions given the following example:

  • click_element
  • check_element
  • uncheck_element
  • fill_element

View

- [:OK, :Cancel].each do |a|
  = button_tag a, data: { qa_selector: 'action_button', qa_button_title: a }

Actions

it 'clicks the button' do
  click_element :action_button, button_title: 'OK'
end

Intended users

Proposal

This will require a rewrite of how we invoke find on our elements, in addition to the method signatures.

Permissions and Security

Documentation

  • Documentation added

What does success look like, and how can we measure that?

When our tests can refer to common actions such as clicking, getting an attribute of an element, setting a text field, checking a checkbox using the extensible qa selector mechanism.

Links / references

Edited by 🤖 GitLab Bot 🤖