From f6abc872a67ff7efef6e481d809f7f0d1a74ac46 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Mon, 16 Jan 2023 12:47:52 +0200 Subject: [PATCH] split tests --- e2e-tests/whiteboards.spec.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/e2e-tests/whiteboards.spec.ts b/e2e-tests/whiteboards.spec.ts index 86d177ef9..6cbfdd55d 100644 --- a/e2e-tests/whiteboards.spec.ts +++ b/e2e-tests/whiteboards.spec.ts @@ -36,12 +36,14 @@ test('can right click title to show context menu', async ({ page }) => { await expect(page.locator('#custom-context-menu')).toHaveCount(0) }) -test('set whiteboard title', async ({ page }) => { - const title = 'my-whiteboard' - // Newly created whiteboard should have a default title +test('newly created whiteboard should have a default title', async ({ page }) => { await expect(page.locator('.whiteboard-page-title .title')).toContainText( 'Untitled' ) +}) + +test('set whiteboard title', async ({ page }) => { + const title = 'my-whiteboard' await page.click('.whiteboard-page-title') await page.fill('.whiteboard-page-title input', title) @@ -49,6 +51,10 @@ test('set whiteboard title', async ({ page }) => { await expect(page.locator('.whiteboard-page-title .title')).toContainText( title ) +}) + +test('update whiteboard title', async ({ page }) => { + const title = 'my-whiteboard' await page.click('.whiteboard-page-title') await page.fill('.whiteboard-page-title input', title + '-2') @@ -58,6 +64,7 @@ test('set whiteboard title', async ({ page }) => { await expect(page.locator('.ui__confirm-modal >> .headline')).toContainText( `Do you really want to change the page name to “${title}-2”?` ) + await page.click('.ui__confirm-modal button') await expect(page.locator('.whiteboard-page-title .title')).toContainText( title + '-2'