mirror of
https://github.com/apache/superset.git
synced 2026-07-27 09:02:29 +00:00
test(dashboard): update Header delete-button query for new accessible name
DeleteComponentButton now labels its IconButton 'Delete component', so the role/name query for the old icon-derived name 'delete' no longer matches. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -145,7 +145,9 @@ describe('Header', () => {
|
||||
const deleteComponent = jest.fn();
|
||||
setup({ editMode: true, deleteComponent });
|
||||
|
||||
const trashButton = screen.getByRole('button', { name: 'delete' });
|
||||
const trashButton = screen.getByRole('button', {
|
||||
name: 'Delete component',
|
||||
});
|
||||
fireEvent.click(trashButton);
|
||||
|
||||
expect(deleteComponent).toHaveBeenCalledTimes(1);
|
||||
|
||||
Reference in New Issue
Block a user