@uuv/mcp-server 0.3.0 → 0.4.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/dist/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# [0.3.0](https://github.com/e2e-test-quest/uuv/compare/mcp-server-v0.2.0...mcp-server-v0.3.0) (2025-11-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **mcp-server:** add claude code plugin, [#1168](https://github.com/e2e-test-quest/uuv/issues/1168) ([8b00804](https://github.com/e2e-test-quest/uuv/commit/8b00804aaeea87b4385e16b5dbdfa01a10319db0))
|
|
7
|
+
* **mcp-server:** add gemini extension, [#1166](https://github.com/e2e-test-quest/uuv/issues/1166) ([b1ee07b](https://github.com/e2e-test-quest/uuv/commit/b1ee07bcf6236fd9c5b0ee8cc30ae786b19fe1b1))
|
|
8
|
+
|
|
1
9
|
# [0.2.0](https://github.com/e2e-test-quest/uuv/compare/mcp-server-v0.1.3...mcp-server-v0.2.0) (2025-11-30)
|
|
2
10
|
|
|
3
11
|
|
|
@@ -39,6 +39,79 @@ function createUUVServer() {
|
|
|
39
39
|
accessibleRole: zod_1.z.string().optional().describe("Accessible role of the element"),
|
|
40
40
|
domSelector: zod_1.z.string().optional().describe("Dom selector of the element"),
|
|
41
41
|
};
|
|
42
|
+
server.registerPrompt(prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE, {
|
|
43
|
+
title: prompt_retriever_service_1.uuvPrompts[prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE].title,
|
|
44
|
+
description: prompt_retriever_service_1.uuvPrompts[prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE].description,
|
|
45
|
+
argsSchema: {
|
|
46
|
+
baseUrl: zod_1.z.string().describe("The base URL of the page where the table/grid/treegrid is located."),
|
|
47
|
+
},
|
|
48
|
+
}, ({ ...args }) => ({
|
|
49
|
+
messages: [
|
|
50
|
+
{
|
|
51
|
+
role: "assistant",
|
|
52
|
+
content: {
|
|
53
|
+
type: "text",
|
|
54
|
+
text: prompt_retriever_service_1.PromptRetrieverService.retrievePrompt({
|
|
55
|
+
promptName: prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE,
|
|
56
|
+
...args
|
|
57
|
+
}),
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
}));
|
|
62
|
+
[
|
|
63
|
+
prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT,
|
|
64
|
+
prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT,
|
|
65
|
+
prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT
|
|
66
|
+
].forEach((promptName) => {
|
|
67
|
+
server.registerPrompt(promptName, {
|
|
68
|
+
title: prompt_retriever_service_1.uuvPrompts[promptName].title,
|
|
69
|
+
description: prompt_retriever_service_1.uuvPrompts[promptName].description,
|
|
70
|
+
argsSchema: {
|
|
71
|
+
baseUrl: zod_1.z.string().describe("The base URL of the page where the table/grid/treegrid is located."),
|
|
72
|
+
accessibleName: zod_1.z.string().optional().describe("Accessible name of the element"),
|
|
73
|
+
accessibleRole: zod_1.z.string().optional().describe("Accessible role of the element"),
|
|
74
|
+
domSelector: zod_1.z.string().optional().describe("Dom selector of the element")
|
|
75
|
+
}
|
|
76
|
+
}, ({ ...args }) => ({
|
|
77
|
+
messages: [
|
|
78
|
+
{
|
|
79
|
+
role: "assistant",
|
|
80
|
+
content: {
|
|
81
|
+
type: "text",
|
|
82
|
+
text: prompt_retriever_service_1.PromptRetrieverService.retrievePrompt({
|
|
83
|
+
promptName,
|
|
84
|
+
...args
|
|
85
|
+
})
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}));
|
|
90
|
+
});
|
|
91
|
+
server.registerPrompt(prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT, {
|
|
92
|
+
title: prompt_retriever_service_1.uuvPrompts[prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT].title,
|
|
93
|
+
description: prompt_retriever_service_1.uuvPrompts[prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT].description,
|
|
94
|
+
argsSchema: {
|
|
95
|
+
baseUrl: zod_1.z.string().describe("The base URL of the page where the table/grid/treegrid is located."),
|
|
96
|
+
valueToType: zod_1.z.string().describe("Value to type"),
|
|
97
|
+
accessibleName: zod_1.z.string().optional().describe("Accessible name of the element"),
|
|
98
|
+
accessibleRole: zod_1.z.string().optional().describe("Accessible role of the element"),
|
|
99
|
+
domSelector: zod_1.z.string().optional().describe("Dom selector of the element")
|
|
100
|
+
}
|
|
101
|
+
}, ({ ...args }) => ({
|
|
102
|
+
messages: [
|
|
103
|
+
{
|
|
104
|
+
role: "assistant",
|
|
105
|
+
content: {
|
|
106
|
+
type: "text",
|
|
107
|
+
text: prompt_retriever_service_1.PromptRetrieverService.retrievePrompt({
|
|
108
|
+
promptName: prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT,
|
|
109
|
+
...args
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}));
|
|
42
115
|
server.registerTool("retrieve_prompt", {
|
|
43
116
|
title: "Retrieve uuv prompt",
|
|
44
117
|
description: "Retrieve a uuv prompt template for a coding agent based on a prompt name and arguments.",
|
|
@@ -47,12 +120,15 @@ function createUUVServer() {
|
|
|
47
120
|
prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE,
|
|
48
121
|
prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT,
|
|
49
122
|
prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT,
|
|
123
|
+
prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT,
|
|
124
|
+
prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT
|
|
50
125
|
]),
|
|
51
126
|
baseUrl: zod_1.z.string().describe("The base URL of the page"),
|
|
52
127
|
// generate_test_* Fields
|
|
53
|
-
accessibleName: zod_1.z.string().optional().describe("Accessible name
|
|
54
|
-
accessibleRole: zod_1.z.string().optional().describe("Accessible role
|
|
128
|
+
accessibleName: zod_1.z.string().optional().describe("Accessible name"),
|
|
129
|
+
accessibleRole: zod_1.z.string().optional().describe("Accessible role"),
|
|
55
130
|
domSelector: zod_1.z.string().optional().describe("Dom selector of the element"),
|
|
131
|
+
valueToType: zod_1.z.string().optional().describe("Value to type")
|
|
56
132
|
},
|
|
57
133
|
}, async ({ ...args }) => {
|
|
58
134
|
return {
|
|
@@ -89,7 +165,7 @@ function createUUVServer() {
|
|
|
89
165
|
};
|
|
90
166
|
});
|
|
91
167
|
server.registerTool("generate_test_expect_element", {
|
|
92
|
-
title: "Generate test that expects of html element with role and name",
|
|
168
|
+
title: "Generate test that expects of html element with (role and name) or domSelector",
|
|
93
169
|
description:
|
|
94
170
|
// eslint-disable-next-line max-len
|
|
95
171
|
"Generate a complete UUV test scenario (Gherkin format) to verify the presence of an element with specified accessible name and role or domSelector. Use this when the user asks to create/write/generate a UUV scenario or test for checking element visibility. DON'T USE IF ACCESSIBLE ROLE IS grid, treegrid, table, or form",
|
|
@@ -101,7 +177,7 @@ function createUUVServer() {
|
|
|
101
177
|
return handleElementTestGeneration({ serviceType: expect_service_1.ElementServiceType.EXPECT, baseUrl, accessibleName, accessibleRole, domSelector });
|
|
102
178
|
});
|
|
103
179
|
server.registerTool("generate_test_click_element", {
|
|
104
|
-
title: "Generate test that clicks on html element with role and name",
|
|
180
|
+
title: "Generate test that clicks on html element with (role and name) or domSelector",
|
|
105
181
|
description:
|
|
106
182
|
// eslint-disable-next-line max-len
|
|
107
183
|
"Generate a complete UUV test scenario (Gherkin format) to click on an element with specified accessible name and role or domSelector. Use this when the user asks to create/write/generate a UUV scenario or test for checking element visibility. DON'T USE IF ACCESSIBLE ROLE IS grid, treegrid, table, or form",
|
|
@@ -110,7 +186,7 @@ function createUUVServer() {
|
|
|
110
186
|
return handleElementTestGeneration({ serviceType: expect_service_1.ElementServiceType.CLICK, baseUrl, accessibleName, accessibleRole, domSelector });
|
|
111
187
|
});
|
|
112
188
|
server.registerTool("generate_test_within_element", {
|
|
113
|
-
title: "Generate test that focus within an html element with role and name",
|
|
189
|
+
title: "Generate test that focus within an html element with (role and name) or domSelector",
|
|
114
190
|
description:
|
|
115
191
|
// eslint-disable-next-line max-len
|
|
116
192
|
"Generate a complete UUV test scenario (Gherkin format) that focus within an html element with specified accessible name and role or domSelector. Use this when the user asks to create/write/generate a UUV scenario or test for checking element visibility. DON'T USE IF ACCESSIBLE ROLE IS grid, treegrid, table, or form",
|
|
@@ -119,7 +195,7 @@ function createUUVServer() {
|
|
|
119
195
|
return handleElementTestGeneration({ serviceType: expect_service_1.ElementServiceType.WITHIN, baseUrl, accessibleName, accessibleRole, domSelector });
|
|
120
196
|
});
|
|
121
197
|
server.registerTool("generate_test_type_element", {
|
|
122
|
-
title: "Generate test that types a value into html element with role and name",
|
|
198
|
+
title: "Generate test that types a value into html element with (role and name) or domSelector",
|
|
123
199
|
description:
|
|
124
200
|
// eslint-disable-next-line max-len
|
|
125
201
|
"Generate a complete UUV test scenario (Gherkin format) that types a value into an html element with specified accessible name and role or domSelector. Use this when the user asks to create/write/generate a UUV scenario or test for checking element visibility. DON'T USE IF ACCESSIBLE ROLE IS grid, treegrid, table, or form",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
type PromptExtraArgs = Record<string, any>;
|
|
2
3
|
export type PromptArgs = {
|
|
3
4
|
promptName: UUV_PROMPT;
|
|
@@ -9,6 +10,74 @@ export declare enum UUV_PROMPT {
|
|
|
9
10
|
GENERATE_TEST_WITHIN_ELEMENT = "generate_test_within_element",
|
|
10
11
|
GENERATE_TEST_TYPE_ELEMENT = "generate_test_type_element"
|
|
11
12
|
}
|
|
13
|
+
export declare const uuvPrompts: {
|
|
14
|
+
generate_test_expect_table: {
|
|
15
|
+
title: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
generate_test_expect_element: {
|
|
19
|
+
title: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
generate_test_click_element: {
|
|
23
|
+
title: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
generate_test_within_element: {
|
|
27
|
+
title: string;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
generate_test_type_element: {
|
|
31
|
+
title: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare const UUVPromptInputSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"promptName", [z.ZodObject<{
|
|
36
|
+
promptName: z.ZodLiteral<UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE>;
|
|
37
|
+
baseUrl: z.ZodString;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
promptName: UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE;
|
|
40
|
+
baseUrl: string;
|
|
41
|
+
}, {
|
|
42
|
+
promptName: UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE;
|
|
43
|
+
baseUrl: string;
|
|
44
|
+
}>, z.ZodObject<{
|
|
45
|
+
promptName: z.ZodEnum<[UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT, UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT, UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT, UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT]>;
|
|
46
|
+
baseUrl: z.ZodString;
|
|
47
|
+
accessibleName: z.ZodOptional<z.ZodString>;
|
|
48
|
+
accessibleRole: z.ZodOptional<z.ZodString>;
|
|
49
|
+
domSelector: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
promptName: UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT | UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT | UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT | UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT;
|
|
52
|
+
baseUrl: string;
|
|
53
|
+
accessibleName?: string | undefined;
|
|
54
|
+
accessibleRole?: string | undefined;
|
|
55
|
+
domSelector?: string | undefined;
|
|
56
|
+
}, {
|
|
57
|
+
promptName: UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT | UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT | UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT | UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT;
|
|
58
|
+
baseUrl: string;
|
|
59
|
+
accessibleName?: string | undefined;
|
|
60
|
+
accessibleRole?: string | undefined;
|
|
61
|
+
domSelector?: string | undefined;
|
|
62
|
+
}>]>, {
|
|
63
|
+
promptName: UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE;
|
|
64
|
+
baseUrl: string;
|
|
65
|
+
} | {
|
|
66
|
+
promptName: UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT | UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT | UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT | UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT;
|
|
67
|
+
baseUrl: string;
|
|
68
|
+
accessibleName?: string | undefined;
|
|
69
|
+
accessibleRole?: string | undefined;
|
|
70
|
+
domSelector?: string | undefined;
|
|
71
|
+
}, {
|
|
72
|
+
promptName: UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE;
|
|
73
|
+
baseUrl: string;
|
|
74
|
+
} | {
|
|
75
|
+
promptName: UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT | UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT | UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT | UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT;
|
|
76
|
+
baseUrl: string;
|
|
77
|
+
accessibleName?: string | undefined;
|
|
78
|
+
accessibleRole?: string | undefined;
|
|
79
|
+
domSelector?: string | undefined;
|
|
80
|
+
}>;
|
|
12
81
|
export declare class PromptRetrieverService {
|
|
13
82
|
private static loadPromptTemplate;
|
|
14
83
|
private static generatePrompt;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PromptRetrieverService = exports.UUV_PROMPT = void 0;
|
|
3
|
+
exports.PromptRetrieverService = exports.UUVPromptInputSchema = exports.uuvPrompts = exports.UUV_PROMPT = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const path = tslib_1.__importStar(require("node:path"));
|
|
6
6
|
const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
|
|
@@ -14,6 +14,60 @@ var UUV_PROMPT;
|
|
|
14
14
|
UUV_PROMPT["GENERATE_TEST_WITHIN_ELEMENT"] = "generate_test_within_element";
|
|
15
15
|
UUV_PROMPT["GENERATE_TEST_TYPE_ELEMENT"] = "generate_test_type_element";
|
|
16
16
|
})(UUV_PROMPT || (exports.UUV_PROMPT = UUV_PROMPT = {}));
|
|
17
|
+
exports.uuvPrompts = {
|
|
18
|
+
[UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE]: {
|
|
19
|
+
title: "GenerateTestExpectTable",
|
|
20
|
+
description: "Prompt to generate test for html table or grid or treeGrid"
|
|
21
|
+
},
|
|
22
|
+
[UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT]: {
|
|
23
|
+
title: "GenerateTestExpectElement",
|
|
24
|
+
description: "Prompt to generate test that expects of html element with (role and name) or domSelector"
|
|
25
|
+
},
|
|
26
|
+
[UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT]: {
|
|
27
|
+
title: "GenerateTestClickElement",
|
|
28
|
+
description: "Prompt to generate test that clicks on html element with (role and name) or domSelector"
|
|
29
|
+
},
|
|
30
|
+
[UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT]: {
|
|
31
|
+
title: "GenerateTestWithinElement",
|
|
32
|
+
description: "Prompt to generate test that focus within an html element with (role and name) or domSelector"
|
|
33
|
+
},
|
|
34
|
+
[UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT]: {
|
|
35
|
+
title: "GenerateTestTypeElement",
|
|
36
|
+
description: "Prompt to generate test that types a value into html element with (role and name) or domSelector"
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
exports.UUVPromptInputSchema = zod_1.z.discriminatedUnion("promptName", [
|
|
40
|
+
zod_1.z.object({
|
|
41
|
+
promptName: zod_1.z.literal(UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE),
|
|
42
|
+
baseUrl: zod_1.z.string().describe("The base URL of the page where the table/grid/treegrid is located."),
|
|
43
|
+
}),
|
|
44
|
+
zod_1.z.object({
|
|
45
|
+
promptName: zod_1.z.enum([
|
|
46
|
+
UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT,
|
|
47
|
+
UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT,
|
|
48
|
+
UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT,
|
|
49
|
+
UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT
|
|
50
|
+
]),
|
|
51
|
+
baseUrl: zod_1.z.string().describe("The base URL of the page where the element is located."),
|
|
52
|
+
accessibleName: zod_1.z.string().optional().describe("Accessible name of the element"),
|
|
53
|
+
accessibleRole: zod_1.z.string().optional().describe("Accessible role of the element"),
|
|
54
|
+
domSelector: zod_1.z.string().optional().describe("Dom selector of the element"),
|
|
55
|
+
}),
|
|
56
|
+
]).superRefine((data, ctx) => {
|
|
57
|
+
if (data.promptName === UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT ||
|
|
58
|
+
data.promptName === UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT ||
|
|
59
|
+
data.promptName === UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT ||
|
|
60
|
+
data.promptName === UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT) {
|
|
61
|
+
const hasAccessibleSelector = data.accessibleRole && data.accessibleName;
|
|
62
|
+
const hasDomSelector = data.domSelector;
|
|
63
|
+
if (!hasAccessibleSelector && !hasDomSelector) {
|
|
64
|
+
ctx.addIssue({
|
|
65
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
66
|
+
message: "You must provide either (accessibleRole AND accessibleName) or domSelector",
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
});
|
|
17
71
|
class PromptRetrieverService {
|
|
18
72
|
static loadPromptTemplate(promptName) {
|
|
19
73
|
const templatePath = path.join(__dirname, "..", "prompts", `${promptName}.mustache`);
|
|
@@ -33,16 +87,28 @@ class PromptRetrieverService {
|
|
|
33
87
|
promptName: zod_1.z.enum([
|
|
34
88
|
UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT,
|
|
35
89
|
UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT,
|
|
36
|
-
UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT
|
|
37
|
-
UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT
|
|
90
|
+
UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT
|
|
38
91
|
]),
|
|
39
92
|
baseUrl: zod_1.z.string().describe("The base URL of the page where the element is located."),
|
|
40
93
|
accessibleName: zod_1.z.string().optional().describe("Accessible name of the element"),
|
|
41
94
|
accessibleRole: zod_1.z.string().optional().describe("Accessible role of the element"),
|
|
42
95
|
domSelector: zod_1.z.string().optional().describe("Dom selector of the element"),
|
|
43
96
|
}),
|
|
97
|
+
zod_1.z.object({
|
|
98
|
+
promptName: zod_1.z.enum([
|
|
99
|
+
UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT
|
|
100
|
+
]),
|
|
101
|
+
baseUrl: zod_1.z.string().describe("The base URL of the page where the element is located."),
|
|
102
|
+
valueToType: zod_1.z.string().describe("Value to type"),
|
|
103
|
+
accessibleName: zod_1.z.string().optional().describe("Accessible name of the element"),
|
|
104
|
+
accessibleRole: zod_1.z.string().optional().describe("Accessible role of the element"),
|
|
105
|
+
domSelector: zod_1.z.string().optional().describe("Dom selector of the element"),
|
|
106
|
+
})
|
|
44
107
|
]).superRefine((data, ctx) => {
|
|
45
|
-
if (data.promptName === UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT ||
|
|
108
|
+
if (data.promptName === UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT ||
|
|
109
|
+
data.promptName === UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT ||
|
|
110
|
+
data.promptName === UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT ||
|
|
111
|
+
data.promptName === UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT) {
|
|
46
112
|
const hasAccessibleSelector = data.accessibleRole && data.accessibleName;
|
|
47
113
|
const hasDomSelector = data.domSelector;
|
|
48
114
|
if (!hasAccessibleSelector && !hasDomSelector) {
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uuv/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "A Model Context Protocol (MCP) server for UUV - a solution to facilitate the writing and execution of E2E tests understandable by any human being(English or French) using cucumber(BDD) and cypress or playwright.",
|
|
5
5
|
"author": "Louis Fredice NJAKO MOLOM (https://github.com/luifr10) & Stanley SERVICAL (https://github.com/stanlee974)",
|
|
6
6
|
"license": "MIT",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uuv/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A Model Context Protocol (MCP) server for UUV - a solution to facilitate the writing and execution of E2E tests understandable by any human being(English or French) using cucumber(BDD) and cypress or playwright.",
|
|
5
5
|
"author": "Louis Fredice NJAKO MOLOM (https://github.com/luifr10) & Stanley SERVICAL (https://github.com/stanlee974)",
|
|
6
6
|
"license": "MIT",
|