Skip to content

Commit

Permalink
Revert "covering uncovered test lines"
Browse files Browse the repository at this point in the history
This reverts commit 01063d1289ab2aae7c13c114d7c608dac8002e98.

Signed-off-by: [email protected] <[email protected]>
  • Loading branch information
leanneeliatra committed Nov 17, 2023
1 parent 952c00c commit 4a89daf
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions public/services/test/shared-link.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -45,7 +46,7 @@ describe('processCopyEvent function', () => {
};

const targetMock: any = {
textContent: '<iframe src="mocked-src"></iframe>', // Set content with an iframe for testing
textContent: 'mocked-text-content',
};

jest.spyOn(document, 'querySelector').mockImplementation((selector) => {
Expand All @@ -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',
'<iframe src="mocked-src"></iframe>',
'mocked-tenant'
);
});
});

Expand Down

0 comments on commit 4a89daf

Please sign in to comment.