fix(tests): also resolve this silly failing label unit test

This commit is contained in:
perf3ct 2025-06-27 18:32:56 +00:00
parent 9a8bf72ff7
commit 3126b5552c
1 changed files with 8 additions and 2 deletions

View File

@ -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