(frontend) add comments feature

Implemented the comments feature for the document
editor.
We are now able to add, view, and manage comments
within the document editor interface.
This commit is contained in:
Anthony LC
2025-09-12 15:44:27 +02:00
parent b13571c6df
commit 48e1370ba3
16 changed files with 1330 additions and 18 deletions

View File

@@ -70,6 +70,14 @@ export const keyCloakSignIn = async (
await page.click('button[type="submit"]', { force: true });
};
export const getOtherBrowserName = (browserName: BrowserName) => {
const otherBrowserName = BROWSERS.find((b) => b !== browserName);
if (!otherBrowserName) {
throw new Error('No alternative browser found');
}
return otherBrowserName;
};
export const randomName = (name: string, browserName: string, length: number) =>
Array.from({ length }, (_el, index) => {
return `${browserName}-${Math.floor(Math.random() * 10000)}-${index}-${name}`;
@@ -125,7 +133,9 @@ export const verifyDocName = async (page: Page, docName: string) => {
try {
await expect(
page.getByRole('textbox', { name: 'Document title' }),
).toContainText(docName);
).toContainText(docName, {
timeout: 1000,
});
} catch {
await expect(page.getByRole('heading', { name: docName })).toBeVisible();
}