From adee6231dabc8b9a8635710c153de8536640bed5 Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Wed, 20 Nov 2024 16:54:29 +0530 Subject: [PATCH] fix: lint issues --- .../add-component/AddComponent.test.jsx | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/course-unit/add-component/AddComponent.test.jsx b/src/course-unit/add-component/AddComponent.test.jsx index c3b3ffc3e4..af6ca36e3c 100644 --- a/src/course-unit/add-component/AddComponent.test.jsx +++ b/src/course-unit/add-component/AddComponent.test.jsx @@ -1,3 +1,4 @@ +/* eslint-disable react/prop-types */ import MockAdapter from 'axios-mock-adapter'; import { act, render, screen, waitFor, within, @@ -8,6 +9,7 @@ import { initializeMockApp } from '@edx/frontend-platform'; import { AppProvider } from '@edx/frontend-platform/react'; import { IntlProvider } from '@edx/frontend-platform/i18n'; import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth'; +import { Button } from '@openedx/paragon'; import initializeStore from '../../store'; import { executeThunk } from '../../utils'; @@ -24,7 +26,7 @@ let store; let axiosMock; const blockId = '123'; const handleCreateNewCourseXBlockMock = jest.fn(); -const usageKey = 'lb:Axim:TEST:html:571fe018-f3ce-45c9-8f53-5dafcb422fddest-usage-key' +const usageKey = 'lb:Axim:TEST:html:571fe018-f3ce-45c9-8f53-5dafcb422fddest-usage-key'; // Mock ComponentPicker to call onComponentSelected on click jest.mock('../../library-authoring/component-picker', () => ({ @@ -41,10 +43,12 @@ jest.mock('../../library-authoring/component-picker', () => ({ blockType: 'html', }]); } - } - return ; + }; + return ( + + ); }, })); @@ -61,7 +65,8 @@ const renderComponent = (props) => render( @@ -494,14 +499,12 @@ describe('', () => { const submitBtn = await screen.findByRole('button', { name: 'Add selected components' }); userEvent.click(submitBtn); - expect(mockSendMessageToIframe).toHaveBeenCalledWith( - messageTypes.addSelectedComponentsToBank, { - selectedComponents: [{ - blockType: "html", - usageKey, - }], - } - ); + expect(mockSendMessageToIframe).toHaveBeenCalledWith(messageTypes.addSelectedComponentsToBank, { + selectedComponents: [{ + blockType: 'html', + usageKey, + }], + }); }); describe('component support label', () => {