Skip to content

Instantly share code, notes, and snippets.

@mpahuja
Created September 24, 2019 16:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpahuja/33c7673b8ef10eb2528c0376faa43ad3 to your computer and use it in GitHub Desktop.
Save mpahuja/33c7673b8ef10eb2528c0376faa43ad3 to your computer and use it in GitHub Desktop.
Timeouts Enum
import Foundation
/// Common semantic timeout values for UI interactions
public enum UITestTimeout {
/// Time interval for alerts to appear
case alertAppear
/// Time interval for elements to appear
case elementAppear
/// Five second time interval
case fiveSeconds
/// Time interval for network requests
case networkRequest
/// Time interval for pages to appear
case pageAppear
var timeInterval: TimeInterval {
switch self {
case .alertAppear:
return 6.0
case .elementAppear:
return 7.0
case .fiveSeconds:
return 5.0
case .networkRequest:
return 15.0
case .pageAppear:
return 10.0
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment