Y26-680 Automated buffer addition for cherrypicking#5565
Y26-680 Automated buffer addition for cherrypicking#5565andrewsparkes wants to merge 43 commits intodevelopfrom
Conversation
…empty_wells option on Cherrypick batches
…utomatic_buffer_addition checkbox
…ted-buffer-addition
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5565 +/- ##
===========================================
- Coverage 87.25% 87.22% -0.03%
===========================================
Files 1460 1463 +3
Lines 32966 33029 +63
Branches 3465 3479 +14
===========================================
+ Hits 28764 28811 +47
- Misses 4181 4197 +16
Partials 21 21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…es to match expected format
yoldas
left a comment
There was a problem hiding this comment.
Looks good. My comments are notes. After UAT, we might consider describing the options and limitations at https://ssg-confluence.internal.sanger.ac.uk/spaces/PSDPUB/pages/232620342/Cherrypicking+options+in+Sequencescape .
|
|
||
| it("disables buffer input when checkbox is unchecked", () => { | ||
| autoBufferCheckbox.checked = false; | ||
| document.dispatchEvent(new Event("DOMContentLoaded")); |
There was a problem hiding this comment.
note: the test may be OK because after DOMContentLoaded event, it registers a change event and then calls toggleBufferInput once to do an initial toggle. However, the toggle behaviour could be tested on the registered change event on the checkbox element automatic_buffer_addition by a dispatch as in autoBufferCheckbox.dispatchEvent(new Event("change"));
note: this PR adds JS testing (package.json) although there is no yarn test in CI workflows yet.
There was a problem hiding this comment.
tried changing:
autoBufferCheckbox.checked = false;
document.dispatchEvent(new Event("DOMContentLoaded"));
expect(bufferInput.disabled).toBe(true);
to:
autoBufferCheckbox.checked = false;
autoBufferCheckbox.dispatchEvent(new Event("change"));
expect(bufferInput.disabled).toBe(true);
but test fails. expect is false. I'm missing something.
There was a problem hiding this comment.
I meant the following, which can be added as well.
it("enables/disables buffer input when checkbox is toggled on/off", () => {
// register the change event handler and initially disable bufferInput
// because autoBufferCheckbox is unchecked
document.dispatchEvent(new Event("DOMContentLoaded"));
// You can set a value and trigger the change event on autoBufferCheckbox,
// or just click it instead.
// autoBufferCheckbox.checked = true;
// autoBufferCheckbox.dispatchEvent(new Event("change"));
autoBufferCheckbox.click(); // unchecked to checked
expect(bufferInput.disabled).toBe(false);
// You can set a value and trigger the change event on autoBufferCheckbox,
// or just click it instead.
// autoBufferCheckbox.checked = false;
// autoBufferCheckbox.dispatchEvent(new Event("change"));
autoBufferCheckbox.click(); // checked to unchecked
expect(bufferInput.disabled).toBe(true);
});
Closes #y26-680
Changes proposed in this pull request
Optional automated buffer addition for cherrypicking