diff --git a/web/app/components/main-nav/__tests__/index.spec.tsx b/web/app/components/main-nav/__tests__/index.spec.tsx index 4a30a3edbd0..372dafc0beb 100644 --- a/web/app/components/main-nav/__tests__/index.spec.tsx +++ b/web/app/components/main-nav/__tests__/index.spec.tsx @@ -655,6 +655,21 @@ describe('MainNav', () => { expect(helpButton.parentElement).toHaveClass('shrink-0', 'rounded-full', 'p-1') }) + it('orders the Step-by-step Tour before the account and help actions', async () => { + localStorage.setItem(STEP_BY_STEP_TOUR_SHELL_MODE_STORAGE_KEY, 'collapsed') + + renderMainNav() + + const tourTrigger = await screen.findByRole('button', { name: 'Open step-by-step tour' }) + const accountButton = screen.getByRole('button', { name: 'common.account.account' }) + const helpButton = screen.getByRole('button', { name: 'common.mainNav.help.openMenu' }) + + expect(tourTrigger.compareDocumentPosition(accountButton)).toBe( + Node.DOCUMENT_POSITION_FOLLOWING, + ) + expect(accountButton.compareDocumentPosition(helpButton)).toBe(Node.DOCUMENT_POSITION_FOLLOWING) + }) + it('keeps the global navigation account section expanded on home routes', () => { localStorage.setItem(DETAIL_SIDEBAR_STORAGE_KEY, 'collapse') mockPathname = '/' diff --git a/web/app/components/main-nav/index.tsx b/web/app/components/main-nav/index.tsx index ee077f1d8ac..90932c841b6 100644 --- a/web/app/components/main-nav/index.tsx +++ b/web/app/components/main-nav/index.tsx @@ -133,6 +133,7 @@ export function MainNav({ className }: MainNavProps) { )}