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

(fix) O3-3890 Help menu (and menu items) should use a standard Carbon… #21

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Samstar10
Copy link

… menu

Requirements

  • This PR has a title that briefly describes the work done including a conventional commit type prefix and a Jira ticket number if applicable. See existing PR titles for inspiration.

For changes to apps

If applicable

  • My work includes tests or is validated by existing tests.

Summary

I have updated the help menu to use standard carbon menu items. This PR is related to this PR, openmrs/openmrs-esm-core#1164.

Screenshots

Please find attached the screenshot.
Screenshot 2024-09-26 at 16 45 40

Related Issue

https://openmrs.atlassian.net/browse/O3-3890

Other

render(<Tutorial />);

const menuItem = screen.getByText(/Tutorials/i);
fireEvent.click(menuItem);
Copy link
Member

Choose a reason for hiding this comment

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

Prefer userEvent instead.

Comment on lines +7 to +9
jest.mock('@openmrs/esm-framework', () => ({
showModal: jest.fn(),
}))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
jest.mock('@openmrs/esm-framework', () => ({
showModal: jest.fn(),
}))
const mockShowModal = jest.mocked('showModal');

And then replace showModal in assertions with mockShowModal. See https://o3-docs.openmrs.org/docs/frontend-modules/unit-and-integration-testing#you-should-not-need-to-use-partial-mocks for more context about why you shouldn't need to use partial mocks.

}

.tutorialsText:hover {
background: #e8e8e8;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
background: #e8e8e8;
background: colors.$white-hover;

Carbon color token mappings

@@ -28,3 +28,11 @@

}
}

.tutorialsText {
padding: 0.5rem 0.5rem;
Copy link
Member

Choose a reason for hiding this comment

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

nit:

Suggested change
padding: 0.5rem 0.5rem;
padding: layout.$spacing-03;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants