Skip to content
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

Merged
merged 9 commits into from
Jun 19, 2024
Merged

Conversation

alisher-epam
Copy link
Contributor

Purpose

UIIN-2760: Add Bound items accordion in item record

Approach

  • Add bound items accordion below the "Bound-with and analytics"

Refs

Screenshots

Screen.Recording.2024-06-17.at.14.30.20.mp4

Copy link

github-actions bot commented Jun 17, 2024

Jest Unit Test Statistics

    1 files  ±0  238 suites  +1   13m 1s ⏱️ +12s
889 tests +4  887 ✔️ +4  2 💤 ±0  0 ±0 
895 runs  +4  893 ✔️ +4  2 💤 ±0  0 ±0 

Results for commit 0af5fb4. ± Comparison against base commit e9fd5ab.

♻️ This comment has been updated with latest results.

@alisher-epam alisher-epam self-assigned this Jun 17, 2024
const mockUnboundPiece = jest.fn().mockResolvedValue(() => Promise.resolve());

const renderBoundPiecesList = (props = {}) => (render(
<IntlProvider locale="en">
Copy link
Contributor

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);
Copy link
Contributor

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

Comment on lines 14 to 19
[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" />,
Copy link
Contributor

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();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
expect(screen.getByText('ui-receiving.piece.displaySummary')).toBeInTheDocument();
expect(screen.getByText(/display summary/i)).toBeInTheDocument();

Copy link

sonarcloud bot commented Jun 19, 2024

@alisher-epam alisher-epam merged commit aa7cf04 into master Jun 19, 2024
5 checks passed
@alisher-epam alisher-epam deleted the UIIN-2760 branch June 19, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants