@nbakka/mcp-appium 3.0.8 → 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 +40 -12
  2. package/package.json +2 -2
package/lib/server.js CHANGED
@@ -1173,11 +1173,14 @@ tool(
1173
1173
  ${processedTestCases.map((testCase, index) => {
1174
1174
  const displayText = getTestCaseDisplayText(testCase);
1175
1175
  const statusLabel = testCase.status === 'Remove' ? 'Remove' : testCase.status;
1176
- const refText = testCase.originalCase && testCase.status.toLowerCase() === 'remove'
1177
- ? `Ref: ${testCase.originalCase}`
1178
- : testCase.originalCase && testCase.status.toLowerCase() !== 'modify'
1179
- ? `Ref: ${testCase.originalCase}`
1180
- : '';
1176
+
1177
+ // Create proper label and test ID display for modify/remove cases
1178
+ let labelAndIdDisplay = '';
1179
+ if (testCase.status.toLowerCase() === 'modify' && testCase.originalCase) {
1180
+ labelAndIdDisplay = `<div style="margin-bottom: 8px; font-weight: 600; color: #856404; font-size: 13px;">Modify - ${testCase.originalCase}</div>`;
1181
+ } else if (testCase.status.toLowerCase() === 'remove' && testCase.originalCase) {
1182
+ labelAndIdDisplay = `<div style="margin-bottom: 8px; font-weight: 600; color: #721c24; font-size: 13px;">Remove - ${testCase.originalCase}</div>`;
1183
+ }
1181
1184
 
1182
1185
  return `
1183
1186
  <div class="test-case" data-index="${index}">
@@ -1185,10 +1188,10 @@ tool(
1185
1188
  <div class="test-case-meta">
1186
1189
  <span class="test-case-index">#${index + 1}</span>
1187
1190
  <span class="test-case-status status-${testCase.status.toLowerCase()}">${statusLabel}</span>
1188
- ${refText ? `<span style="font-size: 12px; color: #6c757d;">${refText}</span>` : ''}
1189
1191
  </div>
1190
1192
  <button class="btn btn-delete" onclick="toggleDelete(${index})">Delete</button>
1191
1193
  </div>
1194
+ ${labelAndIdDisplay}
1192
1195
  <textarea data-index="${index}" placeholder="Enter test case details...">${displayText}</textarea>
1193
1196
  </div>
1194
1197
  `;
@@ -1461,16 +1464,41 @@ tool(
1461
1464
  return `${index + 1}. ${String(tc)} (New)`;
1462
1465
  }
1463
1466
 
1464
- const title = tc[0] || `Test Case ${index + 1}`;
1465
- const description = tc[1] || '';
1466
- const status = tc[2] || 'New';
1467
- 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
+ }
1468
1496
 
1469
1497
  const statusLower = status.toLowerCase();
1470
1498
 
1471
1499
  if (statusLower === 'modify') {
1472
- // For modify cases: show "Original: ... Changed to: ..." format
1473
- return `${index + 1}. Original: ${description || 'Not specified'}\n Changed to: ${title} (Modify) (${originalCase})`;
1500
+ // For modify cases: show "Original: ... Changed to: ..." format with proper test ID
1501
+ return `${index + 1}. Original: ${title}\n Changed to: ${description} (Modify) (${originalCase})`;
1474
1502
  } else if (statusLower === 'remove') {
1475
1503
  // For remove cases: show title with Remove label and reference
1476
1504
  return `${index + 1}. ${title} (Remove) (${originalCase})`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nbakka/mcp-appium",
3
- "version": "3.0.8",
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
+ }