|
| 1 | +/** |
| 2 | + * Regression: #2888 standardized the deprecated `/wheels/mcp` HTTP transport's |
| 3 | + * doc pointer on the live integration guide |
| 4 | + * (`https://guides.wheels.dev/v4-0-0/command-line-tools/mcp-integration`), |
| 5 | + * but three runtime-visible strings still cite a phantom path that has |
| 6 | + * never existed in the repo: |
| 7 | + * |
| 8 | + * - vendor/wheels/public/views/mcp.cfm (deprecation log message) |
| 9 | + * - vendor/wheels/public/mcp/McpServer.cfc (CLI-disabled-tool error) |
| 10 | + * - cli/src/commands/wheels/mcp/setup.cfc (legacy CommandBox CLI output) |
| 11 | + * |
| 12 | + * The phantom path is `docs/command-line-tools/commands/mcp/mcp-configuration-guide.md`. |
| 13 | + * Issue ##3016. |
| 14 | + */ |
| 15 | +component extends="wheels.WheelsTest" { |
| 16 | + |
| 17 | + function run() { |
| 18 | + |
| 19 | + describe("MCP deprecation pointers cite the live integration guide", () => { |
| 20 | + |
| 21 | + // expandPath("/wheels") resolves to vendor/wheels via the configured |
| 22 | + // Lucee mapping; the repo root is two levels above. |
| 23 | + var repoRoot = expandPath("/wheels/../.."); |
| 24 | + var phantomPath = "docs/command-line-tools/commands/mcp/mcp-configuration-guide.md"; |
| 25 | + var canonical = "https://guides.wheels.dev/v4-0-0/command-line-tools/mcp-integration"; |
| 26 | + var targets = [ |
| 27 | + "vendor/wheels/public/views/mcp.cfm", |
| 28 | + "vendor/wheels/public/mcp/McpServer.cfc", |
| 29 | + "cli/src/commands/wheels/mcp/setup.cfc" |
| 30 | + ]; |
| 31 | + |
| 32 | + for (var rel in targets) { |
| 33 | + // Capture the loop variable so the closure body binds the |
| 34 | + // current value, not the final iteration's value. |
| 35 | + (function(relPath) { |
| 36 | + it("references " & canonical & " in " & relPath, () => { |
| 37 | + var absolute = repoRoot & "/" & relPath; |
| 38 | + expect(fileExists(absolute)).toBeTrue("Missing file: " & absolute); |
| 39 | + |
| 40 | + var content = fileRead(absolute); |
| 41 | + |
| 42 | + expect(content contains canonical).toBeTrue( |
| 43 | + relPath & " should reference " & canonical |
| 44 | + & " — the URL ##2888 standardized on for the deprecated /wheels/mcp transport." |
| 45 | + ); |
| 46 | + |
| 47 | + expect(content contains phantomPath).toBeFalse( |
| 48 | + relPath & " still references the phantom path " & phantomPath |
| 49 | + & " that has never existed in the repo." |
| 50 | + ); |
| 51 | + }); |
| 52 | + })(rel); |
| 53 | + } |
| 54 | + |
| 55 | + }); |
| 56 | + |
| 57 | + } |
| 58 | + |
| 59 | +} |
0 commit comments