Skip to content
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

test: More Page Models for Experiment Tracking [INFENG-686] #9367

Merged

Conversation

JComins000
Copy link
Contributor

@JComins000 JComins000 commented May 14, 2024

Ticket

INFENG-686

Description

  • the dropdown refactor really helped with all this action bar stuff.
  • testids
  • I want to make readme changes and global docstring changes in another PR. I think, in general, if a class isn't getting exported, it might be okay to be lazy about the docstring. I'd be open to suggestions here. https://hpe-aiatscale.atlassian.net/browse/INFENG-696

Test Plan

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

@JComins000 JComins000 requested review from a team as code owners May 14, 2024 22:50
@JComins000 JComins000 requested a review from gt2345 May 14, 2024 22:50
@cla-bot cla-bot bot added the cla-signed label May 14, 2024
Copy link

netlify bot commented May 14, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit cfdd0a3
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/6644e706044c3c0008b8a6cc
😎 Deploy Preview https://deploy-preview-9367--determined-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented May 14, 2024

Codecov Report

Attention: Patch coverage is 0% with 64 lines in your changes are missing coverage. Please review.

Project coverage is 38.71%. Comparing base (3b1d0df) to head (cfdd0a3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9367      +/-   ##
==========================================
- Coverage   45.28%   38.71%   -6.58%     
==========================================
  Files        1227      903     -324     
  Lines      154048   114229   -39819     
  Branches     2404     2404              
==========================================
- Hits        69767    44221   -25546     
+ Misses      84089    69816   -14273     
  Partials      192      192              
Flag Coverage Δ
harness ?
web 36.30% <0.00%> (-0.03%) ⬇️

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

Files Coverage Δ
webui/react/src/components/OptionsMenu.tsx 65.75% <0.00%> (ø)
...rc/components/FilterForm/components/FilterForm.tsx 0.00% <0.00%> (ø)
...c/components/FilterForm/components/FilterField.tsx 0.00% <0.00%> (ø)
webui/react/src/components/ColumnPickerMenu.tsx 0.00% <0.00%> (ø)
...nts/FilterForm/components/ConjunctionContainer.tsx 0.00% <0.00%> (ø)
...c/components/FilterForm/components/FilterGroup.tsx 0.00% <0.00%> (ø)

... and 326 files with indirect coverage changes

<Select
autoFocus
data-test="columnName"
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the difference between data-test-id, data-test-component, and data-test? Probably more important: how would someone new to these tests know which one to add?
I know we talked about component before, but the more I think about this the less I like having multiple types of these data-test** attributes. What is the benefit of differentiating the key instead of the value, and is that benefit worth having to teach everyone who writes these tests the difference?

Copy link
Contributor Author

@JComins000 JComins000 May 15, 2024

Choose a reason for hiding this comment

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

yeah i wanted to add this to the readme.

data-test-component -> top level id for components
data-test -> test hooks for sub components
data-testid -> i'm using it for the first time here. it's for dynamic data

As an example, ColumnPickerTab gets data-test-component="columnPickerTab" at it's top level. rows inside the column picker all have data-test="row" . Each row will have a data-test-id="${testid}", which is equal to col.column in production code. It's just the name of the column. It's much easier than grabbing, say, the nth row.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's possible to use all three keys in one element. that's why we need many

readonly defaultSelector = '[data-test-component="FilterGroup"]';

#childrenSelector = '[data-test="children"]';
#notNestedSelector = `:not(${this.#childrenSelector} *)`;
Copy link
Contributor

Choose a reason for hiding this comment

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

should these be private/readonly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, let me add readonly. theyre already private

@JComins000 JComins000 enabled auto-merge (squash) May 15, 2024 16:12
@JComins000 JComins000 changed the title test: More Page Models for Experiment Tracking [INFENG-694] test: More Page Models for Experiment Tracking [INFENG-686] May 15, 2024
@JComins000 JComins000 merged commit 53edec9 into main May 15, 2024
83 of 96 checks passed
@JComins000 JComins000 deleted the jcom/INFENG-457/experiement-list-page-models-continued branch May 15, 2024 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants