mirror of
https://github.com/SomboChea/ui
synced 2026-01-19 01:25:51 +07:00
feat: update material-ui@4.x (#123)
* chore: update material-ui@4.x * test: update test for ActionBar and TestField * chore: add types * chore: update types * test: update test for Author * chore: fixed bunch of unit test * chore: remove unused import * chore: remove comments * chore: replace shallow my mount * chore: update git hooks * chore: fix styles * chore: update dependencies * chore: remove types material-ui
This commit is contained in:
committed by
GitHub
parent
376b84f8c9
commit
67d7188cf5
@@ -8,12 +8,15 @@ import vueMetadata from '../../../test/fixtures/metadata/vue.json';
|
||||
import Version from './Version';
|
||||
import { waitForElement } from '@testing-library/dom';
|
||||
import ErrorBoundary from '../../App/AppError';
|
||||
import { LABEL_NOT_FOUND } from '../../components/NotFound/NotFound';
|
||||
|
||||
// :-) we mock this otherways fails on render, some weird issue on material-ui
|
||||
jest.mock('@material-ui/core/Avatar');
|
||||
|
||||
// eslint-disable-next-line react/display-name
|
||||
jest.mock('../../components/NotFound', () => () => <div>{'Not found'}</div>);
|
||||
|
||||
describe('test Version page', () => {
|
||||
jest.setTimeout(40000000);
|
||||
beforeAll(() => {
|
||||
// FIXME: a better way to mock this
|
||||
// @ts-ignore
|
||||
@@ -79,10 +82,10 @@ describe('test Version page', () => {
|
||||
expect(hasLoading).toBeTruthy();
|
||||
|
||||
// we wait fetch response (mocked above)
|
||||
await waitForElement(() => getByTestId('404'));
|
||||
await waitForElement(() => getByText('Not found'));
|
||||
|
||||
// check whether readme was loaded
|
||||
const hasReadme = getByText(LABEL_NOT_FOUND);
|
||||
const hasReadme = getByText('Not found');
|
||||
|
||||
expect(hasReadme).toBeTruthy();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user