mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Improved bug report error handling (#1018)
* Improve rageshake error handling. * Add a max file size and exclude older files one the limit is hit. * Zip log files as smaller chunks.
This commit is contained in:
@@ -64,7 +64,7 @@ class BugReportViewModelTests: XCTestCase {
|
||||
let mockService = BugReportServiceMock()
|
||||
mockService.submitBugReportProgressListenerClosure = { _, _ in
|
||||
await Task.yield()
|
||||
return SubmitBugReportResponse(reportUrl: "https://test.test")
|
||||
return .success(SubmitBugReportResponse(reportUrl: "https://test.test"))
|
||||
}
|
||||
let viewModel = BugReportScreenViewModel(bugReportService: mockService,
|
||||
userID: "@mock.client.com",
|
||||
@@ -90,7 +90,7 @@ class BugReportViewModelTests: XCTestCase {
|
||||
func testSendReportWithError() async throws {
|
||||
let mockService = BugReportServiceMock()
|
||||
mockService.submitBugReportProgressListenerClosure = { _, _ in
|
||||
throw TestError.testError
|
||||
.failure(.uploadFailure(TestError.testError))
|
||||
}
|
||||
let viewModel = BugReportScreenViewModel(bugReportService: mockService,
|
||||
userID: "@mock.client.com",
|
||||
|
||||
Reference in New Issue
Block a user