fix(e2e): split-view - openFile ouvre via l arbre sidebar (TabManager/onglets)
- le deep-link #file= ouvre l ancien viewer sans onglets (#tab-bar absent) - le clic sur un tree-item passe par TabManager.openPreview/openPersistent
This commit is contained in:
@@ -32,8 +32,17 @@ async function login(page) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function openFile(page, vault, filePath) {
|
async function openFile(page, vault, filePath) {
|
||||||
// Deep-link supporté par l'app : #file=Vault:Path (lu à l'initialisation)
|
// Ouvre via l'arbre sidebar : le clic passe par TabManager (système d'onglets).
|
||||||
await page.goto(`/#file=${encodeURIComponent(vault)}:${encodeURIComponent(filePath)}`);
|
// Le deep-link #file= ouvre l'ancien viewer sans onglets — inutilisable ici.
|
||||||
|
await page.goto('/');
|
||||||
|
await page.waitForTimeout(300);
|
||||||
|
const vaultItem = page.locator(`.vault-item[data-vault="${vault}"]`);
|
||||||
|
if (await vaultItem.count() > 0) {
|
||||||
|
await vaultItem.click();
|
||||||
|
await page.waitForTimeout(700);
|
||||||
|
}
|
||||||
|
const treeItem = page.locator(`.tree-item[data-vault="${vault}"][data-path="${filePath}"]`);
|
||||||
|
await treeItem.click({ timeout: 5000 });
|
||||||
await page.waitForTimeout(500);
|
await page.waitForTimeout(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user