chore(conductor): Add new track 'Testing Infrastructure'

This commit is contained in:
2026-02-21 09:20:48 -08:00
parent d318cec008
commit 03f66cc0c1
5 changed files with 71 additions and 0 deletions

View File

@@ -26,3 +26,8 @@ This file tracks all major tracks for the project. Each track has its own detail
- [x] **Track: Fix SyntaxError: Invalid weekday string: [object Object] by implementing a generic recursive RRULE formatter.**
*Link: [./tracks/rrule_generic_formatter_20260219/](./tracks/rrule_generic_formatter_20260219/)*
---
- [ ] **Track: Implement Playwright and Dockerized testing infrastructure with real ICS data samples.**
*Link: [./tracks/testing_infrastructure_20260219/](./tracks/testing_infrastructure_20260219/)*

View File

@@ -0,0 +1,5 @@
# Track testing_infrastructure_20260219 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)

View File

@@ -0,0 +1,8 @@
{
"track_id": "testing_infrastructure_20260219",
"type": "chore",
"status": "new",
"created_at": "2026-02-19T00:00:00Z",
"updated_at": "2026-02-19T00:00:00Z",
"description": "Implement Playwright and Dockerized testing infrastructure with real ICS data samples."
}

View File

@@ -0,0 +1,27 @@
# Implementation Plan - Testing Infrastructure
## Phase 1: Environment & Mock Server
- [ ] Task: Scaffold Docker environment
- [ ] Create test_data/ directory.
- [ ] Create docker-compose.test.yml with SilverBullet and an Nginx container serving test_data/.
- [ ] Task: Integration Test Scaffolding
- [ ] Create tests/integration_test.ts that uses the actual ts-ics parser on files in test_data/.
- [ ] Task: Conductor - User Manual Verification 'Environment & Mock Server' (Protocol in workflow.md)
## Phase 2: Playwright E2E Setup
- [ ] Task: Initialize Playwright
- [ ] Setup Playwright with necessary configurations for Docker (headless, CI mode).
- [ ] Task: Implement sync smoke test
- [ ] Create tests/e2e/sync.spec.ts.
- [ ] Automate login, plug installation (icalendar.plug.js), and triggering the "iCalendar: Sync" command.
- [ ] Implement console listener to fail on Error or TypeError.
- [ ] Task: Conductor - User Manual Verification 'Playwright E2E Setup' (Protocol in workflow.md)
## Phase 3: Validation & Bug Fix
- [ ] Task: Verify Infrastructure against current bug
- [ ] Add the problematic .ics to test_data/.
- [ ] Confirm that E2E and Integration tests fail with Unknown RRULE property 'WORKWEEKSTART'.
- [ ] Task: Implement Fix for WORKWEEKSTART
- [ ] Update RRULE_KEY_MAP in icalendar.ts.
- [ ] Run tests again to confirm they pass.
- [ ] Task: Conductor - User Manual Verification 'Validation & Bug Fix' (Protocol in workflow.md)

View File

@@ -0,0 +1,26 @@
# Specification: Testing Infrastructure (Playwright & Docker)
## Overview
Our current testing strategy relies on manual mocks that don't capture the complexity of real-world iCalendar data (specifically from Outlook/Office 365). This has led to multiple regressions where object-type RRULE properties cause the plug to fail. This track implements a full E2E and integration testing suite using Docker, Playwright, and real .ics samples.
## Functional Requirements
- **Dockerized Environment:** A docker-compose.test.yml that spins up:
- **SilverBullet:** A clean instance for plug installation.
- **Mock ICS Server:** A simple web server serving files from a test_data/ directory.
- **Playwright E2E Suite:**
- **Automation:** Automates logging into SilverBullet, installing the freshly built icalendar.plug.js, and triggering a sync.
- **Console Monitoring:** Automatically fails the test if any Error or TypeError is detected in the browser console.
- **Index Verification:** Uses SilverBullet syscalls (via Playwright evaluate) or UI queries to verify that the expected number of ical-event objects exist in the index.
- **Real-Data Integration Tests:** Deno unit tests that parse actual .ics files (e.g. mock_calendar.ics) using the real ts-ics parser before calling expandRecurrences.
## Implementation Steps
1. Environment Setup: Create docker-compose.test.yml and a test_data/ directory with at least one problematic Outlook .ics file.
2. Mock Server: Configure a lightweight container (e.g., Nginx or Python) to serve the test_data/.
3. Playwright Scaffolding: Initialize Playwright and create a tests/sync.spec.ts that handles authentication and plug installation.
4. Verification Logic: Implement the console-listener and index-counting logic in the test suite.
5. Smoke Test: Fix the known WORKWEEKSTART error and verify that the new infrastructure catches it if the fix is reverted.
## Acceptance Criteria
- [ ] A single command (e.g., make test-e2e) builds the plug, starts the containers, and runs the Playwright suite.
- [ ] The E2E suite successfully identifies the WORKWEEKSTART error when run against the current (buggy) code.
- [ ] The E2E suite passes after the WORKWEEKSTART fix is applied.