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 cdad6477ed
commit cf98da3298
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232
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