You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Jest helper addNewDatagridRow never adds a row, so schema UI specs don't test new rows #10602
The Jest helper addNewDatagridRow in web/regression/javascript/genericFunctions.jsx (around lines 93-95) clicks [data-test="add-row"] button, but PgIconButton puts data-test on the <button> itself, so the descendant selector matches nothing and querySelector returns null. user.click(null) does not throw; user-event falls back to clicking document.body, so no row is ever added.
The helper is used at 13 call sites across 12 specs under regression/javascript/schema_ui_files/ (domain, foreign key, privilege, column, partition utils, variable, exclusion constraint, check constraint, membership, index, unique constraint and primary key). None of them asserts anything after the call, so they pass whilst never exercising the new-row and cell rendering paths they are meant to cover.
Suggested fix: use [data-test="add-row"] (as SchemaViewAllTypes.spec.js does), assert that the button exists and that the row count went up, and fix any specs that then fail.
Activity
Fix the Jest addNewDatagridRow helper so schema UI specs actually add…
dpage commentedon Oct 15, 2026
Fixed in 1402f7d (#10624).