@nbakka/mcp-appium 3.0.9 → 3.0.10

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 +29 -4
  2. package/package.json +2 -2
package/lib/server.js CHANGED
@@ -1464,10 +1464,35 @@ tool(
1464
1464
  return `${index + 1}. ${String(tc)} (New)`;
1465
1465
  }
1466
1466
 
1467
- const title = tc[0] || `Test Case ${index + 1}`;
1468
- const description = tc[1] || '';
1469
- const status = tc[2] || 'New';
1470
- const originalCase = tc[3] || '';
1467
+ // Handle different array structures based on length and content
1468
+ let title, description, status, originalCase;
1469
+
1470
+ if (tc.length === 4) {
1471
+ // Standard format: [title, description, status, originalCase]
1472
+ title = tc[0] || `Test Case ${index + 1}`;
1473
+ description = tc[1] || '';
1474
+ status = tc[2] || 'New';
1475
+ originalCase = tc[3] || '';
1476
+ } else if (tc.length === 3) {
1477
+ // Could be [title, status, originalCase] for remove cases
1478
+ title = tc[0] || `Test Case ${index + 1}`;
1479
+ if (tc[1] && tc[1].toLowerCase() === 'remove') {
1480
+ status = tc[1];
1481
+ originalCase = tc[2] || '';
1482
+ description = '';
1483
+ } else {
1484
+ // [title, description, status]
1485
+ description = tc[1] || '';
1486
+ status = tc[2] || 'New';
1487
+ originalCase = '';
1488
+ }
1489
+ } else {
1490
+ // Fallback
1491
+ title = tc[0] || `Test Case ${index + 1}`;
1492
+ description = tc[1] || '';
1493
+ status = tc[2] || 'New';
1494
+ originalCase = tc[3] || '';
1495
+ }
1471
1496
 
1472
1497
  const statusLower = status.toLowerCase();
1473
1498
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nbakka/mcp-appium",
3
- "version": "3.0.9",
3
+ "version": "3.0.10",
4
4
  "description": "Appium MCP",
5
5
  "engines": {
6
6
  "node": ">=18"
@@ -54,4 +54,4 @@
54
54
  "lib": "lib"
55
55
  },
56
56
  "author": "nbakka"
57
- }
57
+ }