MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / openCalendarView

Function openCalendarView

e2e/tasknotes.spec.ts:8324–8356  ·  view source on GitHub ↗
(page: Page)

Source from the content-addressed store, hash-verified

8322test.describe('Issue #1425 - Calendar auto-refresh on time entry and pomodoro updates', () => {
8323 // Helper to open calendar view
8324 async function openCalendarView(page: Page): Promise<void> {
8325 await ensureSidebarExpanded(page);
8326
8327 // First expand TaskNotes folder if collapsed
8328 const tasknotesFolder = page.locator('.nav-folder-title').filter({ hasText: /^TaskNotes$/ }).first();
8329 if (await tasknotesFolder.isVisible({ timeout: 5000 }).catch(() => false)) {
8330 const parentFolder = tasknotesFolder.locator('xpath=ancestor::div[contains(@class, "nav-folder")][1]');
8331 const isTasknotesCollapsed = await parentFolder.evaluate(el => el.classList.contains('is-collapsed')).catch(() => true);
8332 if (isTasknotesCollapsed) {
8333 await tasknotesFolder.click();
8334 await page.waitForTimeout(500);
8335 }
8336 }
8337
8338 // Then expand Views folder if collapsed
8339 const viewsFolder = page.locator('.nav-folder-title').filter({ hasText: /^Views$/ });
8340 if (await viewsFolder.isVisible({ timeout: 5000 }).catch(() => false)) {
8341 const parentFolder = viewsFolder.locator('xpath=ancestor::div[contains(@class, "nav-folder")][1]');
8342 const isViewsCollapsed = await parentFolder.evaluate(el => el.classList.contains('is-collapsed')).catch(() => true);
8343 if (isViewsCollapsed) {
8344 await viewsFolder.click();
8345 await page.waitForTimeout(500);
8346 }
8347 }
8348
8349 // Click on calendar-default.base file to open it
8350 const calendarFile = page.locator('.nav-file-title').filter({ hasText: /calendar-default/ }).first();
8351 await calendarFile.click();
8352 await page.waitForTimeout(1000);
8353
8354 // Wait for calendar to be rendered
8355 await expect(page.locator('.fc-view-harness')).toBeVisible({ timeout: 10000 });
8356 }
8357
8358 test.fixme('calendar should refresh immediately when time entries are saved', async () => {
8359 // Issue #1425: Time entry edits should trigger immediate calendar refresh

Callers 1

tasknotes.spec.tsFile · 0.85

Calls 2

ensureSidebarExpandedFunction · 0.85
containsMethod · 0.80

Tested by

no test coverage detected