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:
Mauro
2023-02-15 17:46:53 +01:00
committed by GitHub
parent 872c911cb5
commit e91e0513b6
35 changed files with 186 additions and 102 deletions
@@ -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)
}
}