diff --git a/CLAUDE.md b/CLAUDE.md index fc71f27e0..8a0c451c7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -68,7 +68,7 @@ The full suite exercises real Visio COM calls with no mock/fake layer. CI runs o - **Releases:** NuGet `VisioAutomation2010` **3.1.0** (tag `VisioAutomation_3.1.0`) and Visio PowerShell module **4.7.3** (tag `VisioPS_4.7.3`) shipped on 2026-09-30. The Release-build change for the NuGet flow ([#181](https://github.com/saveenr/VisioAutomation/issues/181)) is done and closed. - **Repo:** `master` at `92dec356` (PRs up to #227 merged), no open PRs, working trees clean. The older `claude/*` and `experiment/linq-shapesheet` branches are leftovers from earlier sessions. - **Unreleased changes** (`NuGet/CHANGELOG.md` and the module's `CHANGELOG.md`, `[Unreleased]`; `Get-VisioPage -ID` is now a real page ID and `-Index` takes positions, [#232](https://github.com/saveenr/VisioAutomation/issues/232)): the first tier of [#225](https://github.com/saveenr/VisioAutomation/issues/225) is Added (more directed graph XML options: ``, shape `width`/`height`, ``, ``, typed ``, and per-connector `connectortype`, `` and ``); the rest is Fixed: `DrawDataTable` honors widths and heights, `DrawDataTableModel` draws on the target page, `DrawXmlModel` roots the tree at the document element and now has an undo scope, `DrawDirectedGraphDocument` honors its `DirectedGraphStyling`, and `DrawOrgChart` no longer resizes the page you pass it. The next version is not decided; these are fixes only, so a patch release is the likely fit. -- **Tests:** 337 tests across four projects (VTest 108, VTest.Models 104, VTest.Scripting 43, VTest.PowerShell 82). The last full Release run (256) was on 2026-09-30; the newest tests are the regression tests for [#197](https://github.com/saveenr/VisioAutomation/issues/197), [#222](https://github.com/saveenr/VisioAutomation/issues/222) and [#219](https://github.com/saveenr/VisioAutomation/issues/219), the 23 tests in `DirectedGraphXmlOptionsTests` for [#225](https://github.com/saveenr/VisioAutomation/issues/225), and the 46 cmdlet-binding tests of the second slice of [#173](https://github.com/saveenr/VisioAutomation/issues/173). +- **Tests:** 344 tests across four projects (VTest 108, VTest.Models 104, VTest.Scripting 48, VTest.PowerShell 84). The last full Release run (256) was on 2026-09-30; the newest tests are the regression tests for [#197](https://github.com/saveenr/VisioAutomation/issues/197), [#222](https://github.com/saveenr/VisioAutomation/issues/222) and [#219](https://github.com/saveenr/VisioAutomation/issues/219), the 23 tests in `DirectedGraphXmlOptionsTests` for [#225](https://github.com/saveenr/VisioAutomation/issues/225), and the 46 cmdlet-binding tests of the second slice of [#173](https://github.com/saveenr/VisioAutomation/issues/173). - **Docs:** the .NET GitBook's Diagram models section was reorganized on 2026-10-01 (docs repo PRs 8 and 9, live). Every model page now has a "Where the output goes" section; the DOM page has a render performance page beneath it. The 2026-09 entries on the docs-updates page record each change. The "Models docs follow-ups" entry in [`docs/futures/docs.md`](docs/futures/docs.md) lists which doc statements to revisit when each source issue below is decided, and the release-gated "unreleased" notes to turn into version statements at the next release. The [#219](https://github.com/saveenr/VisioAutomation/issues/219) fix and the new directed graph XML options ([#225](https://github.com/saveenr/VisioAutomation/issues/225)) are described in the docs as unreleased changes after 3.1.0; the fixes for [#197](https://github.com/saveenr/VisioAutomation/issues/197) and [#222](https://github.com/saveenr/VisioAutomation/issues/222) are not yet described. - **Docs conventions:** no em-dashes in either GitBook. The docs repos publish when a PR merges to `main`, and each PR gets a GitBook preview. Cite the issue number on any page that describes behavior an open issue may change. - **Docs viewer:** the local GitBook viewer now lives in its own private repo, `TheSevenPens/LocalGitbookviewer` (cloned at `C:/Users/savee/Documents/GitHub/LocalGitbookviewer`). Run `view.cmd ` from that checkout. Its backlog is in that repo's `BACKLOG.md`. @@ -187,7 +187,7 @@ Roughly in the order worth doing. Pick from the top. ([#219](https://github.com/ 1. **Decide the three public types with no real caller, together:** [#218](https://github.com/saveenr/VisioAutomation/issues/218) Box layout, [#220](https://github.com/saveenr/VisioAutomation/issues/220) form page model, [#221](https://github.com/saveenr/VisioAutomation/issues/221) `ContainerLayout` (draws plain rectangles; the `ContainerMaster` option is never read). The options are in each issue; the docs side of each is listed in the "Models docs follow-ups" backlog entry. 2. **Cut the next release when ready.** Versions are not decided (fixes only, so likely 3.1.1 and a PS module patch). The flow is in [`docs/futures/releases.md`](docs/futures/releases.md). At release time also turn the "unreleased" notes in both GitBooks into version statements and add the new versions to both version-compatibility pages. -3. **Design discussions, not yet quick:** [#223](https://github.com/saveenr/VisioAutomation/issues/223) `client.Model` draw methods are inconsistent, [#225](https://github.com/saveenr/VisioAutomation/issues/225) the rest of the directed graph XML options (the first tier shipped in the unreleased changes; per-edge master and stencil, renderer and styling from XML, and an XSD remain), [#229](https://github.com/saveenr/VisioAutomation/issues/229) `NewDocumentFromTemplate` does not base the document on the template (affects `New-VisioDocument -Template`), and [#198](https://github.com/saveenr/VisioAutomation/issues/198) / [#199](https://github.com/saveenr/VisioAutomation/issues/199) drawing a single directed graph onto the current page. +3. **Design discussions, not yet quick:** [#223](https://github.com/saveenr/VisioAutomation/issues/223) `client.Model` draw methods are inconsistent, [#225](https://github.com/saveenr/VisioAutomation/issues/225) the rest of the directed graph XML options (the first tier shipped in the unreleased changes; per-edge master and stencil, renderer and styling from XML, and an XSD remain), and [#198](https://github.com/saveenr/VisioAutomation/issues/198) / [#199](https://github.com/saveenr/VisioAutomation/issues/199) drawing a single directed graph onto the current page. 4. **Earlier backlog:** [#191](https://github.com/saveenr/VisioAutomation/issues/191) migrate cmdlets to `ThrowTerminatingError` (makes `InvokeScriptStrict` redundant), [#190](https://github.com/saveenr/VisioAutomation/issues/190) the `VTest.PowerShell` two-Client mismatch, [#183](https://github.com/saveenr/VisioAutomation/issues/183) VisioScripting dead-method removal (CY27Q1; re-verify zero callers first), [#173](https://github.com/saveenr/VisioAutomation/issues/173) more cmdlet-binding tests (the second slice covered 13 cmdlets; roughly 40 are still untested, see `docs/futures/test-coverage-gaps.md`), [#163](https://github.com/saveenr/VisioAutomation/issues/163) and [#164](https://github.com/saveenr/VisioAutomation/issues/164) (the `PSCmdlet` question; see the memory note on why cmdlets derive from `Cmdlet`). **Calendar-bound** diff --git a/NuGet/CHANGELOG.md b/NuGet/CHANGELOG.md index c8ed63570..40a873513 100644 --- a/NuGet/CHANGELOG.md +++ b/NuGet/CHANGELOG.md @@ -14,11 +14,12 @@ The format follows [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/ ### Added - More of the directed graph model can now be set from the directed graph XML format. Every addition is optional, so existing XML loads as before. Part of [#225](https://github.com/saveenr/VisioAutomation/issues/225): - - `` as a child of `` sets `DirectedGraphDocument.Template` and `BorderSize`. If only one border attribute is given, the other keeps its default. (`Template` is passed to `NewDocumentFromTemplate`, which currently opens the template as a docked stencil instead of basing the drawing on it; see [#229](https://github.com/saveenr/VisioAutomation/issues/229).) + - `` as a child of `` sets `DirectedGraphDocument.Template` and `BorderSize`. If only one border attribute is given, the other keeps its default. - On ``: `width` and `height` (both or neither) set the node `Size`; `` children add hyperlinks (the `url` attribute's link stays first); a `` child sets any cell of `VisioAutomation.Models.Dom.ShapeCells` by property name (for example `FillForeground`, `LineColor`, `CharSize`); and `` takes optional `type` (`string`, `number`, `boolean` or `date`), `label`, `prompt` and `format` attributes. - On ``: a per-edge `connectortype` that overrides the page setting, a `` child (explicit cells win over the `color`, `weight` and arrow defaults), and `` children. ### Fixed +- `Client.Document.NewDocumentFromTemplate` now creates the drawing from the template (Visio's `AddEx` with no flags): the drawing gets the template's page setup, styles and settings, and the stencils in the template's workspace are opened and docked. Previously it created a blank drawing and opened the template as a separate docked stencil (an empty one in Visio 2013 and later), so the drawing was not based on the template. This is what `New-VisioDocument -Template` and a directed graph document's `Template` (the XML ``) use. A null, empty or whitespace template still gives a blank drawing; a template file that does not exist throws without leaving a stray blank drawing; and passing a stencil (`.vss` or `.vssx`) now throws an `ArgumentException` that says so, before anything is created (it used to fail with an opaque COM error after leaving a blank drawing open). Closes [#229](https://github.com/saveenr/VisioAutomation/issues/229). - `Client.Page.SetFormatCells` now writes the page format cells to the page sheet. Previously it committed them to the `Page` object, which always threw a `COMException`, so `Format-VisioPage -Width` / `-Height` could not work. Found by the cmdlet-binding tests ([#173](https://github.com/saveenr/VisioAutomation/issues/173)). - `HyperlinkHelper.Add` (and so `Client.Hyperlink.AddHyperlink`) now applies the `NewWindow`, `Default`, `Invisible` and `SortKey` cells of the `HyperlinkCells` it is given. Previously it ignored them, so the cells always stayed `FALSE` (or unset). - `Client.Model.DrawOrgChart`, and so `Out-VisioApplication -OrgChart`, no longer resizes the page passed as its `TargetPage`. The chart is drawn in a new document, and each of its pages is already sized by the render, but the call also resized the caller's own page to fit its contents, which shrank that page for no reason. The `TargetPage` now only supplies the application. Closes [#219](https://github.com/saveenr/VisioAutomation/issues/219). diff --git a/VisioAutomation_2010/VTest.Models/DirectedGraphXmlOptionsTests.cs b/VisioAutomation_2010/VTest.Models/DirectedGraphXmlOptionsTests.cs index 5cb5cb74f..f03278bcc 100644 --- a/VisioAutomation_2010/VTest.Models/DirectedGraphXmlOptionsTests.cs +++ b/VisioAutomation_2010/VTest.Models/DirectedGraphXmlOptionsTests.cs @@ -296,11 +296,10 @@ public void Draw_DocumentBorderFromXml_ChangesThePageSize() } [MUT.TestMethod] - public void Draw_DocumentTemplateFromXml_IsAcceptedAndTheGraphStillDraws() + public void Draw_DocumentTemplateFromXml_CreatesTheDrawingFromThatTemplate() { - // DirectedGraphDocument.Template goes to NewDocumentFromTemplate, which currently opens the template as a - // docked stencil and returns a blank document instead of basing the document on it (#229). This test only - // checks that the option is accepted and the graph is still drawn. + // Regression (#229): the template used to be opened as a docked stencil beside a blank drawing, + // so the drawing was not based on it. var client = this.GetScriptingClient(); string template = client.Application.ApplicationVersion.Major >= 15 ? "basflo_u.vstx" : "basflo_u.vst"; @@ -308,7 +307,9 @@ public void Draw_DocumentTemplateFromXml_IsAcceptedAndTheGraphStillDraws() var shape = dgdoc.Layouts[0].Nodes["n1"].VisioShape; MUT.Assert.IsNotNull(shape); - shape.ContainingPage.Document.Close(true); + var doc = shape.ContainingPage.Document; + MUT.Assert.IsTrue(doc.Template.ToLowerInvariant().Contains("basflo_u"), "the drawing should be based on the template: '" + doc.Template + "'"); + doc.Close(true); } private double draw_and_get_page_width(string xml) diff --git a/VisioAutomation_2010/VTest.PowerShell/DocumentWindowCmdletBindingTests.cs b/VisioAutomation_2010/VTest.PowerShell/DocumentWindowCmdletBindingTests.cs index b4f67f03d..212b5e146 100644 --- a/VisioAutomation_2010/VTest.PowerShell/DocumentWindowCmdletBindingTests.cs +++ b/VisioAutomation_2010/VTest.PowerShell/DocumentWindowCmdletBindingTests.cs @@ -62,6 +62,26 @@ public void GetVisioDocument_ActiveDocumentWithName_FailsToResolveAParameterSet( MUT.StringAssert.Contains(CmdletScriptExtensions.MessageOf(ex), "Parameter set cannot be resolved"); } + // -- New-VisioDocument: -Template creates the drawing from the template (#229) --------------- + + [MUT.TestMethod] + public void NewVisioDocument_Template_CreatesTheDrawingFromThatTemplate() + { + var results = DocumentWindowCmdletBindingTests.Session.InvokeScriptStrict( + "$ver = (Get-VisioApplication).Version; " + + "$name = if ([int]($ver -split '[.,]')[0] -ge 15) { 'basflo_u.vstx' } else { 'basflo_u.vst' }; " + + "$d = New-VisioDocument -Template $name; " + + "try { $d.Template } finally { try { $d.Saved = $true; $d.Close() } catch { } }"); + MUT.Assert.IsTrue(results.Single().ToLowerInvariant().Contains("basflo_u"), "the new drawing should be based on the template: '" + results.Single() + "'"); + } + + [MUT.TestMethod] + public void NewVisioDocument_TemplateThatIsAStencil_FailsWithAClearMessage() + { + var ex = DocumentWindowCmdletBindingTests.Session.ExpectFailureInNewDocument("New-VisioDocument -Template 'basic_u.vss'"); + MUT.StringAssert.Contains(CmdletScriptExtensions.MessageOf(ex), "is a stencil, not a template"); + } + // -- Format-VisioWindow: three parameter sets ---------------------------------- [MUT.TestMethod] diff --git a/VisioAutomation_2010/VTest.Scripting/DocumentTests.cs b/VisioAutomation_2010/VTest.Scripting/DocumentTests.cs index cfbe27c9e..542c3d702 100644 --- a/VisioAutomation_2010/VTest.Scripting/DocumentTests.cs +++ b/VisioAutomation_2010/VTest.Scripting/DocumentTests.cs @@ -1,4 +1,5 @@ using MUT=Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Linq; using VisioAutomation.Extensions; namespace VTest.Scripting @@ -28,5 +29,112 @@ public void ActivateDocument_AmongMultipleOpenDocs_UpdatesActiveDocument() doc2.Close(true); doc3.Close(true); } + + // -- NewDocumentFromTemplate (#229) ------------------------------------------------------ + // Visio 2013 and later ship XML templates (.vstx); older versions ship binary ones (.vst). + + private static string flowchart_template(VisioScripting.Client client) + { + return client.Application.ApplicationVersion.Major >= 15 ? "basflo_u.vstx" : "basflo_u.vst"; + } + + private static int count_empty_stencils(Microsoft.Office.Interop.Visio.Application app) + { + // A document that is a stencil and holds no masters is the stray window the old code left behind + return app.Documents.Cast().Count( + d => d.Type == Microsoft.Office.Interop.Visio.VisDocumentTypes.visTypeStencil && d.Masters.Count == 0); + } + + [MUT.TestMethod] + public void NewDocumentFromTemplate_RealTemplate_CreatesTheDocumentFromTheTemplate() + { + // Regression: the template was opened as a docked stencil next to a blank drawing, so the + // drawing was not based on it and an empty stencil was left open. + var client = this.GetScriptingClient(); + var app = client.Application.GetApplication(); + int empty_stencils_before = count_empty_stencils(app); + + var doc = client.Document.NewDocumentFromTemplate(flowchart_template(client)); + + MUT.Assert.AreEqual(Microsoft.Office.Interop.Visio.VisDocumentTypes.visTypeDrawing, doc.Type); + MUT.Assert.IsTrue(doc.Template.ToLowerInvariant().Contains("basflo_u"), "the drawing should be based on the template: '" + doc.Template + "'"); + MUT.Assert.AreEqual(empty_stencils_before, count_empty_stencils(app), "no empty stencil should be left open"); + + doc.Close(true); + } + + [MUT.TestMethod] + public void NewDocumentFromTemplate_NullTemplate_CreatesABlankDrawing() + { + var client = this.GetScriptingClient(); + var app = client.Application.GetApplication(); + int docs_before = app.Documents.Count; + + var doc = client.Document.NewDocumentFromTemplate(null); + + MUT.Assert.AreEqual(Microsoft.Office.Interop.Visio.VisDocumentTypes.visTypeDrawing, doc.Type); + MUT.Assert.AreEqual(string.Empty, doc.Template); + MUT.Assert.AreEqual(docs_before + 1, app.Documents.Count, "exactly one document should be added"); + + doc.Close(true); + } + + [MUT.TestMethod] + public void NewDocumentFromTemplate_EmptyOrWhitespaceTemplate_CreatesABlankDrawing() + { + var client = this.GetScriptingClient(); + var app = client.Application.GetApplication(); + + foreach (string template in new[] { "", " " }) + { + int docs_before = app.Documents.Count; + var doc = client.Document.NewDocumentFromTemplate(template); + + MUT.Assert.AreEqual(Microsoft.Office.Interop.Visio.VisDocumentTypes.visTypeDrawing, doc.Type); + MUT.Assert.AreEqual(docs_before + 1, app.Documents.Count, "exactly one document should be added for '" + template + "'"); + + doc.Close(true); + } + } + + [MUT.TestMethod] + public void NewDocumentFromTemplate_StencilFile_ThrowsAndCreatesNoDocument() + { + // A stencil is not a template. The old code threw an opaque COM error after leaving a blank drawing open. + var client = this.GetScriptingClient(); + var app = client.Application.GetApplication(); + + foreach (string stencil in new[] { "basic_u.vss", "BASIC_U.VSSX", @"C:\Stencils\mine.vssx" }) + { + int docs_before = app.Documents.Count; + + var ex = MUT.Assert.ThrowsExactly( + () => client.Document.NewDocumentFromTemplate(stencil)); + + MUT.StringAssert.Contains(ex.Message.ToLowerInvariant(), "stencil"); + MUT.Assert.AreEqual(docs_before, app.Documents.Count, "no document should be created for '" + stencil + "'"); + } + } + + [MUT.TestMethod] + public void NewDocumentFromTemplate_MissingTemplate_ThrowsAndCreatesNoDocument() + { + var client = this.GetScriptingClient(); + var app = client.Application.GetApplication(); + int docs_before = app.Documents.Count; + + bool threw = false; + try + { + client.Document.NewDocumentFromTemplate("no_such_template_for_vtest.vstx"); + } + catch (System.Exception) + { + threw = true; + } + + MUT.Assert.IsTrue(threw, "a template that does not exist should throw"); + MUT.Assert.AreEqual(docs_before, app.Documents.Count, "no stray blank drawing should be left open"); + } } } \ No newline at end of file diff --git a/VisioAutomation_2010/VisioPowerShell/CHANGELOG.md b/VisioAutomation_2010/VisioPowerShell/CHANGELOG.md index 745ab381b..856371a5d 100644 --- a/VisioAutomation_2010/VisioPowerShell/CHANGELOG.md +++ b/VisioAutomation_2010/VisioPowerShell/CHANGELOG.md @@ -19,6 +19,7 @@ The format follows [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/ - **Behavior change:** `Get-VisioPage -ID` now looks pages up by their real Visio page ID (`Page.ID`), as its documentation always said and as `Get-VisioShape -ID` does for shapes. Previously the numbers were silently treated as positions in the document, so a real ID gave the wrong page or threw (`-ID 0` threw although the first page of a new document has ID 0). **Scripts that used `-ID` as a position should switch to `-Index`**, which takes the same 1-based numbers the old behavior accepted. The `PageID` column of `Get-VisioPageCells` is now directly usable with `Get-VisioPage -ID`. Closes [#232](https://github.com/saveenr/VisioAutomation/issues/232). ### Fixed +- `New-VisioDocument -Template` now creates the new document from the template, as its documentation says. Previously the cmdlet created a blank drawing and opened the template as a separate docked stencil (an empty one in Visio 2013 and later), so the drawing was not based on the template. The template's page setup, styles and settings now apply and its stencils open and dock automatically. Passing a stencil (`.vss` or `.vssx`) to `-Template` now fails with a message that says it is a stencil and points to `-Stencil`; use `-Stencil` to open stencils. Closes [#229](https://github.com/saveenr/VisioAutomation/issues/229). - `Format-VisioPage -Width` and `-Height` now work. Previously the cmdlet always threw a `COMException` when either was given, because the page format cells were written to the page object instead of its page sheet. (`-Orientation`, `-FitContents` and the other parameters were not affected.) - `New-VisioHyperlink -NewWindow`, `-Default`, `-Invisible` and `-SortKey` now take effect. Previously the cmdlet accepted them and ignored them, so those hyperlink cells always stayed `FALSE` (or unset). diff --git a/VisioAutomation_2010/VisioScripting/Commands/DocumentCommands.cs b/VisioAutomation_2010/VisioScripting/Commands/DocumentCommands.cs index ecb1c8786..9ce0d68ea 100644 --- a/VisioAutomation_2010/VisioScripting/Commands/DocumentCommands.cs +++ b/VisioAutomation_2010/VisioScripting/Commands/DocumentCommands.cs @@ -160,24 +160,40 @@ public IVisio.Document NewDocumentFromTemplate(string template) { var cmdtarget = this._client.GetCommandTarget(CommandTargetFlags.RequireApplication); - this._client.Output.WriteVerbose("Creating Empty Drawing"); var documents = cmdtarget.Application.Documents; - - if (template == null) + + // No template (null, empty or whitespace): a blank drawing + if (string.IsNullOrWhiteSpace(template)) { - var doc = documents.Add(string.Empty); - return doc; + this._client.Output.WriteVerbose("Creating Empty Drawing"); + return documents.Add(string.Empty); } - else - { - var doc = documents.Add(string.Empty); - var template_doc = documents.AddEx(template, IVisio.VisMeasurementSystem.visMSDefault, - (int)IVisio.VisOpenSaveArgs.visAddStencil + - (int)IVisio.VisOpenSaveArgs.visOpenDocked, - 0); - return doc; + template = template.Trim(); + + // A stencil is not a template. Handing one to AddEx fails with an opaque COM error, so say what is wrong + // before anything is created. + if (DocumentCommands._is_stencil_file(template)) + { + string msg = string.Format( + System.Globalization.CultureInfo.InvariantCulture, + "\"{0}\" is a stencil, not a template. Templates end in .vst or .vstx. To open a stencil, use OpenStencilDocument (New-VisioDocument -Stencil).", + template); + throw new System.ArgumentException(msg, nameof(template)); } + + // A real template: Visio creates a drawing based on it, copies its styles and settings, and opens the + // stencils in the template's workspace. (The document used to be created blank and the template opened + // beside it as a docked stencil, which left the drawing unrelated to the template; see #229.) + this._client.Output.WriteVerbose("Creating a drawing from template \"{0}\"", template); + var doc = documents.AddEx(template, IVisio.VisMeasurementSystem.visMSDefault, 0, 0); + return doc; + } + + private static bool _is_stencil_file(string filename) + { + return filename.EndsWith(".vss", System.StringComparison.OrdinalIgnoreCase) + || filename.EndsWith(".vssx", System.StringComparison.OrdinalIgnoreCase); } public void SaveDocument(TargetDocument targetdoc) diff --git a/docs/TESTING.md b/docs/TESTING.md index 299146a6d..f8890b842 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -10,10 +10,10 @@ All under `VisioAutomation_2010/`: |---|---:|---|---| | `VTest` | 108 | `VisioAutomation` (core) | [VTest/README.md](../VisioAutomation_2010/VTest/README.md) | | `VTest.Models` | 104 | `VisioAutomation.Models` (DOM, layouts) | [VTest.Models/README.md](../VisioAutomation_2010/VTest.Models/README.md) | -| `VTest.Scripting` | 43 | `VisioScripting` (high-level facade) | [VTest.Scripting/README.md](../VisioAutomation_2010/VTest.Scripting/README.md) | -| `VTest.PowerShell` | 82 | `VisioPowerShell` (cmdlets) | [VTest.PowerShell/README.md](../VisioAutomation_2010/VTest.PowerShell/README.md) | +| `VTest.Scripting` | 48 | `VisioScripting` (high-level facade) | [VTest.Scripting/README.md](../VisioAutomation_2010/VTest.Scripting/README.md) | +| `VTest.PowerShell` | 84 | `VisioPowerShell` (cmdlets) | [VTest.PowerShell/README.md](../VisioAutomation_2010/VTest.PowerShell/README.md) | -256 tests passed with no skips on 2026-09-30 (Release build of `master` at `581ad539`). Three regression tests (`DrawXmlModel_IsUndoneByASingleUndo`, `DrawDirectedGraphDocument_UsesTheEdgeMasterFromTheStylingParameter` and `DrawOrgChart_DrawsInANewDocumentAndLeavesTheTargetPageAlone`) and the 23 tests in `DirectedGraphXmlOptionsTests` have since been added to `VTest.Models`; Debug runs of `VTest.Models`, `VTest.Scripting` and `VTest.PowerShell` on 2026-10-01 passed 104, 43 and 27 tests; the PowerShell project has since grown to 82 tests (second slice of cmdlet-binding tests and the `Get-VisioPage -ID` / `-Index` tests, [#232](https://github.com/saveenr/VisioAutomation/issues/232)). Counts come from the Release TRX. [HANDOVER.md](HANDOVER.md) records the environment and the original evidence, taken at 237 tests on 2026-09-29. +256 tests passed with no skips on 2026-09-30 (Release build of `master` at `581ad539`). Three regression tests (`DrawXmlModel_IsUndoneByASingleUndo`, `DrawDirectedGraphDocument_UsesTheEdgeMasterFromTheStylingParameter` and `DrawOrgChart_DrawsInANewDocumentAndLeavesTheTargetPageAlone`) and the 23 tests in `DirectedGraphXmlOptionsTests` have since been added to `VTest.Models`; Debug runs of `VTest.Models`, `VTest.Scripting` and `VTest.PowerShell` on 2026-10-01 passed 104, 43 and 27 tests; the PowerShell project has since grown to 84 tests (second slice of cmdlet-binding tests, the `Get-VisioPage -ID` / `-Index` tests, [#232](https://github.com/saveenr/VisioAutomation/issues/232), and the `New-VisioDocument -Template` tests, [#229](https://github.com/saveenr/VisioAutomation/issues/229)) and `VTest.Scripting` to 48 (the `NewDocumentFromTemplate` tests). Counts come from the Release TRX. [HANDOVER.md](HANDOVER.md) records the environment and the original evidence, taken at 237 tests on 2026-09-29. ## Framework: MSTest 4.x diff --git a/docs/futures/docs.md b/docs/futures/docs.md index 65e1c7a1a..343f451d3 100644 --- a/docs/futures/docs.md +++ b/docs/futures/docs.md @@ -62,7 +62,8 @@ Backlog of documentation items, both in-repo developer docs and the user-facing - **Decide whether `Models.Color`, `Models.Text` and `Models.Geometry` need pages** or are internal helpers. Only incidental mentions exist today. This one is not release-gated. - **Revisit the model pages as the source issues raised by the 2026-10 reorganization are decided.** The reorganized Diagram models section (merged to the docs repo in PR 8) states current behavior that these issues may change, so each page needs a second look when its issue is resolved: - [#218](https://github.com/saveenr/VisioAutomation/issues/218) Box layout: `models/box-geometry.md` (opening paragraph), the Box rows on `models/introduction.md`, and the Layout models overview. If Box is deprecated, removed or given a renderer, rewrite or remove the page. - - [#225](https://github.com/saveenr/VisioAutomation/issues/225) directed graph XML options (first tier done, unreleased): the XML format page marks each new element and attribute as an unreleased change after NuGet 3.1.0. Turn those notes into version statements at the next release, and revisit the "What's not supported in XML" list as the rest of the issue is done. The `template` option's caveat on that page depends on [#229](https://github.com/saveenr/VisioAutomation/issues/229). + - [#225](https://github.com/saveenr/VisioAutomation/issues/225) directed graph XML options (first tier done, unreleased): the XML format page marks each new element and attribute as an unreleased change after NuGet 3.1.0. Turn those notes into version statements at the next release, and revisit the "What's not supported in XML" list as the rest of the issue is done. The page's note on the `template` option was removed when [#229](https://github.com/saveenr/VisioAutomation/issues/229) was fixed. + - [#229](https://github.com/saveenr/VisioAutomation/issues/229) `NewDocumentFromTemplate` / `New-VisioDocument -Template` (fixed, unreleased): the XML format page's `template` note and the Visio PowerShell `new-visiodocument.md` page describe it as a change after NuGet 3.1.0 / module 4.7.3. Turn those notes into version statements at the next release. - [#232](https://github.com/saveenr/VisioAutomation/issues/232) `Get-VisioPage -ID` / `-Index` (fixed, unreleased): the Visio PowerShell docs page `cmdlets/pages/get-visiopage.md` and the 2026-10 entry on its `documentation-changes.md` describe it as a change after 4.7.3. Turn those notes into version statements when the next module release ships. - [#219](https://github.com/saveenr/VisioAutomation/issues/219) `DrawOrgChart` resized the wrong page (fixed, unreleased): the org chart page and the `DrawOrgChart` row on `visio-scripting/model.md` describe it as an unreleased change after NuGet 3.1.0. Turn those notes into version statements at the next release, together with the [#206](https://github.com/saveenr/VisioAutomation/issues/206) to [#208](https://github.com/saveenr/VisioAutomation/issues/208) notes above. - [#220](https://github.com/saveenr/VisioAutomation/issues/220) Form page model: the developer-commands line on `models/forms.md` and the VisioScripting remark on `models/documents.md`. If the model is demoted or made internal, the Document models page and its table of contents entry change.