mirror of
https://github.com/jlengrand/Maestro.git
synced 2026-03-10 08:31:19 +00:00
fix(test): update FilePreview test to use correct search placeholder
The test was looking for 'Search...' but the actual placeholder is 'Search in file... (Enter: next, Shift+Enter: prev)'. Updated to use regex /Search in file/ pattern consistent with other tests in the file.
This commit is contained in:
@@ -849,18 +849,18 @@ print("world")
|
||||
fireEvent.keyDown(previewContainer!, { key: 'f', metaKey: true });
|
||||
|
||||
// Search should be open
|
||||
expect(screen.getByPlaceholderText('Search...')).toBeInTheDocument();
|
||||
expect(screen.getByPlaceholderText(/Search in file/)).toBeInTheDocument();
|
||||
|
||||
// Press Escape - should close TOC first (it's checked first in the handler)
|
||||
fireEvent.keyDown(previewContainer!, { key: 'Escape' });
|
||||
|
||||
// TOC should be closed, search should still be open
|
||||
expect(screen.queryByText('Contents')).not.toBeInTheDocument();
|
||||
expect(screen.getByPlaceholderText('Search...')).toBeInTheDocument();
|
||||
expect(screen.getByPlaceholderText(/Search in file/)).toBeInTheDocument();
|
||||
|
||||
// Press Escape again - should close search
|
||||
fireEvent.keyDown(previewContainer!, { key: 'Escape' });
|
||||
expect(screen.queryByPlaceholderText('Search...')).not.toBeInTheDocument();
|
||||
expect(screen.queryByPlaceholderText(/Search in file/)).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user