Skip to content

Add support for using data-testid attribute in e2e test framework

Will Meek requested to merge qa_e2e_support_testid into master

What does this MR do and why?

Describe in detail what your merge request does and why.

As per gitlab-org/quality/quality-engineering/team-tasks#1735 / gitlab-org/quality/quality-engineering/team-tasks#1739 (closed)

Allow QA E2E specs to use data-testid

This will allow for consistency with frontend test attributes

This is one of the steps toward simplifying writing E2E specs for non-Quality team members, and also simplifying the use of existing frontend test attributes for Quality members writing E2E specs.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

n/a

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

I updated 13_secure/enable_scanning_from_configuration_spec to use data-testid, both existing and renaming from data-qa-selector:

CHROME_HEADLESS=false bundle exec bin/qa Test::Instance::All http://gdk.test:3000/ ./qa/specs/features/ee/browser_ui/13_secure/enable_scanning_from_configuration_spec.rb

Also check that existing specs that use data-qa-selector and extended qa attributes function:

qa % CHROME_HEADLESS=false bundle exec bin/qa Test::Instance::All http://gdk.test:3000/ ./qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Will Meek

Merge request reports

Loading