Stabilize browser import menu test flow
This commit is contained in:
parent
3c549b4cb8
commit
7bb7564726
2 changed files with 9 additions and 6 deletions
|
|
@ -588,7 +588,10 @@ struct cmuxApp: App {
|
|||
}
|
||||
|
||||
Button(String(localized: "menu.view.importFromBrowser", defaultValue: "Import From Browser…")) {
|
||||
BrowserDataImportCoordinator.shared.presentImportDialog()
|
||||
// Defer modal presentation until after AppKit finishes menu tracking.
|
||||
DispatchQueue.main.async {
|
||||
BrowserDataImportCoordinator.shared.presentImportDialog()
|
||||
}
|
||||
}
|
||||
|
||||
splitCommandButton(title: String(localized: "menu.view.nextWorkspace", defaultValue: "Next Workspace"), shortcut: nextWorkspaceMenuShortcut) {
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ final class BrowserImportProfilesUITests: XCTestCase {
|
|||
let payloadData = try JSONSerialization.data(withJSONObject: payload)
|
||||
let captureURL = URL(fileURLWithPath: capturePath)
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.19) {
|
||||
DispatchQueue.global(qos: .userInitiated).asyncAfter(deadline: .now() + 0.18) {
|
||||
try? payloadData.write(to: captureURL)
|
||||
}
|
||||
|
||||
|
|
@ -151,10 +151,10 @@ final class BrowserImportProfilesUITests: XCTestCase {
|
|||
XCTAssertTrue(importItem.waitForExistence(timeout: 5.0), "Expected Import From Browser menu item to exist")
|
||||
importItem.click()
|
||||
|
||||
XCTAssertTrue(
|
||||
app.staticTexts["Import Browser Data"].waitForExistence(timeout: 5.0),
|
||||
"Expected the import wizard to open"
|
||||
)
|
||||
let wizardOpened = browserImportPollUntil(timeout: 5.0) {
|
||||
app.buttons["Next"].exists || app.windows["Import Browser Data"].exists
|
||||
}
|
||||
XCTAssertTrue(wizardOpened, "Expected the import wizard to open")
|
||||
}
|
||||
|
||||
private func waitForCapturedSelection(timeout: TimeInterval) -> [String: Any]? {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue