Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
FulcrumOne committed Nov 15, 2024
1 parent 52498b3 commit ef630e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Tests/Tests+PopupStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ private extension PopupStackTests {
}
func performAction(_ action: () async -> ()) async {
await action()
await Task.sleep(seconds: 0.01)
await Task.sleep(seconds: 0.03)
}
func getPopupsForDefaultStack() async -> [AnyPopup] {
await PopupStack
Expand Down
10 changes: 5 additions & 5 deletions Tests/Tests+ViewModel+PopupCenterStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,10 @@ private extension PopupCenterStackViewModelTests {
}
func appendPopupsAndPerformChecks<Value: Equatable & Sendable>(popups: [AnyPopup], isKeyboardActive: Bool, calculatedValue: @escaping (ViewModel) async -> Value, expectedValueBuilder: @escaping (ViewModel) async -> Value) async {
await viewModel.updatePopups(popups)

await Task.sleep(seconds: 0.01)

await waitForResults()
await updatePopups()
await viewModel.updateScreen(screenHeight: isKeyboardActive ? screenWithKeyboard.height : screen.height, screenSafeArea: isKeyboardActive ? screenWithKeyboard.safeArea : screen.safeArea, isKeyboardActive: isKeyboardActive)

await Task.sleep(seconds: 0.01)
await waitForResults()

let calculatedValue = await calculatedValue(viewModel)
let expectedValue = await expectedValueBuilder(viewModel)
Expand All @@ -253,6 +250,9 @@ private extension PopupCenterStackViewModelTests {
func updatePopups() async {
for popup in viewModel.popups { await viewModel.updatePopupHeight(popup.height!, popup) }
}
func waitForResults() async {
await Task.sleep(seconds: 0.03)
}
}

// MARK: Screen
Expand Down
2 changes: 1 addition & 1 deletion Tests/Tests+ViewModel+PopupVerticalStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,7 @@ private extension PopupVerticalStackViewModelTests {
}
}
func waitForResults() async {
await Task.sleep(seconds: 0.01)
await Task.sleep(seconds: 0.03)
}
}

Expand Down

0 comments on commit ef630e0

Please sign in to comment.