Skip to content

test: [M3-8471] - Allow Cypress region selection to work with Gecko options improvements#10888

Merged
jdamore-linode merged 2 commits intolinode:developfrom
jdamore-linode:M3-8471-cypress-region-selection-gecko-improvements
Sep 5, 2024
Merged

test: [M3-8471] - Allow Cypress region selection to work with Gecko options improvements#10888
jdamore-linode merged 2 commits intolinode:developfrom
jdamore-linode:M3-8471-cypress-region-selection-gecko-improvements

Conversation

@jdamore-linode
Copy link
Contributor

@jdamore-linode jdamore-linode commented Sep 4, 2024

Description 📝

This updates the ui.regionSelect.findItemById() and ui.regionSelect.findItemByLabel() helpers so that they work when the upcoming Gecko changes are enabled and disabled. Previously, these helpers would fail to select a region when Gecko is enabled due to the layout improvements made to the region selection options.

Changes 🔄

  • Use RegEx to let ui.regionSelect.findItemById() and ui.regionSelect.findItemByLabel() work with and without Gecko

Target release date 🗓️

N/A

How to test 🧪

Prerequisites:

Use a test account with Gecko enabled and set MANAGER_OAUTH in .env to a PAT belonging to the account, and run Cloud against a LaunchDarkly environment where the Gecko feature flag is enabled.

Reproduction steps

On develop:

  • Build & serve Cloud via yarn && yarn build && yarn start:manager:ci
  • Run yarn cy:debug
  • Search for the gdpr-agreement.spec.ts spec and run it
  • Observe that it fails when attempting to select a region

Verification steps

On this branch:

  • Build & serve Cloud via yarn && yarn build && yarn start:manager:ci
  • Run yarn cy:debug
  • Search for the gdpr-agreement.spec.ts spec and run it
  • Confirm that test passes
  • (Optional) Repeat steps with Gecko disabled, confirm tests still pass
    • ℹ️ Our CI will fail if there are any issues when Gecko is not enabled

As an Author I have considered 🤔

Check all that apply

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

@jdamore-linode jdamore-linode self-assigned this Sep 4, 2024
@jdamore-linode jdamore-linode requested a review from a team as a code owner September 4, 2024 20:45
@jdamore-linode jdamore-linode requested review from AzureLatte and removed request for a team September 4, 2024 20:45
@jdamore-linode jdamore-linode requested a review from a team as a code owner September 4, 2024 20:47
@jdamore-linode jdamore-linode requested review from coliu-akamai and jaalah-akamai and removed request for a team September 4, 2024 20:47
@github-actions
Copy link

github-actions bot commented Sep 4, 2024

Coverage Report:
Base Coverage: 86.2%
Current Coverage: 86.2%

@jaalah-akamai
Copy link
Contributor

I couldn't get this to fail. I tried running this against develop following testing instructions and it passed every time 🤔
Screenshot 2024-09-05 at 11 54 51 AM

@jaalah-akamai
Copy link
Contributor

jaalah-akamai commented Sep 5, 2024

I got it to fail on develop by manually adding

mockAppendFeatureFlags({
   gecko2: false,
});

Copy link
Contributor

@jaalah-akamai jaalah-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Passes regardless if gecko flag is on or off

@jaalah-akamai jaalah-akamai added the Add'tl Approval Needed Waiting on another approval! label Sep 5, 2024
@jdamore-linode
Copy link
Contributor Author

Ah sorry @jaalah-akamai, forgot to mention the feature flag! I had just manually edited the components to force them into their Gecko state while I was developing this because I can't add the account tag to my test account (for non-technical reasons)

@hana-akamai hana-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! Ready for Review labels Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Multiple approvals and ready to merge!

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants