MM-52213 webapp/platform/components : Add unit test framework (#23366)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c894cd3f30
Коммит
5808b848c3
@@ -11,6 +11,13 @@ const config = {
|
|||||||
safari: 12,
|
safari: 12,
|
||||||
},
|
},
|
||||||
modules: false,
|
modules: false,
|
||||||
|
corejs: {
|
||||||
|
version: "3.26",
|
||||||
|
proposals: true,
|
||||||
|
},
|
||||||
|
debug: false,
|
||||||
|
shippedProposals: true,
|
||||||
|
useBuiltIns: 'usage',
|
||||||
}],
|
}],
|
||||||
['@babel/preset-react', {
|
['@babel/preset-react', {
|
||||||
useBuiltIns: true,
|
useBuiltIns: true,
|
||||||
@@ -39,4 +46,12 @@ const config = {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config.env = {
|
||||||
|
test: {
|
||||||
|
presets: config.presets,
|
||||||
|
plugins: config.plugins,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
config.env.test.presets[0][1].modules = 'auto';
|
||||||
|
|
||||||
module.exports = config;
|
module.exports = config;
|
||||||
|
|||||||
21
webapp/platform/components/jest.config.js
Обычный файл
21
webapp/platform/components/jest.config.js
Обычный файл
@@ -0,0 +1,21 @@
|
|||||||
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||||
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
|
/** @type {import('jest').Config} */
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
moduleDirectories: ['src', 'node_modules'],
|
||||||
|
testEnvironment: 'jsdom',
|
||||||
|
testPathIgnorePatterns: ['/node_modules/', '/.rollup.cache/', '/dist/'],
|
||||||
|
clearMocks: true,
|
||||||
|
moduleNameMapper: {
|
||||||
|
'^@mattermost/(components)$': '<rootDir>/../platform/$1/src',
|
||||||
|
'^@mattermost/(client)$': '<rootDir>/../platform/$1/src',
|
||||||
|
'^@mattermost/(types)/(.*)$': '<rootDir>/../platform/$1/src/$2',
|
||||||
|
'^.+\\.(css|scss)$': 'identity-obj-proxy',
|
||||||
|
},
|
||||||
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||||
|
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = config;
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rollup -c",
|
"build": "rollup -c",
|
||||||
"run": "rollup -c --watch",
|
"run": "rollup -c --watch",
|
||||||
|
"test": "cross-env TZ=Etc/UTC jest",
|
||||||
"clean": "rm -rf dist node_modules tsconfig.tsbuildinfo .rollup.cache"
|
"clean": "rm -rf dist node_modules tsconfig.tsbuildinfo .rollup.cache"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -0,0 +1,143 @@
|
|||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`LegacyGenericModal should match snapshot for base case 1`] = `
|
||||||
|
Object {
|
||||||
|
"asFragment": [Function],
|
||||||
|
"baseElement": <body
|
||||||
|
class="modal-open"
|
||||||
|
style="padding-right: 0px;"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
role="dialog"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="fade modal-backdrop in"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
aria-labelledby="genericModalLabel"
|
||||||
|
class="fade in modal"
|
||||||
|
id="genericModal"
|
||||||
|
role="dialog"
|
||||||
|
style="display: block; padding-right: 0px;"
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="a11y__modal GenericModal modal-dialog"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="modal-content"
|
||||||
|
role="document"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
data-testid="sentinelStart"
|
||||||
|
tabindex="-1"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
class="GenericModal__wrapper-enter-key-press-catcher"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="modal-header"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
aria-label="Close"
|
||||||
|
class="close"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
×
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="sr-only"
|
||||||
|
>
|
||||||
|
Close
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="modal-body"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="GenericModal__header"
|
||||||
|
>
|
||||||
|
<h1
|
||||||
|
id="genericModalLabel"
|
||||||
|
>
|
||||||
|
Modal Header Text
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="GenericModal__body padding"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
data-testid="sentinelEnd"
|
||||||
|
tabindex="-1"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>,
|
||||||
|
"container": <div
|
||||||
|
aria-hidden="true"
|
||||||
|
/>,
|
||||||
|
"debug": [Function],
|
||||||
|
"findAllByAltText": [Function],
|
||||||
|
"findAllByDisplayValue": [Function],
|
||||||
|
"findAllByLabelText": [Function],
|
||||||
|
"findAllByPlaceholderText": [Function],
|
||||||
|
"findAllByRole": [Function],
|
||||||
|
"findAllByTestId": [Function],
|
||||||
|
"findAllByText": [Function],
|
||||||
|
"findAllByTitle": [Function],
|
||||||
|
"findByAltText": [Function],
|
||||||
|
"findByDisplayValue": [Function],
|
||||||
|
"findByLabelText": [Function],
|
||||||
|
"findByPlaceholderText": [Function],
|
||||||
|
"findByRole": [Function],
|
||||||
|
"findByTestId": [Function],
|
||||||
|
"findByText": [Function],
|
||||||
|
"findByTitle": [Function],
|
||||||
|
"getAllByAltText": [Function],
|
||||||
|
"getAllByDisplayValue": [Function],
|
||||||
|
"getAllByLabelText": [Function],
|
||||||
|
"getAllByPlaceholderText": [Function],
|
||||||
|
"getAllByRole": [Function],
|
||||||
|
"getAllByTestId": [Function],
|
||||||
|
"getAllByText": [Function],
|
||||||
|
"getAllByTitle": [Function],
|
||||||
|
"getByAltText": [Function],
|
||||||
|
"getByDisplayValue": [Function],
|
||||||
|
"getByLabelText": [Function],
|
||||||
|
"getByPlaceholderText": [Function],
|
||||||
|
"getByRole": [Function],
|
||||||
|
"getByTestId": [Function],
|
||||||
|
"getByText": [Function],
|
||||||
|
"getByTitle": [Function],
|
||||||
|
"queryAllByAltText": [Function],
|
||||||
|
"queryAllByDisplayValue": [Function],
|
||||||
|
"queryAllByLabelText": [Function],
|
||||||
|
"queryAllByPlaceholderText": [Function],
|
||||||
|
"queryAllByRole": [Function],
|
||||||
|
"queryAllByTestId": [Function],
|
||||||
|
"queryAllByText": [Function],
|
||||||
|
"queryAllByTitle": [Function],
|
||||||
|
"queryByAltText": [Function],
|
||||||
|
"queryByDisplayValue": [Function],
|
||||||
|
"queryByLabelText": [Function],
|
||||||
|
"queryByPlaceholderText": [Function],
|
||||||
|
"queryByRole": [Function],
|
||||||
|
"queryByTestId": [Function],
|
||||||
|
"queryByText": [Function],
|
||||||
|
"queryByTitle": [Function],
|
||||||
|
"rerender": [Function],
|
||||||
|
"unmount": [Function],
|
||||||
|
}
|
||||||
|
`;
|
||||||
@@ -1,41 +1,170 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`components/GenericModal/FooterPagination should render default 1`] = `
|
exports[`LegacyGenericModal/FooterPagination should render default 1`] = `
|
||||||
<div
|
Object {
|
||||||
className="footer-pagination"
|
"asFragment": [Function],
|
||||||
>
|
"baseElement": <body>
|
||||||
<div
|
<div>
|
||||||
className="footer-pagination__legend"
|
<div
|
||||||
/>
|
class="footer-pagination"
|
||||||
<div
|
>
|
||||||
className="footer-pagination__button-container"
|
<div
|
||||||
>
|
class="footer-pagination__legend"
|
||||||
<button
|
/>
|
||||||
className="footer-pagination__button-container__button disabled"
|
<div
|
||||||
disabled={true}
|
class="footer-pagination__button-container"
|
||||||
onClick={[MockFunction]}
|
>
|
||||||
type="button"
|
<button
|
||||||
|
class="footer-pagination__button-container__button disabled"
|
||||||
|
disabled=""
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
fill="currentColor"
|
||||||
|
height="16"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
width="16"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
<span>
|
||||||
|
Previous
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="footer-pagination__button-container__button disabled"
|
||||||
|
disabled=""
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
Next
|
||||||
|
</span>
|
||||||
|
<svg
|
||||||
|
fill="currentColor"
|
||||||
|
height="16"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
width="16"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>,
|
||||||
|
"container": <div>
|
||||||
|
<div
|
||||||
|
class="footer-pagination"
|
||||||
>
|
>
|
||||||
<ChevronLeftIcon
|
<div
|
||||||
size={16}
|
class="footer-pagination__legend"
|
||||||
/>
|
/>
|
||||||
<span>
|
<div
|
||||||
Previous
|
class="footer-pagination__button-container"
|
||||||
</span>
|
>
|
||||||
</button>
|
<button
|
||||||
<button
|
class="footer-pagination__button-container__button disabled"
|
||||||
className="footer-pagination__button-container__button disabled"
|
disabled=""
|
||||||
disabled={true}
|
type="button"
|
||||||
onClick={[MockFunction]}
|
>
|
||||||
type="button"
|
<svg
|
||||||
>
|
fill="currentColor"
|
||||||
<span>
|
height="16"
|
||||||
Next
|
version="1.1"
|
||||||
</span>
|
viewBox="0 0 24 24"
|
||||||
<ChevronRightIcon
|
width="16"
|
||||||
size={16}
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
/>
|
>
|
||||||
</button>
|
<path
|
||||||
</div>
|
d="M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"
|
||||||
</div>
|
/>
|
||||||
|
</svg>
|
||||||
|
<span>
|
||||||
|
Previous
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="footer-pagination__button-container__button disabled"
|
||||||
|
disabled=""
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
Next
|
||||||
|
</span>
|
||||||
|
<svg
|
||||||
|
fill="currentColor"
|
||||||
|
height="16"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
width="16"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>,
|
||||||
|
"debug": [Function],
|
||||||
|
"findAllByAltText": [Function],
|
||||||
|
"findAllByDisplayValue": [Function],
|
||||||
|
"findAllByLabelText": [Function],
|
||||||
|
"findAllByPlaceholderText": [Function],
|
||||||
|
"findAllByRole": [Function],
|
||||||
|
"findAllByTestId": [Function],
|
||||||
|
"findAllByText": [Function],
|
||||||
|
"findAllByTitle": [Function],
|
||||||
|
"findByAltText": [Function],
|
||||||
|
"findByDisplayValue": [Function],
|
||||||
|
"findByLabelText": [Function],
|
||||||
|
"findByPlaceholderText": [Function],
|
||||||
|
"findByRole": [Function],
|
||||||
|
"findByTestId": [Function],
|
||||||
|
"findByText": [Function],
|
||||||
|
"findByTitle": [Function],
|
||||||
|
"getAllByAltText": [Function],
|
||||||
|
"getAllByDisplayValue": [Function],
|
||||||
|
"getAllByLabelText": [Function],
|
||||||
|
"getAllByPlaceholderText": [Function],
|
||||||
|
"getAllByRole": [Function],
|
||||||
|
"getAllByTestId": [Function],
|
||||||
|
"getAllByText": [Function],
|
||||||
|
"getAllByTitle": [Function],
|
||||||
|
"getByAltText": [Function],
|
||||||
|
"getByDisplayValue": [Function],
|
||||||
|
"getByLabelText": [Function],
|
||||||
|
"getByPlaceholderText": [Function],
|
||||||
|
"getByRole": [Function],
|
||||||
|
"getByTestId": [Function],
|
||||||
|
"getByText": [Function],
|
||||||
|
"getByTitle": [Function],
|
||||||
|
"queryAllByAltText": [Function],
|
||||||
|
"queryAllByDisplayValue": [Function],
|
||||||
|
"queryAllByLabelText": [Function],
|
||||||
|
"queryAllByPlaceholderText": [Function],
|
||||||
|
"queryAllByRole": [Function],
|
||||||
|
"queryAllByTestId": [Function],
|
||||||
|
"queryAllByText": [Function],
|
||||||
|
"queryAllByTitle": [Function],
|
||||||
|
"queryByAltText": [Function],
|
||||||
|
"queryByDisplayValue": [Function],
|
||||||
|
"queryByLabelText": [Function],
|
||||||
|
"queryByPlaceholderText": [Function],
|
||||||
|
"queryByRole": [Function],
|
||||||
|
"queryByTestId": [Function],
|
||||||
|
"queryByText": [Function],
|
||||||
|
"queryByTitle": [Function],
|
||||||
|
"rerender": [Function],
|
||||||
|
"unmount": [Function],
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {shallow} from 'enzyme';
|
import {render, screen} from '@testing-library/react';
|
||||||
|
|
||||||
import {FooterPagination} from './';
|
import {FooterPagination} from './footer_pagination';
|
||||||
|
import {wrapIntl} from '../../testUtils'
|
||||||
|
|
||||||
describe('components/GenericModal/FooterPagination', () => {
|
describe('LegacyGenericModal/FooterPagination', () => {
|
||||||
const baseProps = {
|
const baseProps = {
|
||||||
page: 0,
|
page: 0,
|
||||||
total: 0,
|
total: 0,
|
||||||
@@ -16,73 +17,21 @@ describe('components/GenericModal/FooterPagination', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
test('should render default', () => {
|
test('should render default', () => {
|
||||||
const wrapper = shallow(
|
const wrapper = render(wrapIntl(<FooterPagination {...baseProps}/>));
|
||||||
<FooterPagination {...baseProps}/>,
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(wrapper).toMatchSnapshot();
|
expect(wrapper).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should render pagination legend', () => {
|
test('should render pagination legend', () => {
|
||||||
const wrapper = shallow(
|
const props = {
|
||||||
<FooterPagination
|
...baseProps,
|
||||||
{...baseProps}
|
page: 0,
|
||||||
page={0}
|
total: 17,
|
||||||
total={17}
|
itemsPerPage: 10,
|
||||||
itemsPerPage={10}
|
}
|
||||||
/>,
|
|
||||||
);
|
|
||||||
|
|
||||||
const legend = wrapper.find('.footer-pagination__legend');
|
render(wrapIntl(<FooterPagination {...props}/>));
|
||||||
|
|
||||||
expect(legend.length).toEqual(1);
|
expect(screen.getByText('Showing 1-10 of 17')).toBeInTheDocument();
|
||||||
expect(legend.at(0).text()).toEqual('Showing 1-10 of 17');
|
|
||||||
});
|
|
||||||
|
|
||||||
test('should render pagination buttons', () => {
|
|
||||||
const wrapper = shallow(
|
|
||||||
<FooterPagination
|
|
||||||
{...baseProps}
|
|
||||||
page={1}
|
|
||||||
total={30}
|
|
||||||
itemsPerPage={10}
|
|
||||||
/>,
|
|
||||||
);
|
|
||||||
|
|
||||||
const buttons = wrapper.find('.footer-pagination__button-container__button');
|
|
||||||
|
|
||||||
expect(buttons.length).toEqual(2);
|
|
||||||
expect(buttons.at(0).text()).toEqual('<ChevronLeftIcon />Previous');
|
|
||||||
expect(buttons.at(1).text()).toEqual('Next<ChevronRightIcon />');
|
|
||||||
});
|
|
||||||
|
|
||||||
test('should handle pagination buttons', async () => {
|
|
||||||
const onPreviousPage = jest.fn();
|
|
||||||
const onNextPage = jest.fn();
|
|
||||||
|
|
||||||
const wrapper = shallow(
|
|
||||||
<FooterPagination
|
|
||||||
page={1}
|
|
||||||
total={30}
|
|
||||||
itemsPerPage={10}
|
|
||||||
onPreviousPage={onPreviousPage}
|
|
||||||
onNextPage={onNextPage}
|
|
||||||
/>,
|
|
||||||
);
|
|
||||||
|
|
||||||
const buttons = wrapper.find('.footer-pagination__button-container__button');
|
|
||||||
const prevButton = buttons.at(0);
|
|
||||||
const nextButton = buttons.at(1);
|
|
||||||
|
|
||||||
expect(prevButton.hasClass('disabled')).toBeFalsy();
|
|
||||||
expect(nextButton.hasClass('disabled')).toBeFalsy();
|
|
||||||
|
|
||||||
nextButton.simulate('click');
|
|
||||||
|
|
||||||
expect(onNextPage).toHaveBeenCalledTimes(1);
|
|
||||||
|
|
||||||
prevButton.simulate('click');
|
|
||||||
|
|
||||||
expect(onPreviousPage).toHaveBeenCalledTimes(1);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||||
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
import {render, screen} from '@testing-library/react';
|
||||||
|
|
||||||
|
import {LegacyGenericModal} from './legacy_generic_modal';
|
||||||
|
import {wrapIntl} from '../testUtils';
|
||||||
|
|
||||||
|
describe('LegacyGenericModal', () => {
|
||||||
|
const baseProps = {
|
||||||
|
onExited: jest.fn(),
|
||||||
|
modalHeaderText: 'Modal Header Text',
|
||||||
|
children: <></>,
|
||||||
|
};
|
||||||
|
|
||||||
|
test('should match snapshot for base case', () => {
|
||||||
|
const wrapper = render(
|
||||||
|
wrapIntl(<LegacyGenericModal {...baseProps}/>),
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(wrapper).toMatchSnapshot();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('should have confirm and cancels buttons when handlers are passed for both buttons', () => {
|
||||||
|
const props = {
|
||||||
|
...baseProps,
|
||||||
|
handleConfirm: jest.fn(),
|
||||||
|
handleCancel: jest.fn(),
|
||||||
|
};
|
||||||
|
|
||||||
|
render(
|
||||||
|
wrapIntl(<LegacyGenericModal {...props}/>),
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(screen.getByText('Confirm')).toBeInTheDocument();
|
||||||
|
expect(screen.getByText('Cancel')).toBeInTheDocument();
|
||||||
|
});
|
||||||
|
});
|
||||||
4
webapp/platform/components/src/setupTests.ts
Обычный файл
4
webapp/platform/components/src/setupTests.ts
Обычный файл
@@ -0,0 +1,4 @@
|
|||||||
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||||
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
|
import '@testing-library/jest-dom';
|
||||||
13
webapp/platform/components/src/testUtils.tsx
Обычный файл
13
webapp/platform/components/src/testUtils.tsx
Обычный файл
@@ -0,0 +1,13 @@
|
|||||||
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||||
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
|
import React, {ReactNode} from 'react'
|
||||||
|
import {IntlProvider, createIntl} from 'react-intl'
|
||||||
|
|
||||||
|
export const defaultIntl = createIntl({
|
||||||
|
locale: 'en',
|
||||||
|
defaultLocale: 'en',
|
||||||
|
messages: {},
|
||||||
|
})
|
||||||
|
|
||||||
|
export const wrapIntl = (children?: ReactNode) => <IntlProvider {...defaultIntl}>{children}</IntlProvider>
|
||||||
@@ -8,7 +8,6 @@ import {Placement} from 'tippy.js';
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
|
||||||
import {PunchOutCoordsHeightAndWidth} from '../common/hooks/useMeasurePunchouts';
|
import {PunchOutCoordsHeightAndWidth} from '../common/hooks/useMeasurePunchouts';
|
||||||
import {useClickOutsideRef} from '../common/hooks/useClickOutsideRef';
|
|
||||||
|
|
||||||
import 'tippy.js/dist/tippy.css';
|
import 'tippy.js/dist/tippy.css';
|
||||||
import 'tippy.js/themes/light-border.css';
|
import 'tippy.js/themes/light-border.css';
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user