Repository navigation
Conversation
… a row. pgadmin-org#10602 The helper looked for a button inside [data-test="add-row"], but that attribute is on the button itself, so it clicked nothing. It now clicks the right element and asserts that the grid gained a row. That exposed two spec bugs: the primary key, unique constraint and foreign key specs shared one schema across tests, so fields mutated by the properties view leaked a helpMessage prop into later grid cells, and the partitions spec made the partition schema its own top schema, which has no session data.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe add-row helper now verifies that it adds one direct grid row. Schema UI test changes document existing per-test setup and create fresh schema objects in partition, primary-key, and unique-constraint cases. ChangesSchema UI Regression Tests
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to
|
|
Squashed and merged as 1402f7d. |
addNewDatagridRowqueried[data-test="add-row"] button, butPgIconButtonputsdata-teston the<button>itself, so it matched nothing anduser.click(null)clickeddocument.body. The helper now clicks[data-test="add-row"], asserts the button exists, and asserts that the grid's own row count went up by one.Exercising the new-row path exposed two spec bugs, both fixed in the specs:
field.helpMessage = ''on the schema's fields, and that then reached a DOM element in the later grid cells, tripping theconsole.errorguard. Each test now gets a fresh schema, as each dialog does in the product.top, which never has session data, sotop.sessData.partition_typethrew. It now lets the collection become the top schema, as the table dialog does in the product.Test plan
npx jest regression/javascript/schema_ui_files regression/javascript/SchemaView: 80 suites, 475 tests passCloses #10602
Summary by CodeRabbit