fix(tests): also resolve this silly failing label unit test
This commit is contained in:
parent
9a8bf72ff7
commit
3126b5552c
|
|
@ -377,7 +377,10 @@ describe('LabelCreateDialog Component', () => {
|
|||
const createButton = screen.getByText('Create');
|
||||
await user.click(createButton);
|
||||
|
||||
expect(screen.getByText('Saving...')).toBeInTheDocument();
|
||||
// Wait for loading state to appear
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('Saving...')).toBeInTheDocument();
|
||||
});
|
||||
expect(createButton).toBeDisabled();
|
||||
|
||||
// Wait for submission to complete
|
||||
|
|
@ -396,7 +399,10 @@ describe('LabelCreateDialog Component', () => {
|
|||
const createButton = screen.getByText('Create');
|
||||
await user.click(createButton);
|
||||
|
||||
expect(nameInput).toBeDisabled();
|
||||
// Wait for loading state to take effect
|
||||
await waitFor(() => {
|
||||
expect(nameInput).toBeDisabled();
|
||||
});
|
||||
expect(screen.getByLabelText(/description/i)).toBeDisabled();
|
||||
|
||||
// Wait for submission to complete
|
||||
|
|
|
|||
Loading…
Reference in New Issue