|
@@ -1,6 +1,6 @@
|
|
import { expect } from '@playwright/test'
|
|
import { expect } from '@playwright/test'
|
|
import { test } from './fixtures'
|
|
import { test } from './fixtures'
|
|
-import { modKey } from './utils'
|
|
|
|
|
|
+import { modKey, renamePage } from './utils'
|
|
|
|
|
|
test('enable whiteboards', async ({ page }) => {
|
|
test('enable whiteboards', async ({ page }) => {
|
|
if (await page.$('.nav-header .whiteboard') === null) {
|
|
if (await page.$('.nav-header .whiteboard') === null) {
|
|
@@ -495,11 +495,7 @@ test('New page should have the correct name', async ({ page }) => {
|
|
})
|
|
})
|
|
|
|
|
|
test('Renaming a page to an existing whiteboard name should be prohibited', async ({ page }) => {
|
|
test('Renaming a page to an existing whiteboard name should be prohibited', async ({ page }) => {
|
|
- await page.click('.ls-page-title .page-title')
|
|
|
|
- await page.waitForSelector('input[type="text"]')
|
|
|
|
- await page.fill('input[type="text"]', '')
|
|
|
|
- await page.type('.title input', "My embedded whiteboard")
|
|
|
|
- await page.keyboard.press('Enter')
|
|
|
|
|
|
+ await renamePage(page, "My embedded whiteboard")
|
|
|
|
|
|
await expect(page.locator('.page-title input')).toHaveValue('My page')
|
|
await expect(page.locator('.page-title input')).toHaveValue('My page')
|
|
})
|
|
})
|