Skip to content

fix(protocol-designer) refactor cypress locators to be less brittle #17891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: edge
Choose a base branch
from

Conversation

skowalski08
Copy link
Contributor

Overview

Going through cypress typescript files to create stronger locators so tests will be less likely to break

Review requests

Risk assessment

Copy link

codecov bot commented Mar 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 24.47%. Comparing base (1703eb4) to head (00c5e9c).
Report is 1 commits behind head on edge.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             edge   #17891       +/-   ##
===========================================
- Coverage   61.91%   24.47%   -37.45%     
===========================================
  Files        2950     2950               
  Lines      227584   227374      -210     
  Branches    19186    19095       -91     
===========================================
- Hits       140902    55639    -85263     
- Misses      86510   171723    +85213     
+ Partials      172       12      -160     
Flag Coverage Δ
protocol-designer 18.78% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1649 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alexjoel42
Copy link
Contributor

alexjoel42 commented Mar 28, 2025

It would be awesome if we could get a test-id for all of our dropdown
That being said, LiquidDropdown in setupSteps.ts I could use a hand for setting up a test-id

LiquidsDropdown = 'div[tabindex="0"].sc-ksBlkl', //NOTE: locator

I think it's in the following spots, but I haven't added a test-id yet.

  • protocol-designer/src/components/organisms/AssignLiquidsModal/LiquidToolbox
  • components/src/molecules/DropdownMenu/index.tsx

What I think would be helpful as a more general statement is to evaluate how useful/time-consuming it would be to put test-IDs on all dropdown menus.

@skowalski08 skowalski08 marked this pull request as ready for review March 31, 2025 15:44
@skowalski08 skowalski08 requested a review from a team as a code owner March 31, 2025 15:44
@skowalski08 skowalski08 requested review from y3rsh and jerader March 31, 2025 15:45
Copy link
Contributor

@alexjoel42 alexjoel42 left a comment

Choose a reason for hiding this comment

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

LGTM if it passes

@skowalski08 skowalski08 changed the title fix(cypress) refactor locators to be less brittle fix(protocol-designer) refactor cypress locators to be less brittle Apr 2, 2025
Copy link
Member

@y3rsh y3rsh left a comment

Choose a reason for hiding this comment

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

Sorry it took me so long to get to this. I will work on a PR for these locators next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants