@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.
Files changed (2) hide show
  1. package/lib/server.js +25 -20
  2. 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. Accepts test cases in format: [description, type, id?]",
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("Array of test case arrays: [description, type, id?] where type is 'New', 'Modify', or 'Remove'")
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
- const [description, type, id] = tc;
821
- const typeKey = type.toLowerCase();
822
-
823
- if (typeKey === 'new') {
824
- parsedTestCases.new.push(description);
825
- } else if (typeKey === 'modify') {
826
- parsedTestCases.modify.push({
827
- id: id || 'N/A',
828
- original: description,
829
- modified: description // Default to original, user can edit
830
- });
831
- } else if (typeKey === 'remove') {
832
- parsedTestCases.remove.push({
833
- id: id || 'N/A',
834
- description: description
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; // Store the final approved test cases
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nbakka/mcp-appium",
3
- "version": "2.0.85",
3
+ "version": "2.0.87",
4
4
  "description": "Appium MCP",
5
5
  "engines": {
6
6
  "node": ">=18"