-
Notifications
You must be signed in to change notification settings - Fork 179
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(pd): enable parameters for steps #17442
base: edge
Are you sure you want to change the base?
Conversation
{ step: SetupActions.ClickLiquidButton }, | ||
{ step: SetupActions.DefineLiquid }, | ||
{ step: SetupActions.LiquidSaveWIP }, | ||
{ step: SetupActions.WellSelector, params: ['A1', 'A2'] }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the example. Each of our Steps is now in the shape of interface StepListItem
So you may intake whatever param of whatever type you want to more dynamically drive a particular Action/Verification.
if (Array.isArray(action.params) && action.params.length > 0) { | ||
selectWells(action.params) | ||
} else { | ||
selectWells(['A1', 'A2']) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can see over time if we would prefer to do the checking of the shape of the param in the implementation function itself or here.
Another thought I had as I was thinking on this
So far I like the dev experience using the enum to know what the steps are. We can of course make a big union type of functions, especially if most things end up having parameters, so we can see the param shape in code completion.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## edge #17442 +/- ##
==========================================
+ Coverage 20.07% 20.08% +0.01%
==========================================
Files 3187 3189 +2
Lines 229811 229682 -129
Branches 8190 8192 +2
==========================================
Hits 46132 46132
+ Misses 183679 183550 -129
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Overview
Change the shape of the
StepList
to intake parameters.Follow the example and validate the shape of the param in the case statement then pass it to your function that implements the cypress behavior.
Test Plan and Hands on Testing
Make sure all tests still pass.
Risk assessment
⬇️