♻️(frontend) better handling css doc states

We simplify the way we handle different doc
states (deleted / readonly) in the CSS, we avoid
props drilling and are more component focused.
This commit is contained in:
Anthony LC
2025-11-07 15:31:05 +01:00
parent b91840c819
commit e5581e52f7
6 changed files with 40 additions and 25 deletions

View File

@@ -119,6 +119,10 @@ test.describe('Doc Trashbin', () => {
await row.getByText(subDocName).click();
await verifyDocName(page, subDocName);
await expect(
page.locator('.--docs--editor-container.--docs--doc-deleted'),
).toBeVisible();
await expect(page.getByLabel('Alert deleted document')).toBeVisible();
await expect(page.getByRole('button', { name: 'Share' })).toBeDisabled();
await expect(page.locator('.bn-editor')).toHaveAttribute(

View File

@@ -260,6 +260,10 @@ test.describe('Doc Visibility: Public', () => {
await expect(card).toBeVisible();
await expect(card.getByText('Reader')).toBeVisible();
await expect(
otherPage.locator('.--docs--editor-container.--docs--doc-readonly'),
).toBeVisible();
const otherEditor = await getEditor({ page: otherPage });
await expect(otherEditor).toHaveAttribute('contenteditable', 'false');
await expect(otherEditor.getByText('Hello Public Viewonly')).toBeVisible();