mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
fix: Support the Clipboard API in modern browsers (#20058)
* fix: Support the Clipboard API in modern browsers * fix tests * PR comment * Improvements
This commit is contained in:
@@ -175,9 +175,9 @@ describe('DataTablesPane', () => {
|
||||
expect(await screen.findByText('1 row')).toBeVisible();
|
||||
|
||||
userEvent.click(screen.getByLabelText('Copy'));
|
||||
expect(copyToClipboardSpy).toHaveBeenCalledWith(
|
||||
'2009-01-01 00:00:00\tAction\n',
|
||||
);
|
||||
expect(copyToClipboardSpy).toHaveBeenCalledTimes(1);
|
||||
const value = await copyToClipboardSpy.mock.calls[0][0]();
|
||||
expect(value).toBe('2009-01-01 00:00:00\tAction\n');
|
||||
copyToClipboardSpy.mockRestore();
|
||||
fetchMock.restore();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user