Skip to content

Commit

Permalink
Cody/link to profile edit page (#614)
Browse files Browse the repository at this point in the history
Closes #472 

Branched off of [Carlos's
PR](#487)
where he implement the user dropdown menu

- added `href="/account/settings"` to edit profile link
- Refactored the test to reflect the changes
  • Loading branch information
kepsteen authored Oct 22, 2024
1 parent b2ef060 commit 843c317
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/AdminUserSettings/AdminUserSettings.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe('AdminUserSettings Component', () => {
});
});

it('should direct to /admin/edit-profile route when the edit profile button is clicked', () => {
it('should direct to /account/settings route when the edit profile button is clicked', () => {
const adminUserSettings = screen.getByTestId('admin-user-settings');

fireEvent.click(adminUserSettings);
Expand All @@ -77,7 +77,7 @@ describe('AdminUserSettings Component', () => {
});

waitFor(() => {
expect(mockPush).toHaveBeenCalledWith('/user/edit');
expect(mockPush).toHaveBeenCalledWith('/account/settings');
});
});

Expand Down
2 changes: 1 addition & 1 deletion components/AdminUserSettings/AdminUserSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const AdminUserSettings = (): JSX.Element => {
<DropdownMenuItem className="cursor-pointer rounded-b-none flex focus:bg-muted">
<LinkCustom
className="text-base no-underline hover:text-foreground w-full py-2 px-0 text-muted-foreground hover:underline"
href="#"
href="/account/settings"
data-testid="edit-profile-link"
>
Edit Profile
Expand Down

0 comments on commit 843c317

Please sign in to comment.