fix(tests): update input handling in ProxyHostForm tests for improved reliability
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user