(page: Page, relativePath: string)
| 224 | } |
| 225 | |
| 226 | async function openTaskListByPath(page: Page, relativePath: string): Promise<void> { |
| 227 | await openFileByPath(page, relativePath); |
| 228 | const activeLeaf = page.locator(".workspace-leaf.mod-active").first(); |
| 229 | await activeLeaf.waitFor({ state: "visible", timeout: 10000 }); |
| 230 | const hasRenderableList = await activeLeaf |
| 231 | .locator('.task-list-view, [data-type="tasknotesTaskList"], .task-card, [class*="bases"]') |
| 232 | .first() |
| 233 | .isVisible({ timeout: 3000 }) |
| 234 | .catch(() => false); |
| 235 | if (!hasRenderableList) { |
| 236 | await page.waitForTimeout(1200); |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | async function openCalendarByPath(page: Page, relativePath: string): Promise<void> { |
| 241 | await openFileByPath(page, relativePath); |
no test coverage detected