Simplify LinkNewDeviceScreen preview test setup and fix preview and accessibility test reliability.

This commit is contained in:
Stefan Ceriu
2026-02-24 17:58:41 +02:00
committed by Stefan Ceriu
parent 11f9162e0a
commit 69e3f8bc9b
6 changed files with 17 additions and 38 deletions
@@ -19,9 +19,14 @@ class LinkNewDeviceScreenViewModel: LinkNewDeviceScreenViewModelType, LinkNewDev
actionsSubject.eraseToAnyPublisher()
}
init(clientProxy: ClientProxyProtocol) {
init(clientProxy: ClientProxyProtocol, initialState: LinkNewDeviceScreenViewState? = nil) {
self.clientProxy = clientProxy
if let initialState {
super.init(initialViewState: initialState)
return
}
let isQRCodeScanningSupported = !ProcessInfo.processInfo.isiOSAppOnMac
super.init(initialViewState: LinkNewDeviceScreenViewState(showLinkDesktopComputerButton: isQRCodeScanningSupported))