From 8466587538a1acd901ca0e67097f74f039a88b57 Mon Sep 17 00:00:00 2001 From: im3dabasia Date: Thu, 20 Feb 2025 13:58:45 +0530 Subject: [PATCH] remove: Old code --- .../src/color-picker/test/index.tsx | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/packages/components/src/color-picker/test/index.tsx b/packages/components/src/color-picker/test/index.tsx index 8856747671bb9..416fa53e02cf6 100644 --- a/packages/components/src/color-picker/test/index.tsx +++ b/packages/components/src/color-picker/test/index.tsx @@ -343,45 +343,6 @@ describe( 'ColorPicker', () => { } ); } ); - // describe.each( [ - // [ 'hsl', 'HSL' ], - // [ 'rgb', 'RGB' ], - // [ 'hex', 'HEX' ], - // ] )( 'copy button test for %s format', ( format, formatLabel ) => { - // it( `should copy the color value to the clipboard for ${ formatLabel }`, async () => { - // const color = '#000'; - // const user = userEvent.setup(); - - // // Mocks navigator.clipboard.readText to return the provided color value, simulating clipboard behavior in tests. - // // This ensures that when the clipboard is read, the color value is returned. - // // Reference: https://jestjs.io/docs/jest-object#jestspyonobject-methodname - // const readTextMock = jest - // .spyOn( navigator.clipboard, 'readText' ) - // .mockResolvedValue( color ); - - // render( ); - - // const formatSelector = screen.getByRole( 'combobox' ); - // expect( formatSelector ).toBeVisible(); - // await user.selectOptions( formatSelector, format ); - - // const copyButton = screen.getByRole( 'button', { - // name: 'Copy', - // } ); - // expect( copyButton ).toBeVisible(); - - // await user.click( copyButton ); - - // await waitFor( async () => { - // const copiedText = await navigator.clipboard.readText(); - // expect( copiedText ).toBe( color ); - // } ); - - // // Restores the original readText implementation. - // readTextMock.mockRestore(); - // } ); - // } ); - describe( 'ColorPicker copy button', () => { let capturedValue: string | undefined; let originalCreateElement: typeof document.createElement;