pawarprasad123 commented on code in PR #693:
URL: https://github.com/apache/atlas/pull/693#discussion_r3557830716
##########
dashboard/src/views/Entity/EntityForm.tsx:
##########
@@ -78,15 +78,18 @@ export function reducer(state: State, action: Action):
State {
const EntityForm = ({
open,
- onClose
+ onClose,
+ isAdd = false
Review Comment:
CreateDropdown.test.tsx only verifies prop propagation through a mock. It
does not exercise the new branch in EntityForm.tsx.
Recommended addition in EntityForm.test.tsx:
it('opens in create mode when isAdd=true even if URL has guid', async () => {
mockGuid = 'existing-guid-123'
render(<EntityForm open={true} onClose={jest.fn()} isAdd={true} />)
expect(screen.getByText('Create entity')).toBeInTheDocument()
expect(mockGetEntity).not.toHaveBeenCalled()
})
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]