In tests/cypress/e2e/Forms/fieldsInFormBuilder.cy.js, the removeField helper's final assertion (around line 82) interpolates field — a Cypress chainable, not a string — directly into a selector:
cy.get( `li[data-type="${ field }"]` ).should( 'not.exist' );
Stringifying a chainable can't produce the field's id, so this selector never matches anything and .should( 'not.exist' ) passes unconditionally — for every field type, before and after deletion. The duplicate-creation assertion just above it correctly uses the string fieldId instead. The "delete" half of this test has never actually verified deletion.
Flagged by Franky's review on #3419 (#3419 (review)), not blocking there since removeField is untouched by that PR — filing separately given the blast radius (every call site, past and present).
In
tests/cypress/e2e/Forms/fieldsInFormBuilder.cy.js, theremoveFieldhelper's final assertion (around line 82) interpolatesfield— a Cypress chainable, not a string — directly into a selector:Stringifying a chainable can't produce the field's id, so this selector never matches anything and
.should( 'not.exist' )passes unconditionally — for every field type, before and after deletion. The duplicate-creation assertion just above it correctly uses the stringfieldIdinstead. The "delete" half of this test has never actually verified deletion.Flagged by Franky's review on #3419 (#3419 (review)), not blocking there since
removeFieldis untouched by that PR — filing separately given the blast radius (every call site, past and present).