feat: native diff surface — QuickDiff + cowriting-baseline: provider + Review Changes + status bar (spec §6.4, INV-13)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import * as assert from "node:assert";
|
||||
import * as vscode from "vscode";
|
||||
import { activateApi, settle } from "./helpers";
|
||||
|
||||
async function api() {
|
||||
const ext = vscode.extensions.getExtension("benstull.vscode-cowriting-plugin")!;
|
||||
@@ -17,4 +18,18 @@ suite("coediting registry (PUC-7)", () => {
|
||||
await vscode.commands.executeCommand("cowriting.stopCoediting");
|
||||
assert.strictEqual(coeditingRegistry.isCoediting(doc.uri), false);
|
||||
});
|
||||
|
||||
// Task 3 (INV-10): a document that was never entered into coediting gets no
|
||||
// native-diff surface at all. QuickDiff's `provideOriginalResource` isn't
|
||||
// directly queryable from a host-E2E test, so this asserts the gate INPUTS
|
||||
// structurally: `isCoediting` stays false and the SCM change count — which
|
||||
// `ScmSurfaceController` only ever populates for a coediting doc — stays 0.
|
||||
test("non-entered doc: no coediting, no change count (structural, INV-10)", async () => {
|
||||
const api = await activateApi();
|
||||
const doc = await vscode.workspace.openTextDocument({ language: "markdown", content: "untouched\n" });
|
||||
await vscode.window.showTextDocument(doc);
|
||||
await settle();
|
||||
assert.strictEqual(api.coeditingRegistry.isCoediting(doc.uri), false);
|
||||
assert.strictEqual(api.scmSurfaceController.changeCount(doc.uri.toString()), 0);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user