-
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
fix(protocol-designer): fix bug with selecting magnet > disengage step #5257
Conversation
Codecov Report
@@ Coverage Diff @@
## edge #5257 +/- ##
==========================================
- Coverage 61.44% 61.43% -0.01%
==========================================
Files 1043 1043
Lines 29623 29626 +3
==========================================
+ Hits 18201 18202 +1
- Misses 11422 11424 +2
Continue to review full report at Codecov.
|
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.
- Create a disengage step, save it, click off it to another step, select it again. It should still be a "disengage" in the form. Saving the re-opened form shouldn't make changes to the form (you can look at Redux state)
- Autofilling last entered engage height number if the previous step was disengage should still work w/o regression
- You can create a magnet step, click off without saving, reselect, fill it out, and save it successfully
^ When I create a disengage step without saving, clicking away to another step, then reselecting the disengage step, the disengage radio button is no longer defaulted
@jen-fong yup that's the best we can get to right now I think, for pristine-never-saved forms we don't have them re-default, it should be similar to pipette field's behavior in mix/transfer steps the thing I'm intending to test is that moduleId is populated for pristine-never-saved (if you fill it out and cannot save, it failed to populate moduleId) |
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.
🔍 ⬆️
- Disengage steps/step forms retain disengage selection
- You can create a magnet step, click off without saving, reselect, fill it out, and save it successfully
- Autofilling last entered engage height number if the previous step was disengage still works w/o regression
overview
Closes #5247
The problem was that existing magnet steps were being treated the same as just-newly-created magnet steps. The desired behavior for just-newly-created steps
review requests
Create a disengage step, save it, click off it to another step, select it again. It should still be a "disengage" in the form. Saving the re-opened form shouldn't make changes to the form (you can look at Redux state)
You can create a magnet step, click off without saving, reselect, fill it out, and save it successfully
Autofilling last entered engage height number if the previous step was disengage should still work w/o regression
Ideas for tests? I thought about refactoring the
if (newStepType === 'magnet') {...} else if (formData?.stepType === 'magnet') {...}
into a function that could be tested on its own, but I'm not very motivated to put work into the pristine-never-saved form stuff since we're going to strip it out :/risk assessment
PD only, shouldn't affect PRs in flight