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-selector
s to data-testid
s 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:
-
https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/7984
-
⚠ Important:⚠ The above MR should be merged after this MR
-
How to set up and validate locally
Below is one example of how you can adjust the tests to validate locally.
- 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
- In your GDK, go to the Admin > Subscriptions page, and take note of the license information
- In
qa/qa/support/data/license.rb
, update thelicense_user
,license_company
,license_user_count
andlicense_plan
values to match your GDK license - In
qa/qa/specs/features/ee/browser_ui/11_fulfillment/license/license_spec.rb
, you may need to also replaceLICENSE_TYPE[:offline_cloud]
inexpect(subscription).to have_subscription_record(plan, user_count, LICENSE_TYPE[:offline_cloud])
to match your license type - 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.
-
I have evaluated the MR acceptance checklist for this MR.
Follow-up After Merging
-
Announce in #quality
and#s_fulfillment_engineering
that CustomersDot E2E tests may fail in Staging until https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/7984 is merged
Edited by Valerie Burton