@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.
- package/lib/server.js +29 -4
- 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
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
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
|
|