fix: model user assignment by service instead of port
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { render, screen, within } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import App from './App';
|
||||
@@ -40,8 +40,13 @@ describe('App login gate', () => {
|
||||
await user.click(screen.getByRole('button', { name: /users/i }));
|
||||
await user.click(screen.getByRole('button', { name: /new user/i }));
|
||||
|
||||
expect(screen.getByRole('dialog', { name: /add user/i })).toBeInTheDocument();
|
||||
const dialog = screen.getByRole('dialog', { name: /add user/i });
|
||||
|
||||
expect(dialog).toBeInTheDocument();
|
||||
expect(screen.getByPlaceholderText(/night-shift-01/i)).toBeInTheDocument();
|
||||
expect(screen.getByLabelText(/service/i)).toBeInTheDocument();
|
||||
expect(screen.queryByLabelText(/port/i)).not.toBeInTheDocument();
|
||||
expect(within(dialog).getByText(/edge\.example\.net:1080/i)).toBeInTheDocument();
|
||||
|
||||
await user.keyboard('{Escape}');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user