E2E: Migrate Slack Pages and Tests from Chemlab
What does this MR do and why?
As part of Migrate Chemlab E2E Tests in the GitLab Project Back to The GitLab E2E Framework, this MR:
- Migrates the following page classes from Chemlab to the GitLab E2E test framework:
-
Slack::Page::Chat
->QA::Vendor::Slack::Page::Chat
-
Slack::Page::Login
->QA::Vendor::Slack::Page::Login
-
Slack::Page::OAuth
->QA::Vendor::Slack::Page::OAuth
Page::Profile::ChatNames::New
Page::Project::Settings::Services::Slack
-
- Adds new
data-testid
sauthorize-button
andinstall-slack-app-button
for non-vendor pages - Migrates the
Slack::Mixins::GitlabApp
Mixin from Chemlab toQA::Vendor::Slack::Mixins::GitlabApp
in the GitLab E2E test framework - Creates a new
QA::Vendor::Slack::Address
module to store the Slack base URL - Updates
QA::Flow::Integrations::Slack
to use the new page classes - Updates the spec
browser_ui/1_manage/integrations/slash_commands_spec.rb
to use the updated code - Removes the following Chemlab related files:
qa/lib/slack/mixins/browser.rb
qa/lib/slack.rb
Closes the following issues:
- gitlab-org/quality/quality-engineering/team-tasks#2626 (closed)
- gitlab-org/quality/quality-engineering/team-tasks#2627 (closed)
- gitlab-org/quality/quality-engineering/team-tasks#2628 (closed)
- gitlab-org/quality/quality-engineering/team-tasks#2629 (closed)
- gitlab-org/quality/quality-engineering/team-tasks#2630 (closed)
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.
How to set up and validate locally
Please note: This test was originally configured to only run against Staging Ref
If you would like to run this test against Staging Ref, please follow the instructions below:
- Log out of Slack on your local machine.
- Export the following ENV variables to your terminal.
- The 1Password values for
GITLAB_PASSWORD
andGITLAB_QA_ACCESS_TOKEN
can be found in theStaging Ref credentials
entry in the Engineering vault. The remaining 1Password values can be found in theE2E Slack Test Credentials
entry in the Gitlab-QA vault.
- The 1Password values for
GITLAB_USERNAME=gitlab-qa
GITLAB_PASSWORD=<1Password>
WEBDRIVER_HEADLESS=false
QA_GITLAB_URL=https://staging-ref.gitlab.com
QA_SLACK_EMAIL=<1Password>
QA_SLACK_PASSWORD=<1Password>
QA_SLACK_WORKSPACE=<1Password>
GITLAB_QA_ACCESS_TOKEN=<1Password>
- Replace the following methods that interact with the new
data-testid
s added in this MR, since they do not exist on Staging Ref yet:- In
QA::Page::Project::Settings::Services::Slack
, replaceclick_element('install-slack-app-button')
withfind('a', text: /install GitLab for Slack app/i).click
- In
QA::Page::Profile::ChatNames::New
, replaceclick_element('authorize-button')
withfind('button', text: /Authorize/i).click
.
- In
- cd to
qa
directory and run the following command:
bundle exec rspec qa/specs/features/browser_ui/1_manage/integrations/slash_commands_spec.rb
Edited by Valerie Burton