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(core): overflow issue with account dropdown in header #918

Merged
merged 2 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/small-ducks-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/catalyst-core": patch
---

Fix issue with account dropdown in header.
2 changes: 1 addition & 1 deletion core/components/ui/navigation-menu/navigation-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const NavigationMenu = forwardRef<
<div className="relative">
<div
className={cn(
'group flex min-h-[92px] items-center justify-between gap-1 overflow-x-hidden bg-white px-4 2xl:container sm:px-10 lg:gap-8 lg:px-12 2xl:mx-auto 2xl:px-0',
'group flex min-h-[92px] items-center justify-between gap-1 overflow-y-visible bg-white px-4 2xl:container sm:px-10 lg:gap-8 lg:px-12 2xl:mx-auto 2xl:px-0',
className,
)}
>
Expand Down
15 changes: 15 additions & 0 deletions core/tests/ui/desktop/e2e/account.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,18 @@ test('My Account tabs are displayed and clickable', async ({ page }) => {
await expect(page).toHaveURL('account/settings/');
await expect(page.getByRole('heading', { name: 'Account settings' })).toBeVisible();
});

test('Account dropdown is visible in header', async ({ page }) => {
await page.goto('/login/');
await page.getByLabel('Login').click();
await page.getByLabel('Email').fill(process.env.TEST_ACCOUNT_EMAIL || '');
await page.getByLabel('Password').fill(process.env.TEST_ACCOUNT_PASSWORD || '');
await page.getByRole('button', { name: 'Log in' }).click();
await page.getByRole('heading', { name: 'My Account' }).waitFor();

await page.goto('/');

await page.getByRole('link', { name: 'Account' }).hover();

await expect(page.getByText('Log out')).toBeInViewport();
});
Loading