fix(tests): resolve issues with webdav scan failure testing
This commit is contained in:
parent
d793509af9
commit
7616691939
|
|
@ -436,9 +436,11 @@ describe('LabelCreateDialog Component', () => {
|
||||||
const createButton = screen.getByText('Create');
|
const createButton = screen.getByText('Create');
|
||||||
await user.click(createButton);
|
await user.click(createButton);
|
||||||
|
|
||||||
// Try to close during loading - should be disabled due to pointer-events: none
|
// Wait for loading state to be set and check Cancel button is disabled
|
||||||
const cancelButton = screen.getByText('Cancel');
|
await waitFor(() => {
|
||||||
expect(cancelButton).toBeDisabled();
|
const cancelButton = screen.getByText('Cancel');
|
||||||
|
expect(cancelButton).toBeDisabled();
|
||||||
|
});
|
||||||
|
|
||||||
expect(onClose).not.toHaveBeenCalled();
|
expect(onClose).not.toHaveBeenCalled();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,7 @@ describe('FailureDetailsPanel', () => {
|
||||||
const notesInput = screen.getByLabelText('Notes (optional)');
|
const notesInput = screen.getByLabelText('Notes (optional)');
|
||||||
await userEvent.type(notesInput, 'Path too long to fix easily');
|
await userEvent.type(notesInput, 'Path too long to fix easily');
|
||||||
|
|
||||||
const permanentSwitch = screen.getByRole('checkbox');
|
const permanentSwitch = screen.getByLabelText('Permanently exclude (recommended)');
|
||||||
await userEvent.click(permanentSwitch); // Toggle off
|
await userEvent.click(permanentSwitch); // Toggle off
|
||||||
await userEvent.click(permanentSwitch); // Toggle back on
|
await userEvent.click(permanentSwitch); // Toggle back on
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -236,7 +236,7 @@ describe('FailureDetailsPanel', () => {
|
||||||
const notesInput = screen.getByLabelText('Notes (optional)');
|
const notesInput = screen.getByLabelText('Notes (optional)');
|
||||||
await userEvent.type(notesInput, 'Path too long to fix easily');
|
await userEvent.type(notesInput, 'Path too long to fix easily');
|
||||||
|
|
||||||
const permanentSwitch = screen.getByRole('checkbox');
|
const permanentSwitch = screen.getByLabelText('Permanently exclude (recommended)');
|
||||||
await userEvent.click(permanentSwitch); // Toggle off
|
await userEvent.click(permanentSwitch); // Toggle off
|
||||||
await userEvent.click(permanentSwitch); // Toggle back on
|
await userEvent.click(permanentSwitch); // Toggle back on
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue