SHA256
feat(ios): replace embedded website with initial native SwiftUI API client
Introduce real SwiftUI auth/dashboard/task/note/shopping screens, a bounded origin-bound URLSession transport and Keychain-backed native sessions. Archive the rejected WebKit renderer rather than embedding it for unfinished modules. Sixteen portable URL/contract/transport tests and Swift format/parsing pass on Linux; Apple SDK application and UI validation remains mandatory. This is an incomplete native slice, not full PWA parity or a release.
This commit is contained in:
1 parent
11bf4ca620
commit
97570b7fdf
15 files changed
+1182
-11
No files matched your search
@@ -0,0 +1,40 @@
|
||||
import WebKit
|
||||
import XCTest
|
||||
|
||||
@testable import Yuvomi
|
||||
|
||||
final class BrowserModelTests: XCTestCase {
|
||||
@MainActor
|
||||
func testMainViewHasNoNativeBridgeOrAutomaticPopupAccess() {
|
||||
let model = BrowserModel()
|
||||
XCTAssertFalse(model.web.configuration.preferences.javaScriptCanOpenWindowsAutomatically)
|
||||
XCTAssertTrue(model.web.configuration.userContentController.userScripts.isEmpty)
|
||||
XCTAssertTrue(model.web.configuration.websiteDataStore.isPersistent)
|
||||
XCTAssertFalse(model.web.isInspectable)
|
||||
}
|
||||
|
||||
@MainActor
|
||||
func testLateExportCancellationDoesNotEraseAnotherServersDownload() {
|
||||
let model = BrowserModel()
|
||||
let previous = URL(fileURLWithPath: "/old-selection.txt")
|
||||
let current = URL(fileURLWithPath: "/new-selection.txt")
|
||||
model.download = WebDestination(url: current)
|
||||
model.removeDownload(expected: previous)
|
||||
XCTAssertEqual(model.download?.url, current)
|
||||
model.removeDownload(expected: current)
|
||||
XCTAssertNil(model.download)
|
||||
}
|
||||
|
||||
@MainActor
|
||||
func testServerErasureReplacesHistoryContext() async {
|
||||
let model = BrowserModel()
|
||||
let previousView = model.web
|
||||
await withCheckedContinuation { continuation in
|
||||
model.erase { continuation.resume() }
|
||||
}
|
||||
XCTAssertFalse(previousView === model.web)
|
||||
XCTAssertNil(model.server)
|
||||
XCTAssertFalse(model.canGoBack)
|
||||
XCTAssertNil(model.error)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user