Skip to content

E2E: Migrate Fulfillment GitLab Admin Pages to data-testid

What does this MR do and why?

Relates to gitlab-org/quality/quality-engineering/team-tasks#1931 (closed) and gitlab-org/quality/quality-engineering/team-tasks#1735

In order to better unify our E2E testing framework with lower level tests, this MR migrates the data-qa-selectors to data-testids in the Gitlab::Page::Admin::Subscription, QA::EE::Page::Admin::Subscription and Gitlab::Page::Admin::Dashboard pages. This also includes cleanup of selectors no longer in use by our E2E tests.

Corresponding CustomersDot MR:

How to set up and validate locally

Below is one example of how you can adjust the tests to validate locally.

  1. Find an E2E test that uses one of the pages mentioned above, such as qa/qa/specs/features/ee/browser_ui/11_fulfillment/license/license_spec.rb
  2. In your GDK, go to the Admin > Subscriptions page, and take note of the license information
  3. In qa/qa/support/data/license.rb, update the license_user, license_company, license_user_count and license_plan values to match your GDK license
  4. In qa/qa/specs/features/ee/browser_ui/11_fulfillment/license/license_spec.rb, you may need to also replace LICENSE_TYPE[:offline_cloud] in expect(subscription).to have_subscription_record(plan, user_count, LICENSE_TYPE[:offline_cloud]) to match your license type
  5. Run the following command in the qa directory to run the test
GITLAB_QA_ADMIN_ACCESS_TOKEN=<gdk root user PAT> GITLAB_INITIAL_ROOT_PASSWORD=<gdk root user password> QA_GITLAB_URL=<gdk url and port> WEBDRIVER_HEADLESS=false bundle exec rspec qa/specs/features/ee/browser_ui/11_fulfillment/license/license_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.

Follow-up After Merging

Edited by Valerie Burton

Merge request reports