@uuv/mcp-server 0.4.0 → 0.4.1
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 +101 -32
- package/dist/CHANGELOG.md +12 -0
- package/dist/README.md +101 -32
- package/dist/lib/mcp-server-factory.js +1 -3
- package/dist/lib/prompts/generate_test_click_element.mustache +8 -0
- package/dist/lib/prompts/generate_test_expect_element.mustache +8 -0
- package/dist/lib/prompts/generate_test_expect_table.mustache +9 -0
- package/dist/lib/prompts/generate_test_type_element.mustache +8 -0
- package/dist/lib/prompts/generate_test_within_element.mustache +8 -0
- package/dist/lib/services/prompt-retriever.service.d.ts +9 -40
- package/dist/lib/services/prompt-retriever.service.js +2 -10
- package/dist/package.json +5 -3
- package/package.json +7 -5
package/README.md
CHANGED
|
@@ -7,38 +7,6 @@ This library is an MCP (Model Context Protocol) server for UUV - a solution to f
|
|
|
7
7
|
- Opencode, Claude Desktop, Goose or any other MCP client
|
|
8
8
|
- [Playwright MCP Server](https://github.com/microsoft/playwright-mcp)
|
|
9
9
|
|
|
10
|
-
## Exposed MCP Tools
|
|
11
|
-
|
|
12
|
-
This MCP server exposes the following tools:
|
|
13
|
-
|
|
14
|
-
### retrieve_prompt
|
|
15
|
-
- **Description**: Retrieve a uuv prompt template for a coding agent based on a prompt name and arguments.
|
|
16
|
-
- **Input Schema**:
|
|
17
|
-
- `promptName` (enum): Either "generate_table" or "generate_role_and_name"
|
|
18
|
-
- `baseUrl` (string): The base URL of the page
|
|
19
|
-
- For generate_role_and_name:
|
|
20
|
-
- `accessibleName` (string, optional): Accessible name
|
|
21
|
-
- `accessibleRole` (string, optional): Accessible role
|
|
22
|
-
|
|
23
|
-
### available_sentences
|
|
24
|
-
- **Description**: List all available UUV test sentences/phrases in Gherkin format.
|
|
25
|
-
- **Input Schema**:
|
|
26
|
-
- `category` (enum, optional): Filters sentences by action type (general, keyboard, click, contains, type, checkable)
|
|
27
|
-
- `role` (string, optional): Filters sentences related to an accessible role
|
|
28
|
-
|
|
29
|
-
### generate_role_and_name
|
|
30
|
-
- **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence of an element with specified accessible name and role.
|
|
31
|
-
- **Input Schema**:
|
|
32
|
-
- `baseUrl` (string): The base URL of the page where the element is located
|
|
33
|
-
- `accessibleName` (string): Accessible name of the element
|
|
34
|
-
- `accessibleRole` (string): Accessible role of the element
|
|
35
|
-
|
|
36
|
-
### generate_table
|
|
37
|
-
- **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence and content of html table, grid or treegrid.
|
|
38
|
-
- **Input Schema**:
|
|
39
|
-
- `baseUrl` (string): The base URL of the page where the table/grid/treegrid is located
|
|
40
|
-
- `innerHtmlFilePath` (string): File path containing the raw innerHTML content
|
|
41
|
-
|
|
42
10
|
## Getting started
|
|
43
11
|
|
|
44
12
|
First, install the UUV MCP server with your client.
|
|
@@ -119,3 +87,104 @@ gemini extensions uninstall uuv-e2e-accessibility-test
|
|
|
119
87
|
```
|
|
120
88
|
|
|
121
89
|
</details>
|
|
90
|
+
|
|
91
|
+
## Exposed MCP Tools
|
|
92
|
+
|
|
93
|
+
This MCP server exposes the following tools:
|
|
94
|
+
|
|
95
|
+
### retrieve_prompt
|
|
96
|
+
- **Description**: Retrieve an uuv prompt template for a coding agent based on a prompt name and arguments.
|
|
97
|
+
- **Input Schema**:
|
|
98
|
+
- `promptName` (enum): Either `generate_test_expect_table`, `generate_test_expect_element`, `generate_test_click_element`, `generate_test_within_element` or `generate_test_type_element`
|
|
99
|
+
- `baseUrl` (string): The base URL of the page
|
|
100
|
+
- For `generate_test_expect_table`, `generate_test_expect_element`, `generate_test_click_element`, `generate_test_within_element` or `generate_test_type_element`:
|
|
101
|
+
- `accessibleName`: (string, optional): Accessible name
|
|
102
|
+
- `accessibleRole`: (string, optional): Accessible role
|
|
103
|
+
- `domSelector`: Dom selector of the element
|
|
104
|
+
|
|
105
|
+
### available_sentences
|
|
106
|
+
- **Description**: List all available UUV test sentences/phrases in Gherkin format.
|
|
107
|
+
- **Input Schema**:
|
|
108
|
+
- `category` (enum, optional): Filters sentences by action type (general, keyboard, click, contains, type, checkable)
|
|
109
|
+
- `role` (string, optional): Filters sentences related to an accessible role
|
|
110
|
+
|
|
111
|
+
### generate_test_expect_element
|
|
112
|
+
- **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence of an element with specified (role and name) or domSelector.
|
|
113
|
+
- **Input Schema**:
|
|
114
|
+
- `baseUrl` (string): The base URL of the page where the element is located
|
|
115
|
+
- `accessibleName` (string): Accessible name of the element
|
|
116
|
+
- `accessibleRole` (string): Accessible role of the element
|
|
117
|
+
- `domSelector`: Dom selector of the element
|
|
118
|
+
|
|
119
|
+
### generate_test_expect_element
|
|
120
|
+
- **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence of an element with specified (role and name) or domSelector.
|
|
121
|
+
- **Input Schema**:
|
|
122
|
+
- `baseUrl` (string): The base URL of the page where the element is located
|
|
123
|
+
- `accessibleName` (string): Accessible name of the element
|
|
124
|
+
- `accessibleRole` (string): Accessible role of the element
|
|
125
|
+
- `domSelector`: Dom selector of the element
|
|
126
|
+
|
|
127
|
+
### generate_test_click_element
|
|
128
|
+
- **Description**: Generate a complete UUV test scenario (Gherkin format) that clicks on html element with specified (role and name) or domSelector.
|
|
129
|
+
- **Input Schema**:
|
|
130
|
+
- `baseUrl` (string): The base URL of the page where the element is located
|
|
131
|
+
- `accessibleName` (string): Accessible name of the element
|
|
132
|
+
- `accessibleRole` (string): Accessible role of the element
|
|
133
|
+
- `domSelector`: Dom selector of the element
|
|
134
|
+
|
|
135
|
+
### generate_test_type_element
|
|
136
|
+
- **Description**: Generate a complete UUV test scenario (Gherkin format) that focus within a html element with specified (role and name) or domSelector.
|
|
137
|
+
- **Input Schema**:
|
|
138
|
+
- `baseUrl` (string): The base URL of the page where the element is located
|
|
139
|
+
- `accessibleName` (string): Accessible name of the element
|
|
140
|
+
- `accessibleRole` (string): Accessible role of the element
|
|
141
|
+
- `domSelector`: Dom selector of the element
|
|
142
|
+
|
|
143
|
+
### generate_test_expect_table
|
|
144
|
+
- **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence and content of html table, grid or treegrid.
|
|
145
|
+
- **Input Schema**:
|
|
146
|
+
- `baseUrl` (string): The base URL of the page where the table/grid/treegrid is located
|
|
147
|
+
- `innerHtmlFilePath` (string): File path containing the raw innerHTML content
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
## Exposed MCP Prompts
|
|
151
|
+
|
|
152
|
+
This MCP server exposes the following prompts:
|
|
153
|
+
|
|
154
|
+
### generate_test_expect_element
|
|
155
|
+
- **Description**: Returns UUV prompt to verify the presence of an element with specified (role and name) or domSelector.
|
|
156
|
+
- **Input Schema**:
|
|
157
|
+
- `baseUrl` (string): The base URL of the page where the element is located
|
|
158
|
+
- `accessibleName` (string): Accessible name of the element
|
|
159
|
+
- `accessibleRole` (string): Accessible role of the element
|
|
160
|
+
- `domSelector`: Dom selector of the element
|
|
161
|
+
|
|
162
|
+
### generate_test_expect_element
|
|
163
|
+
- **Description**: Returns UUV prompt to verify the presence of an element with specified (role and name) or domSelector.
|
|
164
|
+
- **Input Schema**:
|
|
165
|
+
- `baseUrl` (string): The base URL of the page where the element is located
|
|
166
|
+
- `accessibleName` (string): Accessible name of the element
|
|
167
|
+
- `accessibleRole` (string): Accessible role of the element
|
|
168
|
+
- `domSelector`: Dom selector of the element
|
|
169
|
+
|
|
170
|
+
### generate_test_click_element
|
|
171
|
+
- **Description**: Returns UUV prompt that clicks on html element with specified (role and name) or domSelector.
|
|
172
|
+
- **Input Schema**:
|
|
173
|
+
- `baseUrl` (string): The base URL of the page where the element is located
|
|
174
|
+
- `accessibleName` (string): Accessible name of the element
|
|
175
|
+
- `accessibleRole` (string): Accessible role of the element
|
|
176
|
+
- `domSelector`: Dom selector of the element
|
|
177
|
+
|
|
178
|
+
### generate_test_type_element
|
|
179
|
+
- **Description**: Returns UUV prompt that focus within a html element with specified (role and name) or domSelector.
|
|
180
|
+
- **Input Schema**:
|
|
181
|
+
- `baseUrl` (string): The base URL of the page where the element is located
|
|
182
|
+
- `accessibleName` (string): Accessible name of the element
|
|
183
|
+
- `accessibleRole` (string): Accessible role of the element
|
|
184
|
+
- `domSelector`: Dom selector of the element
|
|
185
|
+
|
|
186
|
+
### generate_test_expect_table
|
|
187
|
+
- **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence and content of html table, grid or treegrid.
|
|
188
|
+
- **Input Schema**:
|
|
189
|
+
- `baseUrl` (string): The base URL of the page where the table/grid/treegrid is located
|
|
190
|
+
- `innerHtmlFilePath` (string): File path containing the raw innerHTML content
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [0.4.0](https://github.com/e2e-test-quest/uuv/compare/mcp-server-v0.3.0...mcp-server-v0.4.0) (2025-12-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **mcp-server:** correct type prompt template ([114e817](https://github.com/e2e-test-quest/uuv/commit/114e81791991df8919150c26b566ceaedea0e013))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **mcp-server:** add mcp prompts, [#1171](https://github.com/e2e-test-quest/uuv/issues/1171) ([4e7eb52](https://github.com/e2e-test-quest/uuv/commit/4e7eb521ae73cb5e3de095a8cb917f17ebb0c6bb))
|
|
12
|
+
|
|
1
13
|
# [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
14
|
|
|
3
15
|
|
package/dist/README.md
CHANGED
|
@@ -7,38 +7,6 @@ This library is an MCP (Model Context Protocol) server for UUV - a solution to f
|
|
|
7
7
|
- Opencode, Claude Desktop, Goose or any other MCP client
|
|
8
8
|
- [Playwright MCP Server](https://github.com/microsoft/playwright-mcp)
|
|
9
9
|
|
|
10
|
-
## Exposed MCP Tools
|
|
11
|
-
|
|
12
|
-
This MCP server exposes the following tools:
|
|
13
|
-
|
|
14
|
-
### retrieve_prompt
|
|
15
|
-
- **Description**: Retrieve a uuv prompt template for a coding agent based on a prompt name and arguments.
|
|
16
|
-
- **Input Schema**:
|
|
17
|
-
- `promptName` (enum): Either "generate_table" or "generate_role_and_name"
|
|
18
|
-
- `baseUrl` (string): The base URL of the page
|
|
19
|
-
- For generate_role_and_name:
|
|
20
|
-
- `accessibleName` (string, optional): Accessible name
|
|
21
|
-
- `accessibleRole` (string, optional): Accessible role
|
|
22
|
-
|
|
23
|
-
### available_sentences
|
|
24
|
-
- **Description**: List all available UUV test sentences/phrases in Gherkin format.
|
|
25
|
-
- **Input Schema**:
|
|
26
|
-
- `category` (enum, optional): Filters sentences by action type (general, keyboard, click, contains, type, checkable)
|
|
27
|
-
- `role` (string, optional): Filters sentences related to an accessible role
|
|
28
|
-
|
|
29
|
-
### generate_role_and_name
|
|
30
|
-
- **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence of an element with specified accessible name and role.
|
|
31
|
-
- **Input Schema**:
|
|
32
|
-
- `baseUrl` (string): The base URL of the page where the element is located
|
|
33
|
-
- `accessibleName` (string): Accessible name of the element
|
|
34
|
-
- `accessibleRole` (string): Accessible role of the element
|
|
35
|
-
|
|
36
|
-
### generate_table
|
|
37
|
-
- **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence and content of html table, grid or treegrid.
|
|
38
|
-
- **Input Schema**:
|
|
39
|
-
- `baseUrl` (string): The base URL of the page where the table/grid/treegrid is located
|
|
40
|
-
- `innerHtmlFilePath` (string): File path containing the raw innerHTML content
|
|
41
|
-
|
|
42
10
|
## Getting started
|
|
43
11
|
|
|
44
12
|
First, install the UUV MCP server with your client.
|
|
@@ -119,3 +87,104 @@ gemini extensions uninstall uuv-e2e-accessibility-test
|
|
|
119
87
|
```
|
|
120
88
|
|
|
121
89
|
</details>
|
|
90
|
+
|
|
91
|
+
## Exposed MCP Tools
|
|
92
|
+
|
|
93
|
+
This MCP server exposes the following tools:
|
|
94
|
+
|
|
95
|
+
### retrieve_prompt
|
|
96
|
+
- **Description**: Retrieve an uuv prompt template for a coding agent based on a prompt name and arguments.
|
|
97
|
+
- **Input Schema**:
|
|
98
|
+
- `promptName` (enum): Either `generate_test_expect_table`, `generate_test_expect_element`, `generate_test_click_element`, `generate_test_within_element` or `generate_test_type_element`
|
|
99
|
+
- `baseUrl` (string): The base URL of the page
|
|
100
|
+
- For `generate_test_expect_table`, `generate_test_expect_element`, `generate_test_click_element`, `generate_test_within_element` or `generate_test_type_element`:
|
|
101
|
+
- `accessibleName`: (string, optional): Accessible name
|
|
102
|
+
- `accessibleRole`: (string, optional): Accessible role
|
|
103
|
+
- `domSelector`: Dom selector of the element
|
|
104
|
+
|
|
105
|
+
### available_sentences
|
|
106
|
+
- **Description**: List all available UUV test sentences/phrases in Gherkin format.
|
|
107
|
+
- **Input Schema**:
|
|
108
|
+
- `category` (enum, optional): Filters sentences by action type (general, keyboard, click, contains, type, checkable)
|
|
109
|
+
- `role` (string, optional): Filters sentences related to an accessible role
|
|
110
|
+
|
|
111
|
+
### generate_test_expect_element
|
|
112
|
+
- **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence of an element with specified (role and name) or domSelector.
|
|
113
|
+
- **Input Schema**:
|
|
114
|
+
- `baseUrl` (string): The base URL of the page where the element is located
|
|
115
|
+
- `accessibleName` (string): Accessible name of the element
|
|
116
|
+
- `accessibleRole` (string): Accessible role of the element
|
|
117
|
+
- `domSelector`: Dom selector of the element
|
|
118
|
+
|
|
119
|
+
### generate_test_expect_element
|
|
120
|
+
- **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence of an element with specified (role and name) or domSelector.
|
|
121
|
+
- **Input Schema**:
|
|
122
|
+
- `baseUrl` (string): The base URL of the page where the element is located
|
|
123
|
+
- `accessibleName` (string): Accessible name of the element
|
|
124
|
+
- `accessibleRole` (string): Accessible role of the element
|
|
125
|
+
- `domSelector`: Dom selector of the element
|
|
126
|
+
|
|
127
|
+
### generate_test_click_element
|
|
128
|
+
- **Description**: Generate a complete UUV test scenario (Gherkin format) that clicks on html element with specified (role and name) or domSelector.
|
|
129
|
+
- **Input Schema**:
|
|
130
|
+
- `baseUrl` (string): The base URL of the page where the element is located
|
|
131
|
+
- `accessibleName` (string): Accessible name of the element
|
|
132
|
+
- `accessibleRole` (string): Accessible role of the element
|
|
133
|
+
- `domSelector`: Dom selector of the element
|
|
134
|
+
|
|
135
|
+
### generate_test_type_element
|
|
136
|
+
- **Description**: Generate a complete UUV test scenario (Gherkin format) that focus within a html element with specified (role and name) or domSelector.
|
|
137
|
+
- **Input Schema**:
|
|
138
|
+
- `baseUrl` (string): The base URL of the page where the element is located
|
|
139
|
+
- `accessibleName` (string): Accessible name of the element
|
|
140
|
+
- `accessibleRole` (string): Accessible role of the element
|
|
141
|
+
- `domSelector`: Dom selector of the element
|
|
142
|
+
|
|
143
|
+
### generate_test_expect_table
|
|
144
|
+
- **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence and content of html table, grid or treegrid.
|
|
145
|
+
- **Input Schema**:
|
|
146
|
+
- `baseUrl` (string): The base URL of the page where the table/grid/treegrid is located
|
|
147
|
+
- `innerHtmlFilePath` (string): File path containing the raw innerHTML content
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
## Exposed MCP Prompts
|
|
151
|
+
|
|
152
|
+
This MCP server exposes the following prompts:
|
|
153
|
+
|
|
154
|
+
### generate_test_expect_element
|
|
155
|
+
- **Description**: Returns UUV prompt to verify the presence of an element with specified (role and name) or domSelector.
|
|
156
|
+
- **Input Schema**:
|
|
157
|
+
- `baseUrl` (string): The base URL of the page where the element is located
|
|
158
|
+
- `accessibleName` (string): Accessible name of the element
|
|
159
|
+
- `accessibleRole` (string): Accessible role of the element
|
|
160
|
+
- `domSelector`: Dom selector of the element
|
|
161
|
+
|
|
162
|
+
### generate_test_expect_element
|
|
163
|
+
- **Description**: Returns UUV prompt to verify the presence of an element with specified (role and name) or domSelector.
|
|
164
|
+
- **Input Schema**:
|
|
165
|
+
- `baseUrl` (string): The base URL of the page where the element is located
|
|
166
|
+
- `accessibleName` (string): Accessible name of the element
|
|
167
|
+
- `accessibleRole` (string): Accessible role of the element
|
|
168
|
+
- `domSelector`: Dom selector of the element
|
|
169
|
+
|
|
170
|
+
### generate_test_click_element
|
|
171
|
+
- **Description**: Returns UUV prompt that clicks on html element with specified (role and name) or domSelector.
|
|
172
|
+
- **Input Schema**:
|
|
173
|
+
- `baseUrl` (string): The base URL of the page where the element is located
|
|
174
|
+
- `accessibleName` (string): Accessible name of the element
|
|
175
|
+
- `accessibleRole` (string): Accessible role of the element
|
|
176
|
+
- `domSelector`: Dom selector of the element
|
|
177
|
+
|
|
178
|
+
### generate_test_type_element
|
|
179
|
+
- **Description**: Returns UUV prompt that focus within a html element with specified (role and name) or domSelector.
|
|
180
|
+
- **Input Schema**:
|
|
181
|
+
- `baseUrl` (string): The base URL of the page where the element is located
|
|
182
|
+
- `accessibleName` (string): Accessible name of the element
|
|
183
|
+
- `accessibleRole` (string): Accessible role of the element
|
|
184
|
+
- `domSelector`: Dom selector of the element
|
|
185
|
+
|
|
186
|
+
### generate_test_expect_table
|
|
187
|
+
- **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence and content of html table, grid or treegrid.
|
|
188
|
+
- **Input Schema**:
|
|
189
|
+
- `baseUrl` (string): The base URL of the page where the table/grid/treegrid is located
|
|
190
|
+
- `innerHtmlFilePath` (string): File path containing the raw innerHTML content
|
|
@@ -93,7 +93,6 @@ function createUUVServer() {
|
|
|
93
93
|
description: prompt_retriever_service_1.uuvPrompts[prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT].description,
|
|
94
94
|
argsSchema: {
|
|
95
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
96
|
accessibleName: zod_1.z.string().optional().describe("Accessible name of the element"),
|
|
98
97
|
accessibleRole: zod_1.z.string().optional().describe("Accessible role of the element"),
|
|
99
98
|
domSelector: zod_1.z.string().optional().describe("Dom selector of the element")
|
|
@@ -127,8 +126,7 @@ function createUUVServer() {
|
|
|
127
126
|
// generate_test_* Fields
|
|
128
127
|
accessibleName: zod_1.z.string().optional().describe("Accessible name"),
|
|
129
128
|
accessibleRole: zod_1.z.string().optional().describe("Accessible role"),
|
|
130
|
-
domSelector: zod_1.z.string().optional().describe("Dom selector of the element")
|
|
131
|
-
valueToType: zod_1.z.string().optional().describe("Value to type")
|
|
129
|
+
domSelector: zod_1.z.string().optional().describe("Dom selector of the target element")
|
|
132
130
|
},
|
|
133
131
|
}, async ({ ...args }) => {
|
|
134
132
|
return {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Use UUV and Filesystem MCP tools:
|
|
2
|
+
{{#domSelector}}
|
|
3
|
+
1. With uuv_generate_test_click_element, Generate UUV tests into ./uuv/e2e to click on an element with domSelector "{{{domSelector}}}" exist on the webpage {{{baseUrl}}}
|
|
4
|
+
{{/domSelector}}
|
|
5
|
+
{{^domSelector}}
|
|
6
|
+
1. With uuv_generate_test_click_element, Generate UUV tests into ./uuv/e2e to click on an element with accessibleName "{{accessibleName}}" and accessibleRole "{{accessibleRole}}" exist on the webpage {{{baseUrl}}}
|
|
7
|
+
{{/domSelector}}
|
|
8
|
+
2. Write generated uuv test case into a .feature file in local folder ./uuv/e2e (must use actual line breaks, not literal "\n" characters)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Use UUV and Filesystem MCP tools:
|
|
2
|
+
{{#domSelector}}
|
|
3
|
+
1. With uuv_generate_test_expect_element, Generate UUV tests into ./uuv/e2e to verify that an element with domSelector "{{{domSelector}}}" exist on the webpage {{{baseUrl}}}
|
|
4
|
+
{{/domSelector}}
|
|
5
|
+
{{^domSelector}}
|
|
6
|
+
1. With uuv_generate_test_expect_element, Generate UUV tests into ./uuv/e2e to verify that an element with accessibleName "{{accessibleName}}" and accessibleRole "{{accessibleRole}}" exist on the webpage {{{baseUrl}}}
|
|
7
|
+
{{/domSelector}}
|
|
8
|
+
2. Write generated uuv test case into a .feature file in local folder ./uuv/e2e (must use actual line breaks, not literal "\n" characters)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Use the Playwright and UUV MCP tools:
|
|
2
|
+
1. Open a browser, then navigate to {{{baseUrl}}}
|
|
3
|
+
2. Evaluate exactly, ensuring that the extracted HTML is not truncated: document.querySelector('table').outerHTML
|
|
4
|
+
3. Write resulting HTML of the previous step into a file named extraction.html in the current project directory
|
|
5
|
+
4. With uuv_generate_Table, Generate UUV tests into ./uuv/e2e to verify the html table with absolute path /workspaces/opensource/weather-app/extraction.html
|
|
6
|
+
5. Write generated uuv test into a .feature file in local folder ./uuv/e2e (must use actual line breaks, not literal "\n" characters)
|
|
7
|
+
|
|
8
|
+
IMPORTANT:
|
|
9
|
+
- When Playwright returns the result, ignore any console logs or debug lines.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Use UUV and Filesystem MCP tools:
|
|
2
|
+
{{#domSelector}}
|
|
3
|
+
1. With uuv_generate_test_type_element, Generate UUV tests into ./uuv/e2e to type sentence or value into an element with domSelector "{{{domSelector}}}" exist on the webpage {{{baseUrl}}}
|
|
4
|
+
{{/domSelector}}
|
|
5
|
+
{{^domSelector}}
|
|
6
|
+
1. With uuv_generate_test_type_element, Generate UUV tests into ./uuv/e2e to type sentence or value into an element with accessibleName "{{accessibleName}}" and accessibleRole "{{accessibleRole}}" exist on the webpage {{{baseUrl}}}
|
|
7
|
+
{{/domSelector}}
|
|
8
|
+
2. Write generated uuv test case into a .feature file in local folder ./uuv/e2e (must use actual line breaks, not literal "\n" characters)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Use UUV and Filesystem MCP tools:
|
|
2
|
+
{{#domSelector}}
|
|
3
|
+
1. With uuv_generate_test_within_element, Generate UUV tests into ./uuv/e2e to focus on an element with domSelector "{{{domSelector}}}" exist on the webpage {{{baseUrl}}}
|
|
4
|
+
{{/domSelector}}
|
|
5
|
+
{{^domSelector}}
|
|
6
|
+
1. With uuv_generate_test_within_element, Generate UUV tests into ./uuv/e2e to focus on an element with accessibleName "{{accessibleName}}" and accessibleRole "{{accessibleRole}}" exist on the webpage {{{baseUrl}}}
|
|
7
|
+
{{/domSelector}}
|
|
8
|
+
2. Write generated uuv test case into a .feature file in local folder ./uuv/e2e (must use actual line breaks, not literal "\n" characters)
|
|
@@ -32,52 +32,21 @@ export declare const uuvPrompts: {
|
|
|
32
32
|
description: string;
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
export declare const UUVPromptInputSchema: z.
|
|
35
|
+
export declare const UUVPromptInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
36
36
|
promptName: z.ZodLiteral<UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE>;
|
|
37
37
|
baseUrl: z.ZodString;
|
|
38
|
-
},
|
|
39
|
-
promptName:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
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]>;
|
|
38
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
39
|
+
promptName: z.ZodEnum<{
|
|
40
|
+
generate_test_expect_element: UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT;
|
|
41
|
+
generate_test_click_element: UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT;
|
|
42
|
+
generate_test_within_element: UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT;
|
|
43
|
+
generate_test_type_element: UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT;
|
|
44
|
+
}>;
|
|
46
45
|
baseUrl: z.ZodString;
|
|
47
46
|
accessibleName: z.ZodOptional<z.ZodString>;
|
|
48
47
|
accessibleRole: z.ZodOptional<z.ZodString>;
|
|
49
48
|
domSelector: z.ZodOptional<z.ZodString>;
|
|
50
|
-
},
|
|
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
|
-
}>;
|
|
49
|
+
}, z.core.$strip>], "promptName">;
|
|
81
50
|
export declare class PromptRetrieverService {
|
|
82
51
|
private static loadPromptTemplate;
|
|
83
52
|
private static generatePrompt;
|
|
@@ -87,22 +87,14 @@ class PromptRetrieverService {
|
|
|
87
87
|
promptName: zod_1.z.enum([
|
|
88
88
|
UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT,
|
|
89
89
|
UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT,
|
|
90
|
-
UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT
|
|
91
|
-
]),
|
|
92
|
-
baseUrl: zod_1.z.string().describe("The base URL of the page where the element is located."),
|
|
93
|
-
accessibleName: zod_1.z.string().optional().describe("Accessible name of the element"),
|
|
94
|
-
accessibleRole: zod_1.z.string().optional().describe("Accessible role of the element"),
|
|
95
|
-
domSelector: zod_1.z.string().optional().describe("Dom selector of the element"),
|
|
96
|
-
}),
|
|
97
|
-
zod_1.z.object({
|
|
98
|
-
promptName: zod_1.z.enum([
|
|
90
|
+
UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT,
|
|
99
91
|
UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT
|
|
100
92
|
]),
|
|
101
93
|
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
94
|
accessibleName: zod_1.z.string().optional().describe("Accessible name of the element"),
|
|
104
95
|
accessibleRole: zod_1.z.string().optional().describe("Accessible role of the element"),
|
|
105
96
|
domSelector: zod_1.z.string().optional().describe("Dom selector of the element"),
|
|
97
|
+
// valueToType: z.string().describe("Value to type"), TODO: implement this arg for UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT
|
|
106
98
|
})
|
|
107
99
|
]).superRefine((data, ctx) => {
|
|
108
100
|
if (data.promptName === UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT ||
|
package/dist/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",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"start": "ts-node src/lib/mcp-server.ts",
|
|
43
43
|
"inspector": "npx @modelcontextprotocol/inspector --config test-mcp.json --server default-server",
|
|
44
44
|
"lint": "npx eslint . --ext .js,.ts,.feature --fix",
|
|
45
|
+
"build-copy-prompt-templates": "copyfiles -u 1 \"src/lib/prompts/**/*\" dist",
|
|
45
46
|
"tests": "jest --coverage --config=./jest.config.ts",
|
|
46
47
|
"package": "npm pack --pack-destination=\"../../dist/packages\""
|
|
47
48
|
},
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
}
|
|
57
58
|
},
|
|
58
59
|
"dependencies": {
|
|
59
|
-
"@modelcontextprotocol/sdk": "1.
|
|
60
|
+
"@modelcontextprotocol/sdk": "1.24.3",
|
|
60
61
|
"@types/mustache": "^4.2.6",
|
|
61
62
|
"@uuv/assistant": "2.74.0",
|
|
62
63
|
"@uuv/dictionary": "0.2.0",
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
"mustache": "^4.2.0",
|
|
65
66
|
"tsconfig-paths": "4.2.0",
|
|
66
67
|
"tslib": "2.3.0",
|
|
67
|
-
"zod": "
|
|
68
|
+
"zod": "4.1.13"
|
|
68
69
|
},
|
|
69
70
|
"funding": {
|
|
70
71
|
"type": "opencollective",
|
|
@@ -72,6 +73,7 @@
|
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
75
|
"@modelcontextprotocol/inspector": "^0.17.2",
|
|
76
|
+
"copyfiles": "^2.4.1",
|
|
75
77
|
"ts-node": "^10.9.2"
|
|
76
78
|
}
|
|
77
79
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uuv/mcp-server",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
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",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"start": "ts-node src/lib/mcp-server.ts",
|
|
43
43
|
"inspector": "npx @modelcontextprotocol/inspector --config test-mcp.json --server default-server",
|
|
44
44
|
"lint": "npx eslint . --ext .js,.ts,.feature --fix",
|
|
45
|
+
"build-copy-prompt-templates": "copyfiles -u 1 \"src/lib/prompts/**/*\" dist",
|
|
45
46
|
"tests": "jest --coverage --config=./jest.config.ts",
|
|
46
47
|
"package": "npm pack --pack-destination=\"../../dist/packages\""
|
|
47
48
|
},
|
|
@@ -56,15 +57,15 @@
|
|
|
56
57
|
}
|
|
57
58
|
},
|
|
58
59
|
"dependencies": {
|
|
59
|
-
"@modelcontextprotocol/sdk": "1.
|
|
60
|
+
"@modelcontextprotocol/sdk": "1.24.3",
|
|
60
61
|
"@types/mustache": "^4.2.6",
|
|
61
|
-
"@uuv/assistant": "2.74.
|
|
62
|
-
"@uuv/dictionary": "0.2.
|
|
62
|
+
"@uuv/assistant": "2.74.1",
|
|
63
|
+
"@uuv/dictionary": "0.2.1",
|
|
63
64
|
"jsdom": "26.1.0",
|
|
64
65
|
"mustache": "^4.2.0",
|
|
65
66
|
"tsconfig-paths": "4.2.0",
|
|
66
67
|
"tslib": "2.3.0",
|
|
67
|
-
"zod": "
|
|
68
|
+
"zod": "4.1.13"
|
|
68
69
|
},
|
|
69
70
|
"funding": {
|
|
70
71
|
"type": "opencollective",
|
|
@@ -72,6 +73,7 @@
|
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
75
|
"@modelcontextprotocol/inspector": "^0.17.2",
|
|
76
|
+
"copyfiles": "^2.4.1",
|
|
75
77
|
"ts-node": "^10.9.2"
|
|
76
78
|
}
|
|
77
79
|
}
|