Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

Make the test expectation more resilient against tabs

Pedro82456cafc555
diff --git a/tests/VM/VMDetailsPrinterTests.swift b/tests/VM/VMDetailsPrinterTests.swift
index 22669173a2..3f73e65a07 100644
--- a/tests/VM/VMDetailsPrinterTests.swift
+++ b/tests/VM/VMDetailsPrinterTests.swift
@@ -42,7 +42,13 @@ struct VMDetailsPrinterTests {
try VMDetailsPrinter.printStatus(vms, json: false, print: { printedLines.append($0) })
// Then
- #expect(printedLines.popLast() == "name os 2 0.00G 24.0B/30.0B status 0.0.0.0 vncUrl ")
- #expect(printedLines.popLast() == "name os cpu memory disk status ip vnc ")
+ #expect(printedLines.count == 2)
+
+
+ let headerParts = printedLines[0].split(whereSeparator: \.isWhitespace)
+ #expect(headerParts == ["name", "os", "cpu", "memory", "disk", "status", "ip", "vnc"])
+
+ let vmParts = printedLines[1].split(whereSeparator: \.isWhitespace)
+ #expect(vmParts == ["name", "os", "2", "0.00G", "24.0B/30.0B", "status", "0.0.0.0", "vncUrl"])
}
}