selftest: ONEDRIVE-SELFTEST phase, proven against the real OneDrive sync root
New phase chained after UPDATE-SELFTEST (so a full SHOTDECK_PICKER_SELFTEST chain now prints all five PASS lines) and also runnable standalone via REDLINE_SELFTEST_PHASE=onedrive, since the harness has no other per-phase selector. Points TransportSettings at a NEW "Redline-selftest-<Dubai timestamp>" folder under the real /Users/.../OneDrive-MMDGROUP sync root (never a fake home tree — that proves the transport against the actual OneDrive file provider), drives a seeded session through the OneDrive branch of send(anchor: nil), asserts the PDF landed, the session archived, and the status starts with "Saved to OneDrive", then confirms the watcher does NOT report the fresh unmarked PDF as returned. It then adds a real PDFKit ink annotation to that PDF in place — what the iPad does — saves it, and confirms the watcher now reports it as commented. Prints "ONEDRIVE-SELFTEST PASS path=<folder>". Never deletes anything under OneDrive; the created folder and PDF are left in place. UserDefaults.standard's transport/oneDriveFolder keys are snapshotted and restored around the phase, the same pattern runRegionPersistPhase already uses for CaptureRegion — there is no separate defaults-suite threading through AppModel/send(), so this is the only way to drive the real send() path without leaving the real app pointed at the selftest folder afterward. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ZiTXPbPCSjzPVsfoweAbp
This commit is contained in:
@@ -7,6 +7,9 @@ import ShotdeckCore
|
||||
if ProcessInfo.processInfo.environment["SHOTDECK_SNAPSHOT_DIR"] != nil {
|
||||
MainActor.assumeIsolated { PanelSnapshot.runIfRequested() }
|
||||
}
|
||||
if ProcessInfo.processInfo.environment["REDLINE_SELFTEST_PHASE"] == "onedrive" {
|
||||
MainActor.assumeIsolated { PickerSelfTest.runOneDriveOnlyIfRequested() }
|
||||
}
|
||||
if ProcessInfo.processInfo.environment["SHOTDECK_PICKER_SELFTEST"] != nil {
|
||||
MainActor.assumeIsolated { PickerSelfTest.runIfRequested() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user