@nbakka/mcp-appium 2.0.86 → 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 +22 -17
  2. package/package.json +1 -1
package/lib/server.js CHANGED
@@ -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!");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nbakka/mcp-appium",
3
- "version": "2.0.86",
3
+ "version": "2.0.87",
4
4
  "description": "Appium MCP",
5
5
  "engines": {
6
6
  "node": ">=18"