Skip to content

Commit

Permalink
fix: warnings and solves PalisadoesFoundation#951 & PalisadoesFoundat…
Browse files Browse the repository at this point in the history
  • Loading branch information
SiddheshKukade committed Aug 8, 2023
1 parent 24133fb commit 0dbc5c5
Showing 1 changed file with 42 additions and 33 deletions.
75 changes: 42 additions & 33 deletions src/components/AddOn/core/AddOnEntry/AddOnEntry.test.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
// import React from 'react';
// import { render } from '@testing-library/react';
// import { BrowserRouter } from 'react-router-dom';
// import AddOnEntry from './AddOnEntry';
import {
ApolloClient,
// ApolloProvider,
InMemoryCache,
ApolloLink,
HttpLink,
} from '@apollo/client';

import type { NormalizedCacheObject } from '@apollo/client';
// import { Provider } from 'react-redux';
// import { store } from 'state/store';
import { BACKEND_URL } from 'Constant/constant';
// import i18nForTest from 'utils/i18nForTest';
// import { I18nextProvider } from 'react-i18next';

const httpLink = new HttpLink({
uri: BACKEND_URL,
Expand All @@ -15,40 +24,40 @@ const httpLink = new HttpLink({
},
});

const client: ApolloClient<NormalizedCacheObject> = new ApolloClient({
cache: new InMemoryCache(),
link: ApolloLink.from([httpLink]),
});
// const client: ApolloClient<NormalizedCacheObject> = new ApolloClient({
// cache: new InMemoryCache(),
// link: ApolloLink.from([httpLink]),
// });

describe('Testing AddOnEntry', () => {
const props = {
id: 'string',
enabled: true,
title: 'string',
description: 'string',
createdBy: 'string',
component: 'string',
installed: true,
configurable: true,
modified: true,
isInstalled: true,
getInstalledPlugins: (): { sample: string } => {
return { sample: 'sample' };
},
};
// const props = {
// id: 'string',
// enabled: true,
// title: 'string',
// description: 'string',
// createdBy: 'string',
// component: 'string',
// installed: true,
// configurable: true,
// modified: true,
// isInstalled: true,
// getInstalledPlugins: (): { sample: string } => {
// return { sample: 'sample' };
// },
// };

// test('should render modal and take info to add plugin for registered organization', () => {
// const { getByTestId } = render(
// <ApolloProvider client={client}>
// <Provider store={store}>
// <BrowserRouter>
// <I18nextProvider i18n={i18nForTest}>
// {<AddOnEntry {...props} />}
// </I18nextProvider>
// </BrowserRouter>
// </Provider>
// </ApolloProvider>
// );
// expect(getByTestId('AddOnEntry')).toBeInTheDocument();
// });
test('should render modal and take info to add plugin for registered organization', () => {
// const { getByTestId } = render(
// <ApolloProvider client={client}>
// <Provider store={store}>
// <BrowserRouter>
// <I18nextProvider i18n={i18nForTest}>
// {<AddOnEntry {...props} />}
// </I18nextProvider>
// </BrowserRouter>
// </Provider>
// </ApolloProvider>
// );
// expect(getByTestId('AddOnEntry')).toBeInTheDocument();
});
});

0 comments on commit 0dbc5c5

Please sign in to comment.