retestkit 1.4.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -40
- package/dist/config.js +8 -8
- package/dist/config.js.map +1 -1
- package/dist/logger.js +1 -1
- package/dist/logger.js.map +1 -1
- package/dist/prompts/index.d.ts +1 -1
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +21 -21
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/templates/mcp/retest-crawl.md +7 -0
- package/{src/prompts/templates/mcp/webtest-discover-flows.md → dist/prompts/templates/mcp/retest-discover-flows.md} +1 -1
- package/{src/prompts/templates/mcp/webtest-discover.md → dist/prompts/templates/mcp/retest-discover.md} +2 -2
- package/dist/prompts/templates/mcp/retest-full-workflow.md +12 -0
- package/{src/prompts/templates/mcp/webtest-generate-tests.md → dist/prompts/templates/mcp/retest-generate-tests.md} +1 -1
- package/{src/prompts/templates/mcp/webtest-run-test.md → dist/prompts/templates/mcp/retest-run-test.md} +1 -1
- package/{src/prompts/templates/mcp/webtest-start.md → dist/prompts/templates/mcp/retest-start.md} +1 -1
- package/{src → dist}/prompts/templates/sampling/system-prefix.md +1 -1
- package/dist/resources/index.js +7 -7
- package/dist/resources/index.js.map +1 -1
- package/dist/schemas/config.js +2 -2
- package/dist/schemas/config.js.map +1 -1
- package/dist/security/index.js +1 -1
- package/dist/security/index.js.map +1 -1
- package/dist/server.js +3 -3
- package/dist/server.js.map +1 -1
- package/dist/test-utils/mock-context.js +22 -22
- package/dist/test-utils/mock-context.js.map +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +5 -5
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/retest/crawl.d.ts.map +1 -0
- package/dist/tools/{webtest → retest}/crawl.js +7 -7
- package/dist/tools/retest/crawl.js.map +1 -0
- package/dist/tools/retest/discover-features.d.ts.map +1 -0
- package/dist/tools/{webtest → retest}/discover-features.js +6 -6
- package/dist/tools/retest/discover-features.js.map +1 -0
- package/dist/tools/retest/discover-flows.d.ts.map +1 -0
- package/dist/tools/{webtest → retest}/discover-flows.js +6 -6
- package/dist/tools/retest/discover-flows.js.map +1 -0
- package/dist/tools/retest/generate-tests.d.ts.map +1 -0
- package/dist/tools/{webtest → retest}/generate-tests.js +5 -5
- package/dist/tools/retest/generate-tests.js.map +1 -0
- package/dist/tools/retest/index.d.ts.map +1 -0
- package/dist/tools/retest/index.js.map +1 -0
- package/dist/tools/retest/run-test-case.d.ts.map +1 -0
- package/dist/tools/{webtest → retest}/run-test-case.js +3 -3
- package/dist/tools/retest/run-test-case.js.map +1 -0
- package/dist/tools/retest/schemas.d.ts.map +1 -0
- package/dist/tools/retest/schemas.js.map +1 -0
- package/dist/tools/retest/start-analysis.d.ts.map +1 -0
- package/dist/tools/{webtest → retest}/start-analysis.js +5 -5
- package/dist/tools/retest/start-analysis.js.map +1 -0
- package/dist/workspace/index.js +8 -8
- package/dist/workspace/index.js.map +1 -1
- package/dist/workspace/types.d.ts +2 -2
- package/dist/workspace/types.d.ts.map +1 -1
- package/package.json +6 -2
- package/.claude/commands/openspec/apply.md +0 -23
- package/.claude/commands/openspec/archive.md +0 -27
- package/.claude/commands/openspec/proposal.md +0 -28
- package/.gemini/commands/openspec/apply.toml +0 -21
- package/.gemini/commands/openspec/archive.toml +0 -25
- package/.gemini/commands/openspec/proposal.toml +0 -26
- package/.github/prompts/openspec-apply.prompt.md +0 -22
- package/.github/prompts/openspec-archive.prompt.md +0 -26
- package/.github/prompts/openspec-proposal.prompt.md +0 -27
- package/.github/workflows/release.yml +0 -33
- package/.kilocode/workflows/openspec-apply.md +0 -17
- package/.kilocode/workflows/openspec-archive.md +0 -21
- package/.kilocode/workflows/openspec-proposal.md +0 -22
- package/.mcp.json +0 -23
- package/.opencode/command/openspec-apply.md +0 -25
- package/.opencode/command/openspec-archive.md +0 -28
- package/.opencode/command/openspec-proposal.md +0 -30
- package/.roo/commands/openspec-apply.md +0 -20
- package/.roo/commands/openspec-archive.md +0 -24
- package/.roo/commands/openspec-proposal.md +0 -25
- package/.vscode/mcp.json +0 -23
- package/AGENTS.md +0 -18
- package/CLAUDE.md +0 -18
- package/dist/tools/webtest/crawl.d.ts.map +0 -1
- package/dist/tools/webtest/crawl.js.map +0 -1
- package/dist/tools/webtest/discover-features.d.ts.map +0 -1
- package/dist/tools/webtest/discover-features.js.map +0 -1
- package/dist/tools/webtest/discover-flows.d.ts.map +0 -1
- package/dist/tools/webtest/discover-flows.js.map +0 -1
- package/dist/tools/webtest/generate-tests.d.ts.map +0 -1
- package/dist/tools/webtest/generate-tests.js.map +0 -1
- package/dist/tools/webtest/index.d.ts.map +0 -1
- package/dist/tools/webtest/index.js.map +0 -1
- package/dist/tools/webtest/run-test-case.d.ts.map +0 -1
- package/dist/tools/webtest/run-test-case.js.map +0 -1
- package/dist/tools/webtest/schemas.d.ts.map +0 -1
- package/dist/tools/webtest/schemas.js.map +0 -1
- package/dist/tools/webtest/start-analysis.d.ts.map +0 -1
- package/dist/tools/webtest/start-analysis.js.map +0 -1
- package/openspec/AGENTS.md +0 -456
- package/openspec/changes/archive/2025-12-18-add-hybrid-artifact-paths/proposal.md +0 -33
- package/openspec/changes/archive/2025-12-18-add-hybrid-artifact-paths/specs/webtest-resources/spec.md +0 -27
- package/openspec/changes/archive/2025-12-18-add-hybrid-artifact-paths/specs/webtest-tools/spec.md +0 -304
- package/openspec/changes/archive/2025-12-18-add-hybrid-artifact-paths/tasks.md +0 -43
- package/openspec/changes/archive/2025-12-18-add-mcp-server-foundation/design.md +0 -209
- package/openspec/changes/archive/2025-12-18-add-mcp-server-foundation/proposal.md +0 -41
- package/openspec/changes/archive/2025-12-18-add-mcp-server-foundation/specs/mcp-server-core/spec.md +0 -183
- package/openspec/changes/archive/2025-12-18-add-mcp-server-foundation/tasks.md +0 -112
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/design.md +0 -333
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/proposal.md +0 -66
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/specs/mcp-server-core/spec.md +0 -129
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/specs/webtest-lifecycle/spec.md +0 -138
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/specs/webtest-logging/spec.md +0 -211
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/specs/webtest-prompts/spec.md +0 -157
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/specs/webtest-resources/spec.md +0 -213
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/specs/webtest-sampling/spec.md +0 -257
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/specs/webtest-tools/spec.md +0 -501
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/tasks.md +0 -264
- package/openspec/changes/archive/2025-12-18-allow-analysis-of-incomplete-crawls/proposal.md +0 -24
- package/openspec/changes/archive/2025-12-18-allow-analysis-of-incomplete-crawls/specs/webtest-tools/spec.md +0 -80
- package/openspec/changes/archive/2025-12-18-allow-analysis-of-incomplete-crawls/tasks.md +0 -8
- package/openspec/changes/archive/2025-12-18-fix-crawl-loop-stability/design.md +0 -90
- package/openspec/changes/archive/2025-12-18-fix-crawl-loop-stability/proposal.md +0 -28
- package/openspec/changes/archive/2025-12-18-fix-crawl-loop-stability/specs/webtest-sampling/spec.md +0 -90
- package/openspec/changes/archive/2025-12-18-fix-crawl-loop-stability/tasks.md +0 -33
- package/openspec/changes/archive/2025-12-18-use-markdown-artifacts/design.md +0 -558
- package/openspec/changes/archive/2025-12-18-use-markdown-artifacts/proposal.md +0 -119
- package/openspec/changes/archive/2025-12-18-use-markdown-artifacts/specs/webtest-resources/spec.md +0 -109
- package/openspec/changes/archive/2025-12-18-use-markdown-artifacts/specs/webtest-tools/spec.md +0 -121
- package/openspec/changes/archive/2025-12-18-use-markdown-artifacts/tasks.md +0 -133
- package/openspec/changes/extract-prompts-to-markdown/design.md +0 -86
- package/openspec/changes/extract-prompts-to-markdown/proposal.md +0 -50
- package/openspec/changes/extract-prompts-to-markdown/specs/webtest-prompts/spec.md +0 -74
- package/openspec/changes/extract-prompts-to-markdown/tasks.md +0 -40
- package/openspec/changes/refactor-webtest-naming/design.md +0 -95
- package/openspec/changes/refactor-webtest-naming/proposal.md +0 -66
- package/openspec/changes/refactor-webtest-naming/specs/webtest-prompts/spec.md +0 -79
- package/openspec/changes/refactor-webtest-naming/specs/webtest-resources/spec.md +0 -80
- package/openspec/changes/refactor-webtest-naming/specs/webtest-sampling/spec.md +0 -122
- package/openspec/changes/refactor-webtest-naming/specs/webtest-tools/spec.md +0 -113
- package/openspec/changes/refactor-webtest-naming/tasks.md +0 -119
- package/openspec/changes/rename-package-to-retest/proposal.md +0 -52
- package/openspec/changes/rename-package-to-retest/specs/mcp-server-core/spec.md +0 -53
- package/openspec/changes/rename-package-to-retest/specs/retest-lifecycle/spec.md +0 -68
- package/openspec/changes/rename-package-to-retest/specs/retest-logging/spec.md +0 -35
- package/openspec/changes/rename-package-to-retest/specs/retest-prompts/spec.md +0 -159
- package/openspec/changes/rename-package-to-retest/specs/retest-resources/spec.md +0 -251
- package/openspec/changes/rename-package-to-retest/specs/retest-sampling/spec.md +0 -99
- package/openspec/changes/rename-package-to-retest/specs/retest-tools/spec.md +0 -295
- package/openspec/changes/rename-package-to-retest/tasks.md +0 -71
- package/openspec/project.md +0 -31
- package/openspec/specs/mcp-server-core/spec.md +0 -178
- package/openspec/specs/webtest-lifecycle/spec.md +0 -136
- package/openspec/specs/webtest-logging/spec.md +0 -209
- package/openspec/specs/webtest-prompts/spec.md +0 -155
- package/openspec/specs/webtest-resources/spec.md +0 -248
- package/openspec/specs/webtest-sampling/spec.md +0 -344
- package/openspec/specs/webtest-tools/spec.md +0 -282
- package/release.config.js +0 -9
- package/src/config.test.ts +0 -96
- package/src/config.ts +0 -32
- package/src/elicitation/index.test.ts +0 -399
- package/src/elicitation/index.ts +0 -171
- package/src/elicitation/types.ts +0 -68
- package/src/index.ts +0 -83
- package/src/lifecycle/index.test.ts +0 -260
- package/src/lifecycle/index.ts +0 -101
- package/src/logger.redaction.test.ts +0 -322
- package/src/logger.test.ts +0 -123
- package/src/logger.ts +0 -229
- package/src/playwright-client/index.ts +0 -392
- package/src/playwright-client/types.ts +0 -99
- package/src/progress/index.test.ts +0 -327
- package/src/progress/index.ts +0 -170
- package/src/progress/types.ts +0 -25
- package/src/prompts/index.test.ts +0 -451
- package/src/prompts/index.ts +0 -246
- package/src/prompts/loader.test.ts +0 -100
- package/src/prompts/loader.ts +0 -59
- package/src/prompts/templates/mcp/webtest-crawl.md +0 -7
- package/src/prompts/templates/mcp/webtest-full-workflow.md +0 -12
- package/src/resources/index.ts +0 -250
- package/src/resources/subscriptions.ts +0 -37
- package/src/sampling/index.test.ts +0 -414
- package/src/sampling/index.ts +0 -286
- package/src/sampling/prompts.ts +0 -194
- package/src/sampling/types.ts +0 -60
- package/src/schemas/config.ts +0 -39
- package/src/security/index.test.ts +0 -441
- package/src/security/index.ts +0 -361
- package/src/security/security-scenarios.test.ts +0 -468
- package/src/server.ts +0 -211
- package/src/test-utils/index.ts +0 -6
- package/src/test-utils/mock-context.ts +0 -426
- package/src/test-utils/mock-playwright-client.ts +0 -422
- package/src/tools/index.ts +0 -11
- package/src/tools/webtest/crawl.test.ts +0 -834
- package/src/tools/webtest/crawl.ts +0 -901
- package/src/tools/webtest/discover-features.ts +0 -412
- package/src/tools/webtest/discover-flows.ts +0 -408
- package/src/tools/webtest/generate-tests.test.ts +0 -532
- package/src/tools/webtest/generate-tests.ts +0 -425
- package/src/tools/webtest/index.ts +0 -7
- package/src/tools/webtest/integration.test.ts +0 -536
- package/src/tools/webtest/run-test-case.test.ts +0 -659
- package/src/tools/webtest/run-test-case.ts +0 -508
- package/src/tools/webtest/schemas.ts +0 -201
- package/src/tools/webtest/start-analysis.test.ts +0 -151
- package/src/tools/webtest/start-analysis.ts +0 -158
- package/src/transports/http.ts +0 -19
- package/src/transports/index.ts +0 -30
- package/src/transports/stdio.ts +0 -7
- package/src/types/capabilities.test.ts +0 -193
- package/src/types/capabilities.ts +0 -50
- package/src/types/context.ts +0 -21
- package/src/types/tool.ts +0 -11
- package/src/workspace/index.ts +0 -945
- package/src/workspace/markdown.ts +0 -272
- package/src/workspace/types.ts +0 -186
- package/tests/integration/server.test.ts +0 -89
- package/tests/integration/tools.test.ts +0 -99
- package/tsconfig.json +0 -20
- package/vitest.config.ts +0 -9
- package/vitest.integration.config.ts +0 -10
- /package/{src → dist}/prompts/templates/sampling/crawl-action.md +0 -0
- /package/{src → dist}/prompts/templates/sampling/feature-discovery.md +0 -0
- /package/{src → dist}/prompts/templates/sampling/flow-discovery.md +0 -0
- /package/{src → dist}/prompts/templates/sampling/page-content-wrapper.md +0 -0
- /package/{src → dist}/prompts/templates/sampling/test-evaluation.md +0 -0
- /package/{src → dist}/prompts/templates/sampling/test-generation.md +0 -0
- /package/dist/tools/{webtest → retest}/crawl.d.ts +0 -0
- /package/dist/tools/{webtest → retest}/discover-features.d.ts +0 -0
- /package/dist/tools/{webtest → retest}/discover-flows.d.ts +0 -0
- /package/dist/tools/{webtest → retest}/generate-tests.d.ts +0 -0
- /package/dist/tools/{webtest → retest}/index.d.ts +0 -0
- /package/dist/tools/{webtest → retest}/index.js +0 -0
- /package/dist/tools/{webtest → retest}/run-test-case.d.ts +0 -0
- /package/dist/tools/{webtest → retest}/schemas.d.ts +0 -0
- /package/dist/tools/{webtest → retest}/schemas.js +0 -0
- /package/dist/tools/{webtest → retest}/start-analysis.d.ts +0 -0
|
@@ -1,451 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit Tests for Prompts (Phase 8.7)
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { describe, it, expect, vi, beforeEach } from "vitest";
|
|
6
|
-
import { createWebtestPrompts, type McpPrompt } from "./index.js";
|
|
7
|
-
import type { ServerContext } from "../types/context.js";
|
|
8
|
-
|
|
9
|
-
describe("Webtest Prompts", () => {
|
|
10
|
-
let prompts: McpPrompt[];
|
|
11
|
-
|
|
12
|
-
beforeEach(() => {
|
|
13
|
-
const mockContext: Partial<ServerContext> = {
|
|
14
|
-
logger: {
|
|
15
|
-
info: vi.fn(),
|
|
16
|
-
warn: vi.fn(),
|
|
17
|
-
error: vi.fn(),
|
|
18
|
-
debug: vi.fn(),
|
|
19
|
-
withCorrelation: vi.fn().mockReturnThis(),
|
|
20
|
-
} as any,
|
|
21
|
-
config: {} as any,
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
prompts = createWebtestPrompts(() => mockContext as ServerContext);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
describe("prompt registration", () => {
|
|
28
|
-
it("creates all expected prompts", () => {
|
|
29
|
-
expect(prompts.length).toBe(6);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it("includes webtest-start prompt", () => {
|
|
33
|
-
const prompt = prompts.find((p) => p.name === "webtest-start");
|
|
34
|
-
expect(prompt).toBeDefined();
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
it("includes webtest-crawl prompt", () => {
|
|
38
|
-
const prompt = prompts.find((p) => p.name === "webtest-crawl");
|
|
39
|
-
expect(prompt).toBeDefined();
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
it("includes webtest-discover prompt", () => {
|
|
43
|
-
const prompt = prompts.find((p) => p.name === "webtest-discover");
|
|
44
|
-
expect(prompt).toBeDefined();
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it("includes webtest-generate-tests prompt", () => {
|
|
48
|
-
const prompt = prompts.find((p) => p.name === "webtest-generate-tests");
|
|
49
|
-
expect(prompt).toBeDefined();
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
it("includes webtest-run-test prompt", () => {
|
|
53
|
-
const prompt = prompts.find((p) => p.name === "webtest-run-test");
|
|
54
|
-
expect(prompt).toBeDefined();
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
it("includes webtest-full-workflow prompt", () => {
|
|
58
|
-
const prompt = prompts.find((p) => p.name === "webtest-full-workflow");
|
|
59
|
-
expect(prompt).toBeDefined();
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
describe("webtest-start prompt", () => {
|
|
64
|
-
let prompt: McpPrompt;
|
|
65
|
-
|
|
66
|
-
beforeEach(() => {
|
|
67
|
-
prompt = prompts.find((p) => p.name === "webtest-start")!;
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
it("has a description", () => {
|
|
71
|
-
expect(prompt.description).toBeDefined();
|
|
72
|
-
expect(prompt.description.length).toBeGreaterThan(0);
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
it("has url as required argument", () => {
|
|
76
|
-
const urlArg = prompt.arguments?.find((a) => a.name === "url");
|
|
77
|
-
expect(urlArg).toBeDefined();
|
|
78
|
-
expect(urlArg?.required).toBe(true);
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
it("has focus as optional argument", () => {
|
|
82
|
-
const focusArg = prompt.arguments?.find((a) => a.name === "focus");
|
|
83
|
-
expect(focusArg).toBeDefined();
|
|
84
|
-
expect(focusArg?.required).toBe(false);
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
it("generates message with URL", async () => {
|
|
88
|
-
const messages = await prompt.getMessages({ url: "https://example.com" });
|
|
89
|
-
|
|
90
|
-
expect(messages).toHaveLength(1);
|
|
91
|
-
expect(messages[0].role).toBe("user");
|
|
92
|
-
expect(messages[0].content.text).toContain("https://example.com");
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
it("includes focus in message when provided", async () => {
|
|
96
|
-
const messages = await prompt.getMessages({
|
|
97
|
-
url: "https://example.com",
|
|
98
|
-
focus: "checkout flow",
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
expect(messages[0].content.text).toContain("checkout flow");
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
it("mentions webtest_init tool", async () => {
|
|
105
|
-
const messages = await prompt.getMessages({ url: "https://example.com" });
|
|
106
|
-
|
|
107
|
-
expect(messages[0].content.text).toContain("webtest_init");
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
it("uses placeholder when URL not provided", async () => {
|
|
111
|
-
const messages = await prompt.getMessages({});
|
|
112
|
-
|
|
113
|
-
expect(messages[0].content.text).toContain("[URL]");
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
describe("webtest-crawl prompt", () => {
|
|
118
|
-
let prompt: McpPrompt;
|
|
119
|
-
|
|
120
|
-
beforeEach(() => {
|
|
121
|
-
prompt = prompts.find((p) => p.name === "webtest-crawl")!;
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
it("has a description", () => {
|
|
125
|
-
expect(prompt.description).toBeDefined();
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
it("has analysisId as required argument", () => {
|
|
129
|
-
const arg = prompt.arguments?.find((a) => a.name === "analysisId");
|
|
130
|
-
expect(arg).toBeDefined();
|
|
131
|
-
expect(arg?.required).toBe(true);
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
it("has goal as required argument", () => {
|
|
135
|
-
const arg = prompt.arguments?.find((a) => a.name === "goal");
|
|
136
|
-
expect(arg).toBeDefined();
|
|
137
|
-
expect(arg?.required).toBe(true);
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
it("has strategy as optional argument", () => {
|
|
141
|
-
const arg = prompt.arguments?.find((a) => a.name === "strategy");
|
|
142
|
-
expect(arg).toBeDefined();
|
|
143
|
-
expect(arg?.required).toBe(false);
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
it("generates message with parameters", async () => {
|
|
147
|
-
const messages = await prompt.getMessages({
|
|
148
|
-
analysisId: "abc-123",
|
|
149
|
-
goal: "explore products",
|
|
150
|
-
strategy: "breadth_first",
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
expect(messages[0].content.text).toContain("abc-123");
|
|
154
|
-
expect(messages[0].content.text).toContain("explore products");
|
|
155
|
-
expect(messages[0].content.text).toContain("breadth_first");
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
it("mentions webtest_crawl_app tool", async () => {
|
|
159
|
-
const messages = await prompt.getMessages({
|
|
160
|
-
analysisId: "abc-123",
|
|
161
|
-
goal: "explore",
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
expect(messages[0].content.text).toContain("webtest_crawl_app");
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
it("defaults strategy to goal_directed", async () => {
|
|
168
|
-
const messages = await prompt.getMessages({
|
|
169
|
-
analysisId: "abc-123",
|
|
170
|
-
goal: "explore",
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
expect(messages[0].content.text).toContain("goal_directed");
|
|
174
|
-
});
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
describe("webtest-discover prompt", () => {
|
|
178
|
-
let prompt: McpPrompt;
|
|
179
|
-
|
|
180
|
-
beforeEach(() => {
|
|
181
|
-
prompt = prompts.find((p) => p.name === "webtest-discover")!;
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
it("has a description", () => {
|
|
185
|
-
expect(prompt.description).toBeDefined();
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
it("has analysisId as required argument", () => {
|
|
189
|
-
const arg = prompt.arguments?.find((a) => a.name === "analysisId");
|
|
190
|
-
expect(arg).toBeDefined();
|
|
191
|
-
expect(arg?.required).toBe(true);
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
it("has featureSlug as optional argument", () => {
|
|
195
|
-
const arg = prompt.arguments?.find((a) => a.name === "featureSlug");
|
|
196
|
-
expect(arg).toBeDefined();
|
|
197
|
-
expect(arg?.required).toBe(false);
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
it("generates message with analysisId", async () => {
|
|
201
|
-
const messages = await prompt.getMessages({
|
|
202
|
-
analysisId: "abc-123",
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
expect(messages[0].content.text).toContain("abc-123");
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
it("mentions webtest_discover_features tool in full mode", async () => {
|
|
209
|
-
const messages = await prompt.getMessages({
|
|
210
|
-
analysisId: "abc-123",
|
|
211
|
-
});
|
|
212
|
-
|
|
213
|
-
expect(messages[0].content.text).toContain("webtest_discover_features");
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
it("mentions webtest_discover_flows tool in single feature mode", async () => {
|
|
217
|
-
const messages = await prompt.getMessages({
|
|
218
|
-
analysisId: "abc-123",
|
|
219
|
-
featureSlug: "user-auth",
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
expect(messages[0].content.text).toContain("webtest_discover_flows");
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
it("describes discovery outputs", async () => {
|
|
226
|
-
const messages = await prompt.getMessages({
|
|
227
|
-
analysisId: "abc-123",
|
|
228
|
-
});
|
|
229
|
-
|
|
230
|
-
expect(messages[0].content.text).toContain("features");
|
|
231
|
-
expect(messages[0].content.text).toContain("flows");
|
|
232
|
-
});
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
describe("webtest-generate-tests prompt", () => {
|
|
236
|
-
let prompt: McpPrompt;
|
|
237
|
-
|
|
238
|
-
beforeEach(() => {
|
|
239
|
-
prompt = prompts.find((p) => p.name === "webtest-generate-tests")!;
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
it("has a description", () => {
|
|
243
|
-
expect(prompt.description).toBeDefined();
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
it("has analysisId as required argument", () => {
|
|
247
|
-
const arg = prompt.arguments?.find((a) => a.name === "analysisId");
|
|
248
|
-
expect(arg).toBeDefined();
|
|
249
|
-
expect(arg?.required).toBe(true);
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
it("has strategy as optional argument", () => {
|
|
253
|
-
const arg = prompt.arguments?.find((a) => a.name === "strategy");
|
|
254
|
-
expect(arg).toBeDefined();
|
|
255
|
-
expect(arg?.required).toBe(false);
|
|
256
|
-
});
|
|
257
|
-
|
|
258
|
-
it("generates message with parameters", async () => {
|
|
259
|
-
const messages = await prompt.getMessages({
|
|
260
|
-
analysisId: "abc-123",
|
|
261
|
-
strategy: "edge_cases",
|
|
262
|
-
});
|
|
263
|
-
|
|
264
|
-
expect(messages[0].content.text).toContain("abc-123");
|
|
265
|
-
expect(messages[0].content.text).toContain("edge_cases");
|
|
266
|
-
});
|
|
267
|
-
|
|
268
|
-
it("mentions webtest-generate_tests tool", async () => {
|
|
269
|
-
const messages = await prompt.getMessages({
|
|
270
|
-
analysisId: "abc-123",
|
|
271
|
-
});
|
|
272
|
-
|
|
273
|
-
expect(messages[0].content.text).toContain("webtest_generate_tests");
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
it("defaults strategy to comprehensive", async () => {
|
|
277
|
-
const messages = await prompt.getMessages({
|
|
278
|
-
analysisId: "abc-123",
|
|
279
|
-
});
|
|
280
|
-
|
|
281
|
-
expect(messages[0].content.text).toContain("comprehensive");
|
|
282
|
-
});
|
|
283
|
-
});
|
|
284
|
-
|
|
285
|
-
describe("webtest-run-test prompt", () => {
|
|
286
|
-
let prompt: McpPrompt;
|
|
287
|
-
|
|
288
|
-
beforeEach(() => {
|
|
289
|
-
prompt = prompts.find((p) => p.name === "webtest-run-test")!;
|
|
290
|
-
});
|
|
291
|
-
|
|
292
|
-
it("has a description", () => {
|
|
293
|
-
expect(prompt.description).toBeDefined();
|
|
294
|
-
});
|
|
295
|
-
|
|
296
|
-
it("has analysisId as required argument", () => {
|
|
297
|
-
const arg = prompt.arguments?.find((a) => a.name === "analysisId");
|
|
298
|
-
expect(arg).toBeDefined();
|
|
299
|
-
expect(arg?.required).toBe(true);
|
|
300
|
-
});
|
|
301
|
-
|
|
302
|
-
it("has testCaseId as required argument", () => {
|
|
303
|
-
const arg = prompt.arguments?.find((a) => a.name === "testCaseId");
|
|
304
|
-
expect(arg).toBeDefined();
|
|
305
|
-
expect(arg?.required).toBe(true);
|
|
306
|
-
});
|
|
307
|
-
|
|
308
|
-
it("generates message with parameters", async () => {
|
|
309
|
-
const messages = await prompt.getMessages({
|
|
310
|
-
analysisId: "abc-123",
|
|
311
|
-
testCaseId: "test-001",
|
|
312
|
-
});
|
|
313
|
-
|
|
314
|
-
expect(messages[0].content.text).toContain("abc-123");
|
|
315
|
-
expect(messages[0].content.text).toContain("test-001");
|
|
316
|
-
});
|
|
317
|
-
|
|
318
|
-
it("mentions webtest_run_test tool", async () => {
|
|
319
|
-
const messages = await prompt.getMessages({
|
|
320
|
-
analysisId: "abc-123",
|
|
321
|
-
testCaseId: "test-001",
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
expect(messages[0].content.text).toContain("webtest_run_test");
|
|
325
|
-
});
|
|
326
|
-
|
|
327
|
-
it("mentions evidence capture", async () => {
|
|
328
|
-
const messages = await prompt.getMessages({
|
|
329
|
-
analysisId: "abc-123",
|
|
330
|
-
testCaseId: "test-001",
|
|
331
|
-
});
|
|
332
|
-
|
|
333
|
-
expect(messages[0].content.text).toContain("evidence");
|
|
334
|
-
});
|
|
335
|
-
});
|
|
336
|
-
|
|
337
|
-
describe("webtest-full-workflow prompt", () => {
|
|
338
|
-
let prompt: McpPrompt;
|
|
339
|
-
|
|
340
|
-
beforeEach(() => {
|
|
341
|
-
prompt = prompts.find((p) => p.name === "webtest-full-workflow")!;
|
|
342
|
-
});
|
|
343
|
-
|
|
344
|
-
it("has a description", () => {
|
|
345
|
-
expect(prompt.description).toBeDefined();
|
|
346
|
-
});
|
|
347
|
-
|
|
348
|
-
it("has url as required argument", () => {
|
|
349
|
-
const arg = prompt.arguments?.find((a) => a.name === "url");
|
|
350
|
-
expect(arg).toBeDefined();
|
|
351
|
-
expect(arg?.required).toBe(true);
|
|
352
|
-
});
|
|
353
|
-
|
|
354
|
-
it("has focus as optional argument", () => {
|
|
355
|
-
const arg = prompt.arguments?.find((a) => a.name === "focus");
|
|
356
|
-
expect(arg).toBeDefined();
|
|
357
|
-
expect(arg?.required).toBe(false);
|
|
358
|
-
});
|
|
359
|
-
|
|
360
|
-
it("generates message with URL", async () => {
|
|
361
|
-
const messages = await prompt.getMessages({
|
|
362
|
-
url: "https://shop.example.com",
|
|
363
|
-
});
|
|
364
|
-
|
|
365
|
-
expect(messages[0].content.text).toContain("https://shop.example.com");
|
|
366
|
-
});
|
|
367
|
-
|
|
368
|
-
it("mentions all webtest tools in order", async () => {
|
|
369
|
-
const messages = await prompt.getMessages({
|
|
370
|
-
url: "https://shop.example.com",
|
|
371
|
-
});
|
|
372
|
-
|
|
373
|
-
const text = messages[0].content.text;
|
|
374
|
-
expect(text).toContain("webtest_init");
|
|
375
|
-
expect(text).toContain("webtest_crawl_app");
|
|
376
|
-
expect(text).toContain("webtest_discover_features");
|
|
377
|
-
expect(text).toContain("webtest_discover_flows");
|
|
378
|
-
expect(text).toContain("webtest_generate_tests");
|
|
379
|
-
expect(text).toContain("webtest_run_test");
|
|
380
|
-
});
|
|
381
|
-
|
|
382
|
-
it("includes focus in message", async () => {
|
|
383
|
-
const messages = await prompt.getMessages({
|
|
384
|
-
url: "https://shop.example.com",
|
|
385
|
-
focus: "payment processing",
|
|
386
|
-
});
|
|
387
|
-
|
|
388
|
-
expect(messages[0].content.text).toContain("payment processing");
|
|
389
|
-
});
|
|
390
|
-
|
|
391
|
-
it("defaults focus to main functionality", async () => {
|
|
392
|
-
const messages = await prompt.getMessages({
|
|
393
|
-
url: "https://shop.example.com",
|
|
394
|
-
});
|
|
395
|
-
|
|
396
|
-
expect(messages[0].content.text).toContain("main functionality");
|
|
397
|
-
});
|
|
398
|
-
});
|
|
399
|
-
|
|
400
|
-
describe("McpPrompt interface", () => {
|
|
401
|
-
it("all prompts have name property", () => {
|
|
402
|
-
for (const prompt of prompts) {
|
|
403
|
-
expect(prompt.name).toBeDefined();
|
|
404
|
-
expect(typeof prompt.name).toBe("string");
|
|
405
|
-
}
|
|
406
|
-
});
|
|
407
|
-
|
|
408
|
-
it("all prompts have description property", () => {
|
|
409
|
-
for (const prompt of prompts) {
|
|
410
|
-
expect(prompt.description).toBeDefined();
|
|
411
|
-
expect(typeof prompt.description).toBe("string");
|
|
412
|
-
}
|
|
413
|
-
});
|
|
414
|
-
|
|
415
|
-
it("all prompts have getMessages function", () => {
|
|
416
|
-
for (const prompt of prompts) {
|
|
417
|
-
expect(prompt.getMessages).toBeDefined();
|
|
418
|
-
expect(typeof prompt.getMessages).toBe("function");
|
|
419
|
-
}
|
|
420
|
-
});
|
|
421
|
-
|
|
422
|
-
it("getMessages returns array of messages", async () => {
|
|
423
|
-
for (const prompt of prompts) {
|
|
424
|
-
const messages = await prompt.getMessages({});
|
|
425
|
-
expect(Array.isArray(messages)).toBe(true);
|
|
426
|
-
expect(messages.length).toBeGreaterThan(0);
|
|
427
|
-
}
|
|
428
|
-
});
|
|
429
|
-
|
|
430
|
-
it("messages have correct structure", async () => {
|
|
431
|
-
for (const prompt of prompts) {
|
|
432
|
-
const messages = await prompt.getMessages({});
|
|
433
|
-
for (const message of messages) {
|
|
434
|
-
expect(message.role).toBeDefined();
|
|
435
|
-
expect(["user", "assistant"]).toContain(message.role);
|
|
436
|
-
expect(message.content).toBeDefined();
|
|
437
|
-
expect(message.content.type).toBe("text");
|
|
438
|
-
expect(typeof message.content.text).toBe("string");
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
});
|
|
442
|
-
});
|
|
443
|
-
|
|
444
|
-
describe("prompt uniqueness", () => {
|
|
445
|
-
it("all prompt names are unique", () => {
|
|
446
|
-
const names = prompts.map((p) => p.name);
|
|
447
|
-
const uniqueNames = new Set(names);
|
|
448
|
-
expect(uniqueNames.size).toBe(names.length);
|
|
449
|
-
});
|
|
450
|
-
});
|
|
451
|
-
});
|
package/src/prompts/index.ts
DELETED
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import type { ServerContext } from "../types/context.js";
|
|
2
|
-
import { loadTemplate, interpolate } from "./loader.js";
|
|
3
|
-
|
|
4
|
-
// Load templates once at module initialization
|
|
5
|
-
const webtestStartTemplate = loadTemplate("mcp", "webtest-start");
|
|
6
|
-
const webtestCrawlTemplate = loadTemplate("mcp", "webtest-crawl");
|
|
7
|
-
const webtestDiscoverTemplate = loadTemplate("mcp", "webtest-discover");
|
|
8
|
-
const webtestDiscoverFlowsTemplate = loadTemplate("mcp", "webtest-discover-flows");
|
|
9
|
-
const webtestGenerateTestsTemplate = loadTemplate("mcp", "webtest-generate-tests");
|
|
10
|
-
const webtestRunTestTemplate = loadTemplate("mcp", "webtest-run-test");
|
|
11
|
-
const webtestFullWorkflowTemplate = loadTemplate("mcp", "webtest-full-workflow");
|
|
12
|
-
|
|
13
|
-
export interface McpPrompt {
|
|
14
|
-
name: string;
|
|
15
|
-
description: string;
|
|
16
|
-
arguments?: Array<{
|
|
17
|
-
name: string;
|
|
18
|
-
description: string;
|
|
19
|
-
required?: boolean;
|
|
20
|
-
}>;
|
|
21
|
-
getMessages(args: Record<string, string>): Promise<Array<{
|
|
22
|
-
role: "user" | "assistant";
|
|
23
|
-
content: { type: "text"; text: string };
|
|
24
|
-
}>>;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function createWebtestPrompts(
|
|
28
|
-
getContext: () => ServerContext
|
|
29
|
-
): McpPrompt[] {
|
|
30
|
-
return [
|
|
31
|
-
{
|
|
32
|
-
name: "webtest-start",
|
|
33
|
-
description:
|
|
34
|
-
"Start a new web testing analysis. Guides you through setting up a workspace for testing a web application.",
|
|
35
|
-
arguments: [
|
|
36
|
-
{
|
|
37
|
-
name: "url",
|
|
38
|
-
description: "The URL of the web application to test",
|
|
39
|
-
required: true,
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: "focus",
|
|
43
|
-
description:
|
|
44
|
-
"Optional focus area (e.g., 'checkout flow', 'user registration')",
|
|
45
|
-
required: false,
|
|
46
|
-
},
|
|
47
|
-
],
|
|
48
|
-
async getMessages(args) {
|
|
49
|
-
const url = args.url || "[URL]";
|
|
50
|
-
const focus = args.focus ? `\nFocus area: ${args.focus}` : "";
|
|
51
|
-
|
|
52
|
-
return [
|
|
53
|
-
{
|
|
54
|
-
role: "user",
|
|
55
|
-
content: {
|
|
56
|
-
type: "text",
|
|
57
|
-
text: interpolate(webtestStartTemplate, { url, focus }),
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
];
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
{
|
|
65
|
-
name: "webtest-crawl",
|
|
66
|
-
description:
|
|
67
|
-
"Crawl a web application to discover pages and functionality. Requires an existing analysis workspace.",
|
|
68
|
-
arguments: [
|
|
69
|
-
{
|
|
70
|
-
name: "analysisId",
|
|
71
|
-
description: "The ID of the analysis workspace",
|
|
72
|
-
required: true,
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
name: "goal",
|
|
76
|
-
description: "What you want to discover or explore",
|
|
77
|
-
required: true,
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
name: "strategy",
|
|
81
|
-
description:
|
|
82
|
-
"Crawling strategy: breadth_first, depth_first, or goal_directed",
|
|
83
|
-
required: false,
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
async getMessages(args) {
|
|
87
|
-
const analysisId = args.analysisId || "[analysisId]";
|
|
88
|
-
const goal = args.goal || "explore the main functionality";
|
|
89
|
-
const strategy = args.strategy || "goal_directed";
|
|
90
|
-
|
|
91
|
-
return [
|
|
92
|
-
{
|
|
93
|
-
role: "user",
|
|
94
|
-
content: {
|
|
95
|
-
type: "text",
|
|
96
|
-
text: interpolate(webtestCrawlTemplate, { analysisId, goal, strategy }),
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
];
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
{
|
|
104
|
-
name: "webtest-discover",
|
|
105
|
-
description:
|
|
106
|
-
"Discover features and flows in a web application based on crawl data.",
|
|
107
|
-
arguments: [
|
|
108
|
-
{
|
|
109
|
-
name: "analysisId",
|
|
110
|
-
description: "The ID of the analysis workspace",
|
|
111
|
-
required: true,
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
name: "featureSlug",
|
|
115
|
-
description: "Optional: discover flows only for this specific feature",
|
|
116
|
-
required: false,
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
async getMessages(args) {
|
|
120
|
-
const analysisId = args.analysisId || "[analysisId]";
|
|
121
|
-
const featureSlug = args.featureSlug;
|
|
122
|
-
|
|
123
|
-
if (featureSlug) {
|
|
124
|
-
// Single feature mode - discover flows for specific feature
|
|
125
|
-
return [
|
|
126
|
-
{
|
|
127
|
-
role: "user",
|
|
128
|
-
content: {
|
|
129
|
-
type: "text",
|
|
130
|
-
text: interpolate(webtestDiscoverFlowsTemplate, { analysisId, featureSlug }),
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
];
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// Full discovery mode
|
|
137
|
-
return [
|
|
138
|
-
{
|
|
139
|
-
role: "user",
|
|
140
|
-
content: {
|
|
141
|
-
type: "text",
|
|
142
|
-
text: interpolate(webtestDiscoverTemplate, { analysisId }),
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
];
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
{
|
|
150
|
-
name: "webtest-generate-tests",
|
|
151
|
-
description:
|
|
152
|
-
"Generate test cases from the application analysis.",
|
|
153
|
-
arguments: [
|
|
154
|
-
{
|
|
155
|
-
name: "analysisId",
|
|
156
|
-
description: "The ID of the analysis workspace",
|
|
157
|
-
required: true,
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
name: "strategy",
|
|
161
|
-
description:
|
|
162
|
-
"Test strategy: comprehensive, happy_path, edge_cases, or critical_paths",
|
|
163
|
-
required: false,
|
|
164
|
-
},
|
|
165
|
-
],
|
|
166
|
-
async getMessages(args) {
|
|
167
|
-
const analysisId = args.analysisId || "[analysisId]";
|
|
168
|
-
const strategy = args.strategy || "comprehensive";
|
|
169
|
-
|
|
170
|
-
return [
|
|
171
|
-
{
|
|
172
|
-
role: "user",
|
|
173
|
-
content: {
|
|
174
|
-
type: "text",
|
|
175
|
-
text: interpolate(webtestGenerateTestsTemplate, { analysisId, strategy }),
|
|
176
|
-
},
|
|
177
|
-
},
|
|
178
|
-
];
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
|
|
182
|
-
{
|
|
183
|
-
name: "webtest-run-test",
|
|
184
|
-
description:
|
|
185
|
-
"Run a specific test case against the web application.",
|
|
186
|
-
arguments: [
|
|
187
|
-
{
|
|
188
|
-
name: "analysisId",
|
|
189
|
-
description: "The ID of the analysis workspace",
|
|
190
|
-
required: true,
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
name: "testCaseId",
|
|
194
|
-
description: "The ID of the test case to run",
|
|
195
|
-
required: true,
|
|
196
|
-
},
|
|
197
|
-
],
|
|
198
|
-
async getMessages(args) {
|
|
199
|
-
const analysisId = args.analysisId || "[analysisId]";
|
|
200
|
-
const testCaseId = args.testCaseId || "[testCaseId]";
|
|
201
|
-
|
|
202
|
-
return [
|
|
203
|
-
{
|
|
204
|
-
role: "user",
|
|
205
|
-
content: {
|
|
206
|
-
type: "text",
|
|
207
|
-
text: interpolate(webtestRunTestTemplate, { analysisId, testCaseId }),
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
];
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
|
|
214
|
-
{
|
|
215
|
-
name: "webtest-full-workflow",
|
|
216
|
-
description:
|
|
217
|
-
"Run the complete web testing workflow: start, crawl, analyze, generate tests, and run tests.",
|
|
218
|
-
arguments: [
|
|
219
|
-
{
|
|
220
|
-
name: "url",
|
|
221
|
-
description: "The URL of the web application to test",
|
|
222
|
-
required: true,
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
name: "focus",
|
|
226
|
-
description: "Focus area for testing",
|
|
227
|
-
required: false,
|
|
228
|
-
},
|
|
229
|
-
],
|
|
230
|
-
async getMessages(args) {
|
|
231
|
-
const url = args.url || "[URL]";
|
|
232
|
-
const focus = args.focus || "main functionality";
|
|
233
|
-
|
|
234
|
-
return [
|
|
235
|
-
{
|
|
236
|
-
role: "user",
|
|
237
|
-
content: {
|
|
238
|
-
type: "text",
|
|
239
|
-
text: interpolate(webtestFullWorkflowTemplate, { url, focus }),
|
|
240
|
-
},
|
|
241
|
-
},
|
|
242
|
-
];
|
|
243
|
-
},
|
|
244
|
-
},
|
|
245
|
-
];
|
|
246
|
-
}
|