mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Fix unit and UI tests. (#460)
* Fix race condition on session verification tests. * Fix clear button on text field. * Add a timeout to UI test signalling. * Use snapshot testing for login screen.
This commit is contained in:
@@ -74,7 +74,7 @@ class SessionVerificationViewModelTests: XCTestCase {
|
||||
let waitForAcceptance = XCTestExpectation(description: "Wait for acceptance")
|
||||
|
||||
let cancellable = sessionVerificationController.callbacks
|
||||
.debounce(for: .seconds(2.0), scheduler: DispatchQueue.main)
|
||||
.delay(for: .seconds(0.1), scheduler: DispatchQueue.main) // Allow the view model to process the callback first.
|
||||
.sink { callback in
|
||||
switch callback {
|
||||
case .finished:
|
||||
@@ -101,7 +101,7 @@ class SessionVerificationViewModelTests: XCTestCase {
|
||||
let expectation = XCTestExpectation(description: "Wait for cancellation")
|
||||
|
||||
let cancellable = sessionVerificationController.callbacks
|
||||
.debounce(for: .seconds(2.0), scheduler: DispatchQueue.main)
|
||||
.delay(for: .seconds(0.1), scheduler: DispatchQueue.main) // Allow the view model to process the callback first.
|
||||
.sink { callback in
|
||||
switch callback {
|
||||
case .cancelled:
|
||||
@@ -130,7 +130,7 @@ class SessionVerificationViewModelTests: XCTestCase {
|
||||
let verificationDataReceivalExpectation = XCTestExpectation(description: "Wait for Emoji data")
|
||||
|
||||
let cancellable = sessionVerificationController.callbacks
|
||||
.debounce(for: .seconds(2.0), scheduler: DispatchQueue.main)
|
||||
.delay(for: .seconds(0.1), scheduler: DispatchQueue.main) // Allow the view model to process the callback first.
|
||||
.sink { callback in
|
||||
switch callback {
|
||||
case .acceptedVerificationRequest:
|
||||
|
||||
Reference in New Issue
Block a user