feat(dify-ui): add shared form primitives (#36334)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
yyh
2026-05-19 13:38:57 +08:00
committed by GitHub
parent 7f392b6950
commit 04d62867af
51 changed files with 1824 additions and 557 deletions

View File

@@ -317,6 +317,20 @@ describe('InstallFromGitHub', () => {
})
})
it('should submit the repo URL form from the set URL step', async () => {
render(<InstallFromGitHub {...defaultProps} />)
const input = getRepoUrlInput()
const form = input.closest('form')
fireEvent.change(input, { target: { value: 'https://github.com/owner/repo' } })
expect(form).toBeInTheDocument()
expect(getNextButton()).toHaveAttribute('type', 'submit')
fireEvent.submit(form!)
expect(await screen.findByRole('button', { name: 'Select Version' })).toBeInTheDocument()
})
it('should update selectedVersion when version is selected', async () => {
render(<InstallFromGitHub {...defaultProps} updatePayload={createUpdatePayload()} />)