(frontend) update document

We can now update a pad from a modal.
This commit is contained in:
Anthony LC
2024-05-23 17:01:33 +02:00
committed by Anthony LC
parent ef2f4d3250
commit 2813b2ca27
6 changed files with 200 additions and 1 deletions

View File

@@ -28,6 +28,7 @@ export const createPad = async (
padName: string,
browserName: string,
length: number,
isPublic: boolean = false,
) => {
const panel = page.getByLabel('Pads panel').first();
const buttonCreate = page.getByRole('button', { name: 'Create the pad' });
@@ -37,6 +38,11 @@ export const createPad = async (
for (let i = 0; i < randomPads.length; i++) {
await panel.getByRole('button', { name: 'Add a pad' }).click();
await page.getByText('Pad name').fill(randomPads[i]);
if (isPublic) {
await page.getByText('Is it public ?').click();
}
await expect(buttonCreate).toBeEnabled();
await buttonCreate.click();
await expect(panel.locator('li').getByText(randomPads[i])).toBeVisible();