Skip to content

Commit

Permalink
(fix) O3-2265: Change user menu label to "My Account" (#944)
Browse files Browse the repository at this point in the history
* fix tests

* refactor: rename user menu label

* refactor: update transalations

* fix: fix tests

* Discard changes to packages/apps/esm-primary-navigation-app/translations/am.json

* Discard changes to packages/apps/esm-primary-navigation-app/translations/ar.json

* Discard changes to packages/apps/esm-primary-navigation-app/translations/es.json

* Discard changes to packages/apps/esm-primary-navigation-app/translations/fr.json

* Discard changes to packages/apps/esm-primary-navigation-app/translations/km.json

* Discard changes to packages/apps/esm-primary-navigation-app/translations/he.json

---------

Co-authored-by: Ian <52504170+ibacher@users.noreply.github.com>
  • Loading branch information
usamaidrsk and ibacher authored Mar 5, 2024
1 parent 305b4c9 commit 00366e1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion e2e/specs/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ test('Login as Admin user', async ({ page }) => {
});

await test.step('And I should be able to see various elements on the page', async () => {
await page.getByRole('button', { name: /user/i }).click();
await page.getByRole('button', { name: /My Account/i }).click();
await expect(page.getByText(/super user/i)).toBeVisible();
await expect(page.getByText(/outpatient clinic/i)).toBeVisible();
await expect(page.getByRole('button', { name: /logout/i })).toBeVisible();
Expand Down
2 changes: 1 addition & 1 deletion e2e/specs/logout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test('Logout as Admin user', async ({ page }) => {
});

await test.step('And I click the `User` button', async () => {
await page.getByRole('button', { name: /user/i }).click();
await page.getByRole('button', { name: /My Account/i }).click();
});

await test.step('And I click the `Logout` button', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const HeaderItems: React.FC = () => {
/>
{showUserMenu && (
<HeaderGlobalAction
aria-label={t('userMenuTooltip', 'User')}
aria-label={t('userMenuTooltip', 'My Account')}
aria-labelledby="Users Avatar Icon"
className={classNames({
[styles.headerGlobalBarButton]: isActivePanel('userMenu'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('Root', () => {
it('should display navbar with title', async () => {
render(<Root />);

expect(screen.getByRole('button', { name: /user/i })).toBeInTheDocument();
expect(screen.getByRole('button', { name: /My Account/i })).toBeInTheDocument();
expect(screen.getByRole('banner', { name: /openmrs/i })).toBeInTheDocument();
expect(screen.getByText(/mock emr/i)).toBeInTheDocument();
});
Expand All @@ -61,7 +61,7 @@ describe('Root', () => {

render(<Root />);

const userButton = screen.getByRole('button', { name: /user/i });
const userButton = screen.getByRole('button', { name: /My Account/i });
await user.click(userButton);
expect(screen.getByLabelText(/location/i)).toBeInTheDocument();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"changeLanguage": "Change language",
"changingLanguage": "Changing language",
"notifications": "Notifications",
"userMenuTooltip": "User"
"userMenuTooltip": "My Account"
}

0 comments on commit 00366e1

Please sign in to comment.