-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UIIN-2760: Add Bound items accordion in item record #2509
Conversation
const mockUnboundPiece = jest.fn().mockResolvedValue(() => Promise.resolve()); | ||
|
||
const renderBoundPiecesList = (props = {}) => (render( | ||
<IntlProvider locale="en"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could use renderWithIntl()
instead of wrapping in provider
}); | ||
}); | ||
|
||
afterEach(cleanup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cleanup is called automatically, you do not need to call it manually
[PIECE_COLUMNS.barcode]: <FormattedMessage id="ui-receiving.piece.barcode" />, | ||
[PIECE_COLUMNS.displaySummary]: <FormattedMessage id="ui-receiving.piece.displaySummary" />, | ||
[PIECE_COLUMNS.chronology]: <FormattedMessage id="ui-receiving.piece.chronology" />, | ||
[PIECE_COLUMNS.copyNumber]: <FormattedMessage id="ui-receiving.piece.copyNumber" />, | ||
[PIECE_COLUMNS.enumeration]: <FormattedMessage id="ui-receiving.piece.enumeration" />, | ||
[PIECE_COLUMNS.receiptDate]: <FormattedMessage id="ui-receiving.piece.receiptDate" />, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets add these translations to ui-inventory translations to not rely on a module that is not listed in package.json
it('should render component', () => { | ||
renderBoundPiecesList(); | ||
|
||
expect(screen.getByText('ui-receiving.piece.displaySummary')).toBeInTheDocument(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect(screen.getByText('ui-receiving.piece.displaySummary')).toBeInTheDocument(); | |
expect(screen.getByText(/display summary/i)).toBeInTheDocument(); |
|
Purpose
UIIN-2760: Add Bound items accordion in item record
Approach
Refs
Screenshots
Screen.Recording.2024-06-17.at.14.30.20.mp4