split tests

pull/8279/head
Konstantinos Kaloutas 2023-01-16 12:47:52 +02:00
parent 51008bc363
commit f6abc872a6
1 changed files with 10 additions and 3 deletions

View File

@ -36,12 +36,14 @@ test('can right click title to show context menu', async ({ page }) => {
await expect(page.locator('#custom-context-menu')).toHaveCount(0) await expect(page.locator('#custom-context-menu')).toHaveCount(0)
}) })
test('set whiteboard title', async ({ page }) => { test('newly created whiteboard should have a default title', async ({ page }) => {
const title = 'my-whiteboard'
// Newly created whiteboard should have a default title
await expect(page.locator('.whiteboard-page-title .title')).toContainText( await expect(page.locator('.whiteboard-page-title .title')).toContainText(
'Untitled' 'Untitled'
) )
})
test('set whiteboard title', async ({ page }) => {
const title = 'my-whiteboard'
await page.click('.whiteboard-page-title') await page.click('.whiteboard-page-title')
await page.fill('.whiteboard-page-title input', 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( await expect(page.locator('.whiteboard-page-title .title')).toContainText(
title title
) )
})
test('update whiteboard title', async ({ page }) => {
const title = 'my-whiteboard'
await page.click('.whiteboard-page-title') await page.click('.whiteboard-page-title')
await page.fill('.whiteboard-page-title input', title + '-2') 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( await expect(page.locator('.ui__confirm-modal >> .headline')).toContainText(
`Do you really want to change the page name to “${title}-2”?` `Do you really want to change the page name to “${title}-2”?`
) )
await page.click('.ui__confirm-modal button') await page.click('.ui__confirm-modal button')
await expect(page.locator('.whiteboard-page-title .title')).toContainText( await expect(page.locator('.whiteboard-page-title .title')).toContainText(
title + '-2' title + '-2'