ts fixes from reorg + unit test work
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 1m5s
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 1m5s
This commit is contained in:
@@ -41,9 +41,7 @@ describe('WhatsNewModal', () => {
|
||||
it('should call onClose when the close icon button is clicked', () => {
|
||||
render(<WhatsNewModal {...defaultProps} />);
|
||||
// The close button is an SVG icon inside a button, best queried by its aria-label.
|
||||
// Assuming the XCircleIcon doesn't have a specific label, we can find the button containing it.
|
||||
// Let's assume the button has a label for accessibility.
|
||||
const closeButton = screen.getByRole('button', { name: '' }); // Adjust if it has a label
|
||||
const closeButton = screen.getByRole('button', { name: /close/i });
|
||||
fireEvent.click(closeButton);
|
||||
expect(mockOnClose).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user