Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions playwright/e2e/page-content.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand All @@ -11,20 +11,24 @@
const test = mergeTests(createCollectiveTest, editorTest)

test.describe('Page content', () => {
// Requires https://github.com/nextcloud/whiteboard/pull/1374 to succeed with latest Text
test.skip('create whiteboard from attachments menu', async ({ user, page, collective, editor }) => {
test('create whiteboard from attachments menu', async ({ user, page, collective, editor }) => {
test.slow()
await runOcc(['app:enable', '--force', 'whiteboard'])
const collectivePage = await collective.createPage({ title: 'Page with whiteboard', user, page })
await collectivePage.open(true)

editor.setMode(true)
await editor.clickMenu('attachment', 'New whiteboard')
await expect(editor.getContent()
.locator('.widget-file.whiteboard'))
.toBeVisible()
try {
const collectivePage = await collective.createPage({ title: 'Page with whiteboard', user, page })
await collectivePage.open(true)

await runOcc(['app:disable', 'whiteboard'])
editor.setMode(true)
await editor.clickMenu('attachment', 'New whiteboard')
// Viewer app (stable35 and older) renders the whiteboard as the widget itself,
// the viewer API of newer servers inside a custom element widget.
// TODO: remove first selector once we only support Nextcloud 36+
await expect(editor.getContent()
.locator('.widget-file.whiteboard, .widget-file .whiteboard'))
.toBeVisible()

Check failure on line 28 in playwright/e2e/page-content.spec.ts

View workflow job for this annotation

GitHub Actions / playwright (master, 2, 4)

[chromium] › playwright/e2e/page-content.spec.ts:14:2 › Page content › create whiteboard from attachments menu

1) [chromium] › playwright/e2e/page-content.spec.ts:14:2 › Page content › create whiteboard from attachments menu Error: expect(locator).toBeVisible() failed Locator: locator('[data-cy-collectives="editor"]').locator('.ProseMirror[contenteditable="true"]').locator('.widget-file.whiteboard, .widget-file .whiteboard') Expected: visible Received: hidden Timeout: 5000ms Call log: - Expect "toBeVisible" locator('[data-cy-collectives="editor"]').locator('.ProseMirror[contenteditable="true"]').locator('.widget-file.whiteboard, .widget-file .whiteboard') with timeout 5000ms - waiting for locator('[data-cy-collectives="editor"]').locator('.ProseMirror[contenteditable="true"]').locator('.widget-file.whiteboard, .widget-file .whiteboard') 5 × locator resolved to <div class="whiteboard">…</div> - unexpected value "hidden" 26 | await expect(editor.getContent() 27 | .locator('.widget-file.whiteboard, .widget-file .whiteboard')) > 28 | .toBeVisible() | ^ 29 | } finally { 30 | await runOcc(['app:disable', 'whiteboard']) 31 | } at /home/runner/actions-runner/_work/collectives/collectives/playwright/e2e/page-content.spec.ts:28:6
} finally {
await runOcc(['app:disable', 'whiteboard'])
}
})

test('editor container grows vertically', async ({ user, page, collective, editor }) => {
Expand Down
Loading