mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Attach Screenshot in Bug Report Screen (#578)
* 127 Attach Screenshot in Bug Report Screen * #127 code improvement * #127 Code improvements, and changed the loading... label to sending... * using a statically defined identifier for the new defined ui element * added the RowLabelStyle and improved the design of the view * code improvement * code improvement * making alignment private * synthesised init
This commit is contained in:
@@ -37,4 +37,13 @@ class BugReportViewModelTests: XCTestCase {
|
||||
try await Task.sleep(nanoseconds: 100_000_000)
|
||||
XCTAssertNil(context.viewState.screenshot)
|
||||
}
|
||||
|
||||
func testAttachScreenshot() async throws {
|
||||
let viewModel = BugReportViewModel(bugReportService: MockBugReportService(), screenshot: nil, isModallyPresented: false)
|
||||
let context = viewModel.context
|
||||
XCTAssertNil(context.viewState.screenshot)
|
||||
context.send(viewAction: .attachScreenshot(UIImage.actions))
|
||||
try await Task.sleep(nanoseconds: 100_000_000)
|
||||
XCTAssert(context.viewState.screenshot == UIImage.actions)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user