@nbakka/mcp-appium 3.0.7 → 3.0.9
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 +30 -9
- package/package.json +1 -1
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
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
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
|
`;
|
|
@@ -1457,9 +1460,27 @@ tool(
|
|
|
1457
1460
|
|
|
1458
1461
|
// Format the approved test cases properly
|
|
1459
1462
|
const formattedTestCases = result.testCases.map((tc, index) => {
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
+
if (!Array.isArray(tc)) {
|
|
1464
|
+
return `${index + 1}. ${String(tc)} (New)`;
|
|
1465
|
+
}
|
|
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] || '';
|
|
1471
|
+
|
|
1472
|
+
const statusLower = status.toLowerCase();
|
|
1473
|
+
|
|
1474
|
+
if (statusLower === 'modify') {
|
|
1475
|
+
// For modify cases: show "Original: ... Changed to: ..." format with proper test ID
|
|
1476
|
+
return `${index + 1}. Original: ${title}\n Changed to: ${description} (Modify) (${originalCase})`;
|
|
1477
|
+
} else if (statusLower === 'remove') {
|
|
1478
|
+
// For remove cases: show title with Remove label and reference
|
|
1479
|
+
return `${index + 1}. ${title} (Remove) (${originalCase})`;
|
|
1480
|
+
} else {
|
|
1481
|
+
// For new cases: just show title with New label
|
|
1482
|
+
return `${index + 1}. ${title} (New)`;
|
|
1483
|
+
}
|
|
1463
1484
|
}).join('\n');
|
|
1464
1485
|
|
|
1465
1486
|
// Clean up session after returning result
|