mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Use mock log files for the BugReportScreenViewModelTests. (#4257)
The array could be empty if a previous test deleted the logs.
This commit is contained in:
@@ -14,7 +14,7 @@ class BugReportScreenViewModel: BugReportScreenViewModelType, BugReportScreenVie
|
||||
private let bugReportService: BugReportServiceProtocol
|
||||
private let clientProxy: ClientProxyProtocol?
|
||||
|
||||
private let logFiles = Tracing.logFiles
|
||||
private let logFiles: [URL]
|
||||
|
||||
private let actionsSubject: PassthroughSubject<BugReportScreenViewModelAction, Never> = .init()
|
||||
// periphery:ignore - when set to nil this is automatically cancelled
|
||||
@@ -26,10 +26,12 @@ class BugReportScreenViewModel: BugReportScreenViewModelType, BugReportScreenVie
|
||||
|
||||
init(bugReportService: BugReportServiceProtocol,
|
||||
clientProxy: ClientProxyProtocol?,
|
||||
logFiles: [URL] = Tracing.logFiles,
|
||||
screenshot: UIImage?,
|
||||
isModallyPresented: Bool) {
|
||||
self.bugReportService = bugReportService
|
||||
self.clientProxy = clientProxy
|
||||
self.logFiles = logFiles
|
||||
|
||||
let canSendLogFiles = Self.validate(logFiles)
|
||||
let bindings = BugReportScreenViewStateBindings(reportText: "", sendingLogsEnabled: canSendLogFiles, canContact: false)
|
||||
|
||||
Reference in New Issue
Block a user