(frontend) adapt all tests related to the new header

Since we no longer use an editable div but an input, we must
modify the tests accordingly
This commit is contained in:
Nathan Panchout
2024-11-25 12:10:16 +01:00
committed by Anthony LC
parent d5670640f5
commit 3a738fe701
9 changed files with 103 additions and 137 deletions

View File

@@ -40,14 +40,21 @@ export const createDoc = async (
})
.click();
await page.getByRole('heading', { name: 'Untitled document' }).click();
await page.keyboard.type(randomDocs[i], { delay: 100 });
await page.getByText('Created at ').click();
const input = page.getByRole('textbox', { name: 'doc title input' });
await input.click();
await input.fill(randomDocs[i]);
await input.blur();
}
return randomDocs;
};
export const verifyDocName = async (page: Page, docName: string) => {
const input = page.getByRole('textbox', { name: 'doc title input' });
await expect(input).toBeVisible();
await expect(input).toHaveText(docName);
};
export const addNewMember = async (
page: Page,
index: number,