🐛(frontend) fix TOC display without headings
The table of contents was displayed even when there were no headings in the document. It was not the expected behavior. We now ensure that the TOC is only shown when there are headings present, we added a test to verify this behavior.
This commit is contained in:
@@ -19,6 +19,8 @@ test.describe('Doc Table Content', () => {
|
||||
|
||||
await page.locator('.ProseMirror').click();
|
||||
|
||||
await expect(page.getByRole('button', { name: 'Summary' })).toBeHidden();
|
||||
|
||||
await page.keyboard.type('# Level 1\n## Level 2\n### Level 3');
|
||||
|
||||
const summaryContainer = page.locator('#summaryContainer');
|
||||
|
||||
Reference in New Issue
Block a user