Restore proxy endpoint setting
This commit is contained in:
@@ -142,7 +142,7 @@ describe('App login gate', () => {
|
||||
expect(screen.queryByRole('dialog', { name: /delete user/i })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('uses a combined service type field in settings and applies saved ports to the local fallback state', async () => {
|
||||
it('uses a combined service type field in settings and applies saved proxy endpoint values to the local fallback state', async () => {
|
||||
const user = userEvent.setup();
|
||||
render(<App />);
|
||||
|
||||
@@ -151,12 +151,15 @@ describe('App login gate', () => {
|
||||
|
||||
expect(screen.getByRole('heading', { name: /panel settings/i })).toBeInTheDocument();
|
||||
expect(screen.getByRole('heading', { name: /^services$/i })).toBeInTheDocument();
|
||||
expect(screen.queryByLabelText(/public host/i)).not.toBeInTheDocument();
|
||||
expect(screen.getByLabelText(/proxy endpoint/i)).toBeInTheDocument();
|
||||
expect(screen.queryByLabelText(/command/i)).not.toBeInTheDocument();
|
||||
expect(screen.queryByLabelText(/protocol/i)).not.toBeInTheDocument();
|
||||
expect(screen.getAllByLabelText(/type/i)).toHaveLength(3);
|
||||
expect(screen.queryByRole('option', { name: /admin/i })).not.toBeInTheDocument();
|
||||
|
||||
await user.clear(screen.getByLabelText(/proxy endpoint/i));
|
||||
await user.type(screen.getByLabelText(/proxy endpoint/i), 'gw.example.net');
|
||||
|
||||
const firstPortInput = screen.getAllByLabelText(/port/i)[0];
|
||||
await user.clear(firstPortInput);
|
||||
await user.type(firstPortInput, '1180');
|
||||
@@ -164,7 +167,7 @@ describe('App login gate', () => {
|
||||
await user.click(screen.getByRole('button', { name: /save settings/i }));
|
||||
await user.click(screen.getByRole('button', { name: /users/i }));
|
||||
|
||||
expect(screen.getAllByText(/edge\.example\.net:1180/i).length).toBeGreaterThan(0);
|
||||
expect(screen.getAllByText(/gw\.example\.net:1180/i).length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
it('warns before deleting a service and removes linked users after confirmation', async () => {
|
||||
|
||||
Reference in New Issue
Block a user