Commit graph

43 commits

Author SHA1 Message Date
callumalpass
d12978aee1 test(#1261): add failing tests for double scrollbar in embedded task list
Add Playwright tests to reproduce the double scrollbar issue when a task
list base view is embedded in a note and the note is placed in a sidebar.

Tests are marked as .fixme() to document the expected behavior:
- Embedded task list should not create independent scrollable region
- When in sidebar, only one scrollbar should be active

Also adds test fixture file with embedded base view for testing.
2026-01-06 22:40:28 +11:00
callumalpass
1dfa695a2c test(#1436): Add failing tests for task card widget injection error in reading mode
Add Playwright e2e tests for issue #1436 which reports:
- Error: "Failed to execute 'insertBefore' on 'Node'" when injecting
  task card widget in reading mode
- Duplicate widgets accumulating on note refocus/refresh

Root cause identified: querySelector() finds nested .metadata-container
elements whose nextSibling is not a direct child of the sizer element,
causing insertBefore to fail.

Tests are marked as fixme() pending the bug fix.
2026-01-06 20:07:52 +11:00
callumalpass
28471697e7 test(#1419): Enable tests for custom status/priority persistence
Unskips the specification tests now that the fix (6f917b1e) has been
applied. Tests verify that custom statuses and priorities persist
after closing and reopening the settings modal.
2026-01-06 00:44:44 +11:00
callumalpass
effbe4d504 test(#1430): Add failing tests for Modal Fields property ID display bug
Add unit and e2e tests documenting the bug where Modal Fields tab
displays internal field IDs (e.g., "field_1735011234") instead of the
customized property keys (e.g., "propID") for user fields.

Root cause: FieldManagerComponent.ts:187 displays `ID: ${field.id}`
for all fields, but user fields should show the property key from
the corresponding UserMappedField.key.

Tests added:
- Unit test demonstrating expected vs buggy behavior
- e2e test (fixme) that creates a user field and verifies display
2026-01-06 00:05:38 +11:00
callumalpass
13a91f5bca test(#1425): Add skipped tests for calendar auto-refresh on time entry/pomodoro changes
Documents expected behavior for Issue #1425 feature request:
- Calendar should refresh immediately when time entries are saved
- Calendar should refresh immediately when Pomodoro session completes
- Added prerequisite test for time entry toggle visibility

Tests are marked as .fixme pending implementation of the feature.
2026-01-04 11:25:02 +11:00
callumalpass
62eb7d0e53 test: Add skipped tests documenting Issue #1423 project UI refresh bug
Documents the bug where project cards don't refresh when subtasks are removed.
The deleted subtask remains visible in the expanded subtask list, and if the
last subtask is removed the parent still renders as a project until a full
view reload.

Root cause: ProjectSubtasksService uses a 30-second TTL-based cache
(INDEX_TTL = 30000) with no event-driven invalidation when subtasks
are deleted or their projects field is modified.

Tests cover:
- Subtask should disappear from expanded list when deleted
- Parent should revert to normal card when last subtask is deleted
- Project index should invalidate when subtask projects field is modified
- Task list view should refresh when subtask is deleted (cross-view issue)

Issue #1423
2026-01-04 09:59:41 +11:00
callumalpass
9347063300 test: Add skipped tests documenting Issue #1419 settings persistence bug
Add Playwright tests that document the bug where custom task statuses
and priorities don't persist after closing and reopening settings.
User reports that after updating to 4.2.0, adding new custom statuses
or priorities results in values being lost when settings are closed.

Tests are marked as skipped pending investigation of root cause.
2026-01-03 21:11:39 +11:00
callumalpass
dc8dda9b25 test: Add skipped tests documenting Issue #1293 feature request
Adds Playwright tests for the incomplete task rollover feature.
These tests document the expected behavior and will pass once
the feature is implemented.
2026-01-02 11:00:51 +11:00
callumalpass
89b9171400 test: Add skipped tests documenting Issue #1299 feature request
Add e2e tests for the feature request to create a new command that
combines "Create or open task" with automatic time tracking start.

Tests cover:
- Command existence check
- Time tracking start after selecting existing task
- Time tracking start after creating new task
- Bonus feature: optional time entry description prompt

Tests are marked as skipped until the feature is implemented.
2026-01-02 10:49:54 +11:00
callumalpass
1ac74a5042 test: Add failing test for Issue #1411 agenda sort bug (duplicate of #1331)
Issue #1411 reports that the Agenda view ignores sort configuration,
keeping tasks sorted alphabetically by title instead of by status/priority.

This is a duplicate of Issue #1331. Added a `test.fixme` test that:
- Opens the agenda-default view
- Verifies tasks are incorrectly sorted alphabetically
- Documents the expected behavior (sort by status then priority)
2026-01-02 10:45:50 +11:00
callumalpass
8ae42ab4bb test: Add failing tests for Issue #1216 (hide relationships widget when empty)
Add Playwright tests that document the expected behavior for the feature
request to show the Relationships widget only when relationships exist.

Tests cover:
- Hide widget on notes with no relationships when setting enabled
- Show widget on notes WITH relationships regardless of setting
- Verify new relationshipsDisplayMode setting exists with three options

All tests are marked as test.fixme() since the feature is not yet implemented.
2026-01-01 18:09:43 +11:00
callumalpass
6468199f7f test: Add failing test for Issue #1252 (iPad date picker selection)
Adds Playwright e2e tests documenting the iPad calendar date picker bug
where selecting a date shows the animation but doesn't apply the selection.

The test uses iPad viewport dimensions (820x1180) and mobile emulation to
replicate the issue. The main test is marked as `test.fixme()` since it
documents the bug behavior.

Root cause identified: The native HTML5 date input (<input type="date">)
in DateTimePickerModal has known issues on iOS/iPadOS Safari where touch
events in modal contexts don't properly register date selection.

Affected files:
- src/modals/DateTimePickerModal.ts
- styles/date-picker.css

Fixes #1252
2026-01-01 17:58:25 +11:00
callumalpass
c23427e8e7 test: Add failing test for Issue #1297 (mobile create footer click)
The TaskSelectorWithCreate modal footer shows "Create: [Task Name]" but
is not clickable. This blocks mobile users who cannot use Shift+Enter.

The test.fixme test documents the bug: clicking the footer should create
the task but currently does nothing. A second test verifies the footer
appears with the keyboard hint, documenting current behavior.
2026-01-01 17:54:29 +11:00
callumalpass
3fd1cd4496 test(e2e): add failing tests for issue #144 - open note in new tab
Add E2E tests documenting the expected behavior for Cmd+click on tasks:
- Cmd+click on calendar task should open note in new tab
- Cmd+click on sidebar task should open note in new tab
- Cmd+click on task card should open note in new tab
- Cmd+click should open immediately without 250ms delay
- Context menu should have "Open note in new tab" option

Tests are marked as fixme since the feature is not yet implemented.

Refs #144
2026-01-01 16:31:03 +11:00
callumalpass
9decc37dd5 test(e2e): add failing tests for issue #1328 - add task to calendar from agenda view
Add three Playwright e2e tests (marked as fixme) documenting the feature request
to add tasks to the calendar from the agenda view:

1. Test for drag-and-drop: Verifies if events in the agenda (listWeek) view
   are draggable for scheduling tasks to specific dates/times

2. Test for context menu: Checks for a dedicated "Add to calendar" or
   "Schedule..." option in the right-click context menu

3. Test for week view drag: Tests switching from agenda to week view and
   dragging events to reschedule them

These tests will fail until the feature is implemented, documenting the
expected behavior for issue #1328.
2026-01-01 11:23:16 +11:00
callumalpass
913d3102e3 test(e2e): add failing tests for issue #1329 - relationships widget gap
Add e2e tests that verify the relationships widget appears close to note
content without excessive gap. The tests measure the pixel distance between
the content bottom and widget top, expecting it to be less than 100px.

Tests document the bug where the DOM manipulation approach appends the
widget to .cm-sizer container end rather than positioning relative to the
actual content, causing a large gap that makes the widget not visible.

Includes tests for both live preview and reading mode.
2026-01-01 11:17:38 +11:00
callumalpass
aff6274521 test(e2e): add failing tests for issue #1330 - calendar week view performance
Add Playwright E2E tests that document and reproduce the slow initial
load time for the Advanced Calendar week view (8-10 seconds vs expected
<2 seconds).

Tests cover:
- Overall load time performance measurement
- Progressive rendering expectations
- Lazy loading of external calendar events

All tests marked as fixme until the performance issue is resolved.
2026-01-01 11:13:50 +11:00
callumalpass
c080290338 test(e2e): add failing tests for issue #1331 - agenda view sorting/grouping
Add three test.fixme() tests documenting the bug where agenda view
(CalendarView in listWeek mode) ignores Bases sort/group configuration
that works correctly in the Tasks view (TaskListView).

Tests added:
- agenda view should respect sort configuration
- agenda view should respect groupBy configuration
- agenda view should sort tasks within each day by priority

Root cause: FullCalendar's list view only supports date grouping and
time-based sorting. The CalendarView never retrieves or applies the
Bases sortBy/groupBy configuration to calendar events.

Fixes #1331
2026-01-01 11:09:28 +11:00
callumalpass
4b6e71fb44 test(e2e): add failing tests for issue #1339 - expanded subtasks toggle
Add e2e tests documenting the feature request for always-expanded
subtasks in list views and improved chevron visibility/accessibility.

Tests cover:
- Setting for "always expand subtasks" in Appearance tab
- Auto-expansion of subtasks when setting is enabled
- Chevron icon size (currently 14px, should be 24px+ for accessibility)
- Chevron visibility without hover (currently opacity: 0)
- Persistence of expanded state across view refreshes
2026-01-01 10:15:38 +11:00
callumalpass
1e6b4c1b7a test(e2e): add failing tests for issue #1340 - task edit modal autosave
Add E2E tests documenting the expected behavior for the autosave feature request.
Tests use .fixme() to mark as pending implementation.

Tests cover:
- Autosave option in plugin settings
- Automatic save after debounce delay
- Save status indicator during autosave
- Debouncing rapid changes into single save
- Compatibility with manual save button/shortcut
- No unsaved changes dialog when autosave is active
2026-01-01 10:10:44 +11:00
callumalpass
7415665f5f test(e2e): add failing tests for issue #1345 - task popup button visibility
Add E2E test that verifies modal buttons are visible without scrolling.
The test uses .fixme() to document the bug where the task edit modal
requires scrolling to see action buttons at the bottom.
2026-01-01 09:35:52 +11:00
callumalpass
5d6012e840 test(e2e): add failing tests for issue #1349 - nested checkbox alignment
Add failing E2E tests that document the bug where converting level 2+
checkboxes to tasks breaks alignment/indentation.

Tests cover:
- Level 2 checkbox conversion with 4-space indentation
- Tab-based indentation preservation
- Deep nesting (level 4) alignment
- Bullet style preservation (-, *, +)

All tests use test.fixme() as they document the expected behavior
that currently fails.

Issue: #1349
2026-01-01 09:28:23 +11:00
callumalpass
884b163bea test(e2e): add failing tests for issue #1350 - Reading View inline task refresh
Add tests documenting the bug where inline TaskNote widgets in Reading View
don't refresh after property updates. The markdown file updates correctly,
but the widget display remains stale until the file is closed and reopened.

Tests cover:
- Property updates (scheduled date) not refreshing inline widget display
- Status toggle changes not reflected visually
- Multiple instances of same task not refreshing together
- Contrast with Live Preview which does refresh correctly

Root cause: ReadingModeTaskLinkProcessor is a one-time post-processor with
no EVENT_TASK_UPDATED listeners, unlike TaskLinkOverlay.ts (Live Preview).
2026-01-01 09:23:23 +11:00
callumalpass
709c5e16aa test(e2e): add failing tests for issue #1351 - consolidate same-date events
Add test.fixme() tests documenting the expected behavior for #1351:
- Consolidate scheduled/due events when on same date into single event
- Show "Start/Due:" prefix for consolidated events
- Keep separate events when dates differ
- Handle same-day events with different times

Feature request: When both scheduled (start) and due dates fall on the
same day, currently two separate calendar events appear. This should
consolidate to a single event showing "Start/Due: Task" instead.

Fixes #1351
2026-01-01 09:17:45 +11:00
callumalpass
5a5a63d57a test(e2e): add failing tests for issue #1352 - preserve time on date update
Tests document the bug where time component is lost when using
date context menu increment operations (+1 day, -1 day, etc.).

Root cause: TaskCard.ts passes only getDatePart() to DateContextMenu,
stripping the time before addDaysToDateTime() can preserve it.
2026-01-01 09:11:48 +11:00
callumalpass
76992dc192 feat(modal): auto-enter vim insert mode in task creation modal (#1410)
When vim keybindings are enabled in Obsidian, the task creation modal
now automatically enters insert mode on first focus, allowing users
to start typing immediately without pressing 'i' first.

Changes:
- Added enterVimInsertMode option to EmbeddableMarkdownEditor
- Added enterVimInsertMode() method that uses Obsidian's internal
  CodeMirrorAdapter.Vim API to programmatically enter insert mode
- TaskCreationModal enables this option for the NLP markdown editor

Thanks to @Leo310 for the feature request.
2026-01-01 09:08:45 +11:00
callumalpass
41f14c05a4 test(e2e): add failing tests for issue #1409 - popout window bugs
Document the bug where Calendar, Agenda, and Kanban views don't work
properly in Obsidian popout/new windows. Tests cover:

- Calendar drag-and-drop broken in popout (also related to #979)
- Task modal buttons unclickable in popout
- Agenda view interactions broken in popout
- Kanban drag-and-drop broken in popout

Root cause: Direct `document` access in view code references the main
window's document instead of the popout window's document.

Fix approach: Replace `document` with `element.ownerDocument` or
`this.contentEl.ownerDocument.defaultView` pattern.

All tests marked as test.fixme() since they document known bugs.
2026-01-01 09:05:23 +11:00
callumalpass
61b8e6cf24 test(e2e): document additional UI issues from exploration
Add test.fixme() tests documenting UI issues discovered during UI exploration:
- Narrow viewport causes calendar task badges to be unreadable
- Mobile view mode selector buttons are cramped
- Create task modal icon buttons have no text labels
- Pomodoro statistics layout when showing zeros

Also add passing tests for:
- Agenda view task metadata display
- Calendar month view event visibility
2026-01-01 06:08:26 +11:00
callumalpass
86f30dae5c test(e2e): add documentation test for issue #1410 - vim insert mode in task modal
Documents feature request for task creation modal to default to vim insert
mode when vim keybindings are enabled. Uses test.fixme() pattern since vim
mode is an Obsidian-level setting that would affect all e2e tests if enabled.
2026-01-01 01:36:19 +11:00
callumalpass
045b05e065 test(e2e): document UI issues and fix pomodoro button affordance
- Add 5 new test.fixme() tests documenting discovered UI issues:
  - Kanban columns showing empty space instead of task cards
  - Create task modal icons lacking text labels
  - Year view task badges truncated and unreadable
  - Edit modal DETAILS placeholder with low contrast
  - (Fixed) Pomodoro timer +/- buttons lacking visual affordance

- Fix pomodoro timer duration adjustment buttons:
  - Add visible background and border styling
  - Add hover state with accent color border
  - Add font-weight and cursor pointer for better UX

- Fix flaky e2e tests by adding timeout catches for click operations
2026-01-01 00:15:46 +11:00
callumalpass
a8b7825b6f test(e2e): update draggable test to match #1036 fix
The test was checking that due events are NOT draggable, but commit
6f0d456b changed this behavior to allow due dates to be dragged in
calendar view. Updated test to verify due events ARE draggable.
2025-12-31 18:12:45 +11:00
callumalpass
7e77d1a5df test(e2e): add failing test for issue #1337 - convert note to task default values
Documents the bug where "Convert current note to task" command ignores
user-configured default values when set to empty strings ("None" option).

Root cause: The || operator in src/main.ts:2210-2211 treats empty strings
as falsy, causing fallback to hardcoded defaults instead of user settings.

Issue: #1337
2025-12-31 16:00:18 +11:00
callumalpass
51a659b1a7 test(e2e): add tests for priority color issues in calendar view (#1036)
Add Playwright tests documenting priority coloring behavior in calendar:
- Scheduled events with priority border colors
- Due events with priority-based border and fill colors
- Draggability verification (scheduled=yes, due=no by design)
- Tests for configured priority colors

Includes test.fixme() tests for known issues:
- Due event fill color not properly faded when CSS variable fallback used
- Priority color not updating when priority changes
2025-12-31 15:23:31 +11:00
callumalpass
d510e24b55 test(e2e): mark Pomodoro session tagging tests as fixme (#1342)
These tests document the expected behavior for the unimplemented
Pomodoro session tagging feature (issue #1342). Marking them as
test.fixme() allows the test suite to pass while keeping the
feature requirements documented as executable specifications.
2025-12-31 14:13:41 +11:00
callumalpass
f987e2f46b test(e2e): add failing tests for Pomodoro session tagging (#1342)
Add E2E tests that verify the expected behavior for the optional tagging
system feature request. These tests currently fail because the feature
doesn't exist yet - they will pass once the tagging UI is implemented.

Tests cover:
- Tag input visibility in pomodoro timer view
- Adding tags to a pomodoro session
- Tag breakdown in pomodoro statistics
2025-12-31 13:31:41 +11:00
callumalpass
fddea5dc63 test(e2e): add mobile mode test suite
Tests core functionality with Obsidian's mobile emulation enabled
and a narrow viewport (390x844). Verifies commands, calendar view,
task modal, and kanban board work correctly in mobile mode.
2025-12-31 13:12:18 +11:00
callumalpass
a4041d310e fix(e2e): improve test reliability with sidebar expansion and instance reuse
- Add ability to connect to existing Obsidian instance for faster test runs
- Add ensureSidebarExpanded helper to handle collapsed sidebar state
- Fix expandViewsFolder to properly expand both TaskNotes and Views folders
- Add Escape key presses to close dropdowns before sidebar navigation
- Initialize calendar view before opening Base views that depend on it
- Use command palette "Toggle left sidebar" as fallback for expanding sidebar
2025-12-31 12:46:33 +11:00
callumalpass
6907dea27a test(tags): add failing tests for #1347 hierarchical tag coloring
Add test cases verifying tag element structure for compatibility with
external plugins like Colored Tags. Tests check that hierarchical tags
(e.g., #project/frontend) have correct href attributes and are
observable by MutationObserver.

Also adds test task with hierarchical tags to the e2e vault.
2025-12-31 12:14:25 +11:00
callumalpass
0377579fbf test(e2e): improve kanban test reliability
Use command palette to open kanban view instead of clicking file directly.
Add handling for "view not found" errors that can occur when Bases plugin
modifies files during test runs.
2025-12-31 11:46:26 +11:00
callumalpass
55d4b90bf2 test(e2e): add comprehensive UI interaction tests
Add 32 new tests covering:
- Task Edit Modal: opening, tabs, metadata, notes area
- Date Picker Interactions: due date, scheduled date, natural language
- Tag and Project Editing: suggestions, selectors, display
- Filter Panel: status filters, priority filters, indicators
- Properties Panel: column options, visibility toggles
- Sort Options: dropdown, sort by due date/priority
- Task Quick Actions: command palette actions, time tracking selector
- Task Status: status options, checkbox interactions
- Recurrence: options modal, calendar indicators
- Time Tracking: edit modal section, timer controls
- Reminder: options in task modal
- Task Dependencies: relationships view, modal section

Also fix modal cleanup in "show all tabs" test to prevent timing issues.
2025-12-31 09:34:43 +11:00
callumalpass
ab0de426d0 fix(e2e): handle page closure gracefully in year view test
Wrap screenshot operations in try-catch to prevent test failure when
the browser page closes unexpectedly during screenshot capture.
2025-12-31 09:34:09 +11:00
callumalpass
9370f76526 test: improve E2E test infrastructure and reliability
- Use obsidian:// URI protocol for vault opening
- Add isolated OBSIDIAN_CONFIG_DIR for E2E tests
- Improve trust/plugin dialog handling with multiple button variants
- Add TaskNotes plugin verification via command palette
- Refactor tests to use single shared Obsidian instance
- Fix button selectors to use FullCalendar class names
- Add npm scripts for documentation screenshots
2025-12-31 09:34:09 +11:00
callumalpass
b4a1c63ed8 chore: add E2E test scripts and Playwright configuration
- Add e2e-setup.sh for downloading and unpacking Obsidian AppImage
- Add e2e-launch.sh for launching Obsidian with test vault
- Add playwright.config.ts with Electron test configuration
- Add initial E2E test structure in e2e/ directory
2025-12-31 09:34:09 +11:00