Created
September 24, 2019 16:43
-
-
Save mpahuja/33c7673b8ef10eb2528c0376faa43ad3 to your computer and use it in GitHub Desktop.
Timeouts Enum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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