fix: hide stale title chrome while notes load

This commit is contained in:
lucaronin
2026-04-09 12:20:03 +02:00
parent 64e923ac5f
commit 90fbe82bca
4 changed files with 166 additions and 113 deletions

View File

@@ -117,4 +117,18 @@ describe('EditorContentLayout', () => {
expect(titleRow?.querySelector('[data-testid="note-icon-display"]')).not.toBeNull()
expect(titleRow?.querySelector('[data-testid="title-field-input"]')).not.toBeNull()
})
it('shows the loading skeleton instead of stale editor chrome while switching tabs', () => {
const { container } = render(
<EditorContentLayout
{...createModel({
activeTab: null,
isLoadingNewTab: true,
})}
/>,
)
expect(container.querySelector('.animate-pulse')).not.toBeNull()
expect(screen.queryByTestId('title-field-input')).not.toBeInTheDocument()
})
})