mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-18 00:46:45 +00:00
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.
This commit is contained in:
parent
f49683c93b
commit
447ae68ff3
1 changed files with 8 additions and 12 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue