From 03f66cc0c16979745e1c82ce387acc12fe91782e Mon Sep 17 00:00:00 2001 From: sstent Date: Sat, 21 Feb 2026 09:20:48 -0800 Subject: [PATCH] chore(conductor): Add new track 'Testing Infrastructure' --- conductor/tracks.md | 5 ++++ .../testing_infrastructure_20260219/index.md | 5 ++++ .../metadata.json | 8 ++++++ .../testing_infrastructure_20260219/plan.md | 27 +++++++++++++++++++ .../testing_infrastructure_20260219/spec.md | 26 ++++++++++++++++++ 5 files changed, 71 insertions(+) create mode 100644 conductor/tracks/testing_infrastructure_20260219/index.md create mode 100644 conductor/tracks/testing_infrastructure_20260219/metadata.json create mode 100644 conductor/tracks/testing_infrastructure_20260219/plan.md create mode 100644 conductor/tracks/testing_infrastructure_20260219/spec.md diff --git a/conductor/tracks.md b/conductor/tracks.md index 9b4fd64..00c026d 100644 --- a/conductor/tracks.md +++ b/conductor/tracks.md @@ -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/)* diff --git a/conductor/tracks/testing_infrastructure_20260219/index.md b/conductor/tracks/testing_infrastructure_20260219/index.md new file mode 100644 index 0000000..07c0540 --- /dev/null +++ b/conductor/tracks/testing_infrastructure_20260219/index.md @@ -0,0 +1,5 @@ +# Track testing_infrastructure_20260219 Context + +- [Specification](./spec.md) +- [Implementation Plan](./plan.md) +- [Metadata](./metadata.json) diff --git a/conductor/tracks/testing_infrastructure_20260219/metadata.json b/conductor/tracks/testing_infrastructure_20260219/metadata.json new file mode 100644 index 0000000..99807c9 --- /dev/null +++ b/conductor/tracks/testing_infrastructure_20260219/metadata.json @@ -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." +} diff --git a/conductor/tracks/testing_infrastructure_20260219/plan.md b/conductor/tracks/testing_infrastructure_20260219/plan.md new file mode 100644 index 0000000..3ea9e87 --- /dev/null +++ b/conductor/tracks/testing_infrastructure_20260219/plan.md @@ -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) diff --git a/conductor/tracks/testing_infrastructure_20260219/spec.md b/conductor/tracks/testing_infrastructure_20260219/spec.md new file mode 100644 index 0000000..703d923 --- /dev/null +++ b/conductor/tracks/testing_infrastructure_20260219/spec.md @@ -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.