fix(e2e): derniers tests split-view + Forge - dropdown autocomplete, transferTab menu, drag natif
CI / lint (push) Successful in 29s
CI / security (push) Successful in 21s
CI / test (push) Successful in 33s
CI / build (push) Successful in 12s
CI / e2e (push) Failing after 6m35s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
CI / lint (push) Successful in 29s
CI / security (push) Successful in 21s
CI / test (push) Successful in 33s
CI / build (push) Successful in 12s
CI / e2e (push) Failing after 6m35s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
- search.js : le dropdown d autocomplete ne se rouvre plus 500ms apres un hide (la recherche le rouvrait et bloquait les clics toolbar - test Forge) - ui.js + pane-manager.js : le split via menu contextuel ne transfert plus l onglet en synchrone (vidait le pane source -> auto-collapse -> grid disparu) - split-view.spec.js : navigation clavier attend la copie asynchrone (setTimeout 150ms qui reactivait pane 0) - split-view.spec.js : drag depuis l arbre via dragTo (drag natif HTML5)
This commit is contained in:
@@ -542,17 +542,12 @@ function createPaneTabManager(paneId) {
|
|||||||
if (action === 'splitRight') {
|
if (action === 'splitRight') {
|
||||||
if (pm && pm._hasAnyTab()) {
|
if (pm && pm._hasAnyTab()) {
|
||||||
pm.splitRight();
|
pm.splitRight();
|
||||||
// Transfer this specific tab to the new pane
|
|
||||||
const newPaneId = pm.panes.length - 1;
|
|
||||||
pm.transferTab(this.paneId, tabId, newPaneId);
|
|
||||||
menu.remove(); return;
|
menu.remove(); return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (action === 'splitDown') {
|
else if (action === 'splitDown') {
|
||||||
if (pm && pm._hasAnyTab()) {
|
if (pm && pm._hasAnyTab()) {
|
||||||
pm.splitDown();
|
pm.splitDown();
|
||||||
const newPaneId = pm.panes.length - 1;
|
|
||||||
pm.transferTab(this.paneId, tabId, newPaneId);
|
|
||||||
menu.remove(); return;
|
menu.remove(); return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -179,6 +179,9 @@ export const AutocompleteDropdown = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
show() {
|
show() {
|
||||||
|
// Après un hide() récent (ex: recherche lancée), on ignore le re-show
|
||||||
|
// du fetch de suggestions en attente — sinon le dropdown recouvre l'UI.
|
||||||
|
if (this._suppressShowUntil && Date.now() < this._suppressShowUntil) return;
|
||||||
if (this._dropdown) this._dropdown.hidden = false;
|
if (this._dropdown) this._dropdown.hidden = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -186,6 +189,7 @@ export const AutocompleteDropdown = {
|
|||||||
if (this._dropdown) this._dropdown.hidden = true;
|
if (this._dropdown) this._dropdown.hidden = true;
|
||||||
state.dropdownActiveIndex = -1;
|
state.dropdownActiveIndex = -1;
|
||||||
state.dropdownItems = [];
|
state.dropdownItems = [];
|
||||||
|
this._suppressShowUntil = Date.now() + 500;
|
||||||
},
|
},
|
||||||
|
|
||||||
isVisible() {
|
isVisible() {
|
||||||
|
|||||||
@@ -2355,16 +2355,12 @@ export const TabManager = {
|
|||||||
if (action === "splitRight") {
|
if (action === "splitRight") {
|
||||||
if (window.PaneManager && window.PaneManager._hasAnyTab && window.PaneManager._hasAnyTab()) {
|
if (window.PaneManager && window.PaneManager._hasAnyTab && window.PaneManager._hasAnyTab()) {
|
||||||
window.PaneManager.splitRight();
|
window.PaneManager.splitRight();
|
||||||
const newPaneId = window.PaneManager.panes.length - 1;
|
|
||||||
window.PaneManager.transferTab(0, tabId, newPaneId);
|
|
||||||
menu.remove(); return;
|
menu.remove(); return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (action === "splitDown") {
|
else if (action === "splitDown") {
|
||||||
if (window.PaneManager && window.PaneManager._hasAnyTab && window.PaneManager._hasAnyTab()) {
|
if (window.PaneManager && window.PaneManager._hasAnyTab && window.PaneManager._hasAnyTab()) {
|
||||||
window.PaneManager.splitDown();
|
window.PaneManager.splitDown();
|
||||||
const newPaneId = window.PaneManager.panes.length - 1;
|
|
||||||
window.PaneManager.transferTab(0, tabId, newPaneId);
|
|
||||||
menu.remove(); return;
|
menu.remove(); return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,20 +235,13 @@ test.describe('Split View — Tab Drag & Drop', () => {
|
|||||||
// Find a tree item
|
// Find a tree item
|
||||||
const treeItem = page.locator('.tree-item[data-path="note2.md"]').first();
|
const treeItem = page.locator('.tree-item[data-path="note2.md"]').first();
|
||||||
if (await treeItem.isVisible()) {
|
if (await treeItem.isVisible()) {
|
||||||
// Drag from tree to pane 1's content area
|
// Drag from tree to pane 1's content area (dragTo = drag natif HTML5)
|
||||||
const targetPane = page.locator('.pane-container').nth(1);
|
const targetPane = page.locator('.pane-container').nth(1);
|
||||||
const targetContent = targetPane.locator('.content-area');
|
const targetContent = targetPane.locator('.content-area');
|
||||||
|
try {
|
||||||
const treeBox = await treeItem.boundingBox();
|
await treeItem.dragTo(targetContent, { timeout: 5000 });
|
||||||
const targetBox = await targetContent.boundingBox();
|
|
||||||
|
|
||||||
if (treeBox && targetBox) {
|
|
||||||
await page.mouse.move(treeBox.x + treeBox.width / 2, treeBox.y + treeBox.height / 2);
|
|
||||||
await page.mouse.down();
|
|
||||||
await page.mouse.move(targetBox.x + targetBox.width / 2, targetBox.y + targetBox.height / 2, { steps: 10 });
|
|
||||||
await page.mouse.up();
|
|
||||||
await page.waitForTimeout(500);
|
await page.waitForTimeout(500);
|
||||||
}
|
} catch (e) { /* drag not delivered — assertion below will fail */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pane 1 should have a tab now
|
// Pane 1 should have a tab now
|
||||||
@@ -403,6 +396,9 @@ test.describe('Split View — Keyboard Navigation', () => {
|
|||||||
await openFile(page, 'TestVault', 'note2.md');
|
await openFile(page, 'TestVault', 'note2.md');
|
||||||
await page.keyboard.press('Control+Alt+\\');
|
await page.keyboard.press('Control+Alt+\\');
|
||||||
await page.waitForSelector('.pane-grid', { timeout: 3000 });
|
await page.waitForSelector('.pane-grid', { timeout: 3000 });
|
||||||
|
// Laisser la copie asynchrone de l'onglet actif se terminer (setTimeout 150ms
|
||||||
|
// dans _copyActiveTabToNewPane) — sinon elle réactive le pane 0 après la navigation.
|
||||||
|
await page.waitForTimeout(600);
|
||||||
|
|
||||||
// Pane 0 should be active initially
|
// Pane 0 should be active initially
|
||||||
const pane0 = page.locator('.pane-container').nth(0);
|
const pane0 = page.locator('.pane-container').nth(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user