From 4a89daf753ff229364307434dbcf0a22d80581ac Mon Sep 17 00:00:00 2001 From: "leanne.laceybyrne@eliatra.com" Date: Fri, 17 Nov 2023 13:05:01 +0000 Subject: [PATCH] Revert "covering uncovered test lines" This reverts commit 01063d1289ab2aae7c13c114d7c608dac8002e98. Signed-off-by: leanne.laceybyrne@eliatra.com --- public/services/test/shared-link.test.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/public/services/test/shared-link.test.ts b/public/services/test/shared-link.test.ts index 74fa6e069..8849b2f76 100644 --- a/public/services/test/shared-link.test.ts +++ b/public/services/test/shared-link.test.ts @@ -12,6 +12,7 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ +// Import necessary modules and dependencies import { API_ENDPOINT_MULTITENANCY } from '../../apps/configuration/constants.tsx'; import { addTenantToShareURL, @@ -45,7 +46,7 @@ describe('processCopyEvent function', () => { }; const targetMock: any = { - textContent: '', // Set content with an iframe for testing + textContent: 'mocked-text-content', }; jest.spyOn(document, 'querySelector').mockImplementation((selector) => { @@ -60,18 +61,7 @@ describe('processCopyEvent function', () => { selectNode: jest.fn(), } as any); - // Mock the updateClipboard function so that we can assert whether it's called with the correct arguments - const updateClipboardMock = jest.spyOn(global, 'updateClipboard').mockImplementation(() => {}); - - // Call the function processCopyEvent('mocked-tenant'); - - // Assert that updateClipboard was called with the expected arguments - expect(updateClipboardMock).toHaveBeenCalledWith( - 'mocked-src', - '', - 'mocked-tenant' - ); }); });