✨(frontend) update document
We can now update a pad from a modal.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user