Fix split-close stale-frame stretch and add regression coverage
This commit is contained in:
parent
3193e602d4
commit
cd0b8da82b
4 changed files with 105 additions and 22 deletions
|
|
@ -314,6 +314,50 @@ final class SplitCloseRightBlankRegressionUITests: XCTestCase {
|
|||
)
|
||||
}
|
||||
|
||||
func testReproStretchAfterClosingSingleRightSplit() {
|
||||
let app = XCUIApplication()
|
||||
app.launchEnvironment["CMUX_UI_TEST_DIAGNOSTICS_PATH"] = diagnosticsPath
|
||||
app.launchEnvironment["CMUX_UI_TEST_SPLIT_CLOSE_RIGHT_SETUP"] = "1"
|
||||
app.launchEnvironment["CMUX_UI_TEST_SPLIT_CLOSE_RIGHT_PATH"] = dataPath
|
||||
app.launchEnvironment["CMUX_UI_TEST_SPLIT_CLOSE_RIGHT_VISUAL"] = "1"
|
||||
app.launchEnvironment["CMUX_UI_TEST_SPLIT_CLOSE_RIGHT_ITERATIONS"] = "16"
|
||||
app.launchEnvironment["CMUX_UI_TEST_SPLIT_CLOSE_RIGHT_CLOSE_DELAY_MS"] = "0"
|
||||
app.launchEnvironment["CMUX_UI_TEST_SPLIT_CLOSE_RIGHT_BURST_FRAMES"] = "36"
|
||||
app.launchEnvironment["CMUX_UI_TEST_SPLIT_CLOSE_RIGHT_PATTERN"] = "close_right_single"
|
||||
app.launch()
|
||||
app.activate()
|
||||
|
||||
XCTAssertTrue(waitForAnyData(timeout: 12.0), "Expected split-close-right test data to be written at \(dataPath)")
|
||||
|
||||
let doneDeadline = Date().addingTimeInterval(90.0)
|
||||
while Date() < doneDeadline {
|
||||
if let data = loadData(), data["visualDone"] == "1" {
|
||||
break
|
||||
}
|
||||
RunLoop.current.run(until: Date().addingTimeInterval(0.10))
|
||||
}
|
||||
|
||||
guard let data = loadData() else {
|
||||
XCTFail("Missing split-close-right data after waiting. path=\(dataPath)")
|
||||
return
|
||||
}
|
||||
if let setupError = data["setupError"], !setupError.isEmpty {
|
||||
XCTFail("Test setup failed: \(setupError)")
|
||||
return
|
||||
}
|
||||
|
||||
let lastIter = Int(data["visualLastIteration"] ?? "") ?? 0
|
||||
XCTAssertGreaterThan(lastIter, 0, "Expected at least one visual iteration. data=\(data)")
|
||||
|
||||
let sizeMismatchSeen = (data["sizeMismatchSeen"] ?? "") == "1"
|
||||
let trace = data["timelineTrace"] ?? ""
|
||||
|
||||
XCTAssertFalse(
|
||||
sizeMismatchSeen,
|
||||
"Transient IOSurface size mismatch detected (stretched text). at=\(data["sizeMismatchObservedAt"] ?? "") iter=\(data["sizeMismatchObservedIteration"] ?? "") trace=\(trace)"
|
||||
)
|
||||
}
|
||||
|
||||
func testReproBlankAfterClosingBottomSplitsViaShortcuts() {
|
||||
let app = XCUIApplication()
|
||||
app.launchEnvironment["CMUX_UI_TEST_DIAGNOSTICS_PATH"] = diagnosticsPath
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue