From 447ae68ff3e99cfc9acf46f77d37d57504fc3509 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Sat, 25 Apr 2026 13:25:31 +0200 Subject: [PATCH] test(e2e): open attachment dialog via detail panel after #7314 The attach-dialog entry point moved out of the task context menu in PR #7314 and now lives in the detail panel. Update the WebDAV sync attachment test to use openTaskDetailPanel() and click the attachment input-item instead of right-clicking and looking for an "Attach" menu item that no longer exists. --- e2e/tests/sync/webdav-sync-advanced.spec.ts | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/e2e/tests/sync/webdav-sync-advanced.spec.ts b/e2e/tests/sync/webdav-sync-advanced.spec.ts index aad19d11f0..28b65f2b3b 100644 --- a/e2e/tests/sync/webdav-sync-advanced.spec.ts +++ b/e2e/tests/sync/webdav-sync-advanced.spec.ts @@ -8,6 +8,7 @@ import { waitForSyncComplete, generateSyncFolderName, } from '../../utils/sync-helpers'; +import { openTaskDetailPanel } from '../../utils/schedule-task-helper'; test.describe('@webdav WebDAV Sync Advanced Features', () => { // Run sync tests serially to avoid WebDAV server contention @@ -103,20 +104,15 @@ test.describe('@webdav WebDAV Sync Advanced Features', () => { await workViewPageA.addTask(taskName); const taskA = pageA.locator('task', { hasText: taskName }).first(); - // Add Attachment - // Use context menu which is more reliable - await taskA.click({ button: 'right' }); + // The attach-dialog entry point lives in the detail panel as of #7314. + await openTaskDetailPanel(pageA, taskA); - // Click "Attach file or link" in context menu - // The menu is in a portal, so we query the page - const attachBtn = pageA.locator('.mat-mdc-menu-content button', { - hasText: 'Attach', - }); - await attachBtn.waitFor({ state: 'visible' }); - await attachBtn.click(); + const addAttachmentItem = pageA.locator( + 'task-detail-panel task-detail-item.input-item:has(mat-icon:text("attachment"))', + ); + await addAttachmentItem.waitFor({ state: 'visible' }); + await addAttachmentItem.click(); - // Dialog opens (direct attachment dialog or via side panel?) - // The context menu action calls `addAttachment()`, which usually opens the dialog. const dialog = pageA.locator('dialog-edit-task-attachment'); await expect(dialog).toBeVisible();