@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.
- package/lib/server.js +22 -17
- 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
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
parsedTestCases.new.push(
|
|
825
|
-
} else if (
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
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;
|
|
879
|
+
session.finalTestCases = req.body;
|
|
875
880
|
approvalSessions.set(sessionId, session);
|
|
876
881
|
}
|
|
877
882
|
res.send("✓ Test cases approved successfully!");
|