Remove alert pop-up in test scenarios to prevent main thread stalls

This commit is contained in:
Michael Starke
2019-06-17 16:32:36 +02:00
parent 9e474375bf
commit 9f43d52917
4 changed files with 20 additions and 0 deletions

View File

@@ -143,6 +143,11 @@ static MPAutotypeDaemon *_sharedInstance;
if(!self.enabled) {
return;
}
if(NSApplication.sharedApplication.isRunningTests) {
return; // Do not display pop-up when running tests
}
BOOL hideAlert = NO;
if(nil != [NSUserDefaults.standardUserDefaults objectForKey:kMPSettingsKeyAutotypeHideAccessibiltyWarning]) {
hideAlert = [NSUserDefaults.standardUserDefaults boolForKey:kMPSettingsKeyAutotypeHideAccessibiltyWarning];