Skip to content

Commit

Permalink
Refs #267520 - Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
GhitaB committed Mar 25, 2024
1 parent a322dd9 commit 2e0a109
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 33 deletions.
17 changes: 10 additions & 7 deletions src/components/theme/Views/NewsItemView.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import configureStore from 'redux-mock-store';
import '@testing-library/jest-dom/extend-expect';
import { Provider } from 'react-intl-redux';
import NewsItemView from './NewsItemView';
import renderer from 'react-test-renderer';
import { render } from '@testing-library/react';
import config from '@plone/volto/registry';

config.blocks = {
Expand Down Expand Up @@ -35,14 +35,17 @@ describe('NewsItemView', () => {
},
});

const component = renderer.create(
const { getByText } = render(
<Provider store={store}>
<MemoryRouter>
<NewsItemView content={content} />
</MemoryRouter>
<Provider store={store}>
<MemoryRouter>
<NewsItemView content={content} />
</MemoryRouter>
</Provider>
,
</Provider>,
);
const json = component.toJSON();
expect(json).toMatchSnapshot();
expect(getByText('Title Block Component')).toBeInTheDocument();
// expect(getByText('Test test')).toHaveClass('test-class');
});
});

This file was deleted.

0 comments on commit 2e0a109

Please sign in to comment.