fix: 让 filetree 右键删除复用批量选择

This commit is contained in:
lix-2026
2026-05-21 15:57:28 +08:00
parent dc18ec0a60
commit 1e8f5c5816
2 changed files with 13 additions and 2 deletions
@@ -130,11 +130,13 @@ async function main() {
await dialog.accept();
return message;
});
await page.locator(selectors[1]).press("Delete", {
await page.locator(selectors[1]).click({
button: "right",
timeout: UI_TIMEOUT_MS,
});
await page.locator('.mnote-tree-context-menu__item[data-action="delete-trash"]').click({ timeout: UI_TIMEOUT_MS });
const confirmText = await dialogPromise;
assert.match(confirmText, /2 个附件/, `bulk delete 确认文案应包含附件数量: ${confirmText}`);
assert.match(confirmText, /2 个附件/, `右键 bulk delete 确认文案应包含附件数量: ${confirmText}`);
await page.waitForFunction(() => document.documentElement.getAttribute("data-mnote-filetree-bulk-delete-applied") === "true", null, {
timeout: UI_TIMEOUT_MS,