destroyOnClose unmounts the Form on close, disconnecting the useForm
instance so validateFields throws on reopen. Replaced with afterOpenChange
to reset fields without unmounting.
Also moved setModalOpen(false) and reload() before message.success so that
antd v5's static message API throwing outside an <App> context no longer
prevents the modal from closing after a successful create or update.
- 'renders summary table without crash when product has empty colors and locations':
mocks getProductSummary returning a product with colors/locations='', verifying the
page does not crash and calls the API (reproduces the previously-broken scenario).
- 'closes dialog after successful product creation (reload branch reached)':
verifies that a successful form submission calls createProduct and the ModalForm
closes, confirming onFinish returned true — the same code branch that triggers
summaryRef.reload().