Prevent Persona Home Page save when no widgets are configured and verify widget-based save state in Playwright#28579
Prevent Persona Home Page save when no widgets are configured and verify widget-based save state in Playwright#28579Copilot wants to merge 4 commits into
Conversation
|
@copilot Create a playwright test validating save button state based on the widget selection. |
Addressed in
|
Code Review ✅ Approved 1 resolved / 1 findingsPrevents Persona Home Page save with zero widgets by adding validation logic and an inline warning message. The redundant widget selection dependency was removed from useMemo, successfully addressing the identified finding. ✅ 1 resolved✅ Bug: isWidgetSelectionEmpty in useMemo deps is a plain variable
OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Describe your changes:
Problem summary
What changed
CustomizeMyDatatreats an empty filtered widget layout as invalid and disables Save.disableSaveand removing the redundantisWidgetSelectionEmptydependency from the memo deps.message.minimum-widget-required.minimum-widget-requiredinen-us.json.CustomizeMyData.test.tsxto assert Save is disabled and warning alert is rendered for empty layout.CustomizeLandingPage.spec.tsto validate Save button state transitions based on widget selection:I worked on this because Persona configuration should enforce at least one widget at save time instead of silently allowing an empty config that later resolves to default widgets, and this behavior should be validated at both unit and E2E levels.
Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/CustomizeMyData/CustomizeMyData.test.tsxBackend integration tests
Ingestion integration tests
Playwright (UI) tests
openmetadata-ui/.../ui/playwright/for UI changes.openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/CustomizeLandingPage.spec.tsManual testing performed
yarn test src/components/MyData/CustomizableComponents/CustomizeMyData/CustomizeMyData.test.tsx --runInBandyarn lint:base './playwright/e2e/Flow/CustomizeLandingPage.spec.ts'UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.