From 764bbf0e4c23afeb129ec7c65278ab1fa55751a9 Mon Sep 17 00:00:00 2001 From: lucaronin Date: Sat, 18 Apr 2026 02:10:54 +0200 Subject: [PATCH] test: scope inbox sidebar assertion --- src/App.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.test.tsx b/src/App.test.tsx index 03b9849e..6e2e7b1b 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -1,4 +1,4 @@ -import { render, screen, fireEvent, waitFor } from '@testing-library/react' +import { render, screen, fireEvent, waitFor, within } from '@testing-library/react' import type { ReactNode } from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' @@ -295,7 +295,7 @@ describe('App', () => { render() await waitFor(() => { - expect(screen.queryByText('Inbox')).not.toBeInTheDocument() + expect(within(screen.getByTestId('sidebar-top-nav')).queryByText('Inbox')).not.toBeInTheDocument() expect(screen.getByText('All Notes')).toBeInTheDocument() }) })