@nbakka/mcp-appium 2.0.85 → 2.0.87
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/lib/server.js +25 -20
- package/package.json +1 -1
package/lib/server.js
CHANGED
|
@@ -799,9 +799,9 @@ let approvalSessions = new Map();
|
|
|
799
799
|
|
|
800
800
|
tool(
|
|
801
801
|
"review_testcases",
|
|
802
|
-
"Open test cases in browser for manual approval.
|
|
802
|
+
"Open test cases in browser for manual approval.",
|
|
803
803
|
{
|
|
804
|
-
testCases: zod_1.z.array(zod_1.z.array(zod_1.z.string())).describe("
|
|
804
|
+
testCases: zod_1.z.array(zod_1.z.array(zod_1.z.string())).describe("test cases array generated by tool generate_testcases_from_ticket_data")
|
|
805
805
|
},
|
|
806
806
|
async ({ testCases }) => {
|
|
807
807
|
try {
|
|
@@ -817,22 +817,27 @@ tool(
|
|
|
817
817
|
};
|
|
818
818
|
|
|
819
819
|
testCases.forEach(tc => {
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
parsedTestCases.new.push(
|
|
825
|
-
} else if (
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
820
|
+
if (!tc || tc.length < 2) return; // Skip invalid entries
|
|
821
|
+
|
|
822
|
+
if (tc.length === 2 && tc[1].toLowerCase() === 'new') {
|
|
823
|
+
// Format: [description, "New"]
|
|
824
|
+
parsedTestCases.new.push(tc[0]);
|
|
825
|
+
} else if (tc.length === 4) {
|
|
826
|
+
const type = tc[2]?.toLowerCase();
|
|
827
|
+
if (type === 'modify') {
|
|
828
|
+
// Format: [originalDescription, newDescription, "Modify", testCaseId]
|
|
829
|
+
parsedTestCases.modify.push({
|
|
830
|
+
id: tc[3] || 'N/A',
|
|
831
|
+
original: tc[0], // Original description
|
|
832
|
+
modified: tc[1] // New/modified description
|
|
833
|
+
});
|
|
834
|
+
} else if (type === 'remove') {
|
|
835
|
+
// Format: [description, "", "Remove", testCaseId]
|
|
836
|
+
parsedTestCases.remove.push({
|
|
837
|
+
id: tc[3] || 'N/A',
|
|
838
|
+
description: tc[0]
|
|
839
|
+
});
|
|
840
|
+
}
|
|
836
841
|
}
|
|
837
842
|
});
|
|
838
843
|
|
|
@@ -871,7 +876,7 @@ tool(
|
|
|
871
876
|
const session = approvalSessions.get(sessionId);
|
|
872
877
|
if (session) {
|
|
873
878
|
session.status = 'approved';
|
|
874
|
-
session.finalTestCases = req.body;
|
|
879
|
+
session.finalTestCases = req.body;
|
|
875
880
|
approvalSessions.set(sessionId, session);
|
|
876
881
|
}
|
|
877
882
|
res.send("✓ Test cases approved successfully!");
|
|
@@ -942,8 +947,8 @@ tool(
|
|
|
942
947
|
sessionId: zod_1.z.string().describe("The session ID returned from review_testcases tool")
|
|
943
948
|
},
|
|
944
949
|
async ({ sessionId }) => {
|
|
950
|
+
await new Promise(resolve => setTimeout(resolve, 25000));
|
|
945
951
|
const session = approvalSessions.get(sessionId);
|
|
946
|
-
|
|
947
952
|
if (!session) {
|
|
948
953
|
return JSON.stringify({
|
|
949
954
|
status: "error",
|