fix(tests): update input handling in ProxyHostForm tests for improved reliability

This commit is contained in:
GitHub Actions
2026-03-01 14:04:40 +00:00
parent 8e1b9d91e2
commit dbff270d22

View File

@@ -1440,12 +1440,17 @@ describe('ProxyHostForm', () => {
<ProxyHostForm onSubmit={mockOnSubmit} onCancel={mockOnCancel} />
)
await userEvent.type(screen.getByLabelText(/^Name/), 'Remote Mapping')
await userEvent.type(screen.getByPlaceholderText('example.com, www.example.com'), 'remote.existing.com')
fireEvent.change(screen.getByLabelText(/^Name/), { target: { value: 'Remote Mapping' } })
fireEvent.change(screen.getByPlaceholderText('example.com, www.example.com'), { target: { value: 'remote.existing.com' } })
await selectComboboxOption('Source', 'Local Docker Registry (localhost)')
await selectComboboxOption('Containers', 'remote-app (nginx:latest)')
await waitFor(() => {
expect(screen.getByLabelText(/^Host$/)).toHaveValue('localhost')
expect(screen.getByLabelText(/^Port$/)).toHaveValue(18080)
})
await userEvent.click(screen.getByText('Save'))
await waitFor(() => {