File tree 3 files changed +9
-1
lines changed
3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Requires macOS 12.0 and higher.
9
9
10
10
### Fixed
11
11
- When a user clicked on the ` updateDevice ` button, the logs would incorrectly state the user was entering the "Unsupported UI" workflow.
12
+ - When running unit tests, Nudge no longer honors the randomDelay key or command line argument
12
13
13
14
### Added
14
15
- To ease SOFA testing, you can now pass ` -custom-sofa-feed-url ` as an argument to override the built-in preferences and/or custom profile/json.
@@ -24,6 +25,9 @@ Requires macOS 12.0 and higher.
24
25
## [ 2.0.1] - 2024-07-19
25
26
Requires macOS 12.0 and higher.
26
27
28
+ ### Changed
29
+ - The command line argument ` -disable-randomDelay ` is now ` -disable-random-delay `
30
+
27
31
### Fixed
28
32
- Some incorrect logic was applied to the ` requiredInstallatonDate ` when using the new ` gracePeriodInstallDelay `
29
33
- https://github.com/macadmins/nudge/commit/61997a6137f1fd345a1314285cecc083f8674a15
Original file line number Diff line number Diff line change @@ -357,7 +357,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
357
357
}
358
358
359
359
private func applyRandomDelayIfNecessary( ) {
360
- if UserExperienceVariables . randomDelay && !CommandLine . arguments . contains ( " -disable-randomDelay " ) {
360
+ if UserExperienceVariables . randomDelay && !( CommandLineUtilities ( ) . disableRandomDelayArgumentPassed ( ) || CommandLineUtilities ( ) . unitTestingEnabled ( ) ) {
361
361
let delaySeconds = Int . random ( in: 1 ... UserExperienceVariables . maxRandomDelayInSeconds)
362
362
LogManager . notice ( " Delaying initial run (in seconds) by: \( delaySeconds) " , logger: uiLog)
363
363
Original file line number Diff line number Diff line change @@ -378,6 +378,10 @@ struct CommandLineUtilities {
378
378
return checkAndLogArgument ( " -demo-mode " , logStateKey: & nudgeLogState. hasLoggedDemoMode)
379
379
}
380
380
381
+ func disableRandomDelayArgumentPassed( ) -> Bool {
382
+ return arguments. contains ( " -disable-random-delay " )
383
+ }
384
+
381
385
func forceScreenShotIconModeEnabled( ) -> Bool {
382
386
return checkAndLogArgument ( " -force-screenshot-icon " , logStateKey: & nudgeLogState. hasLoggedScreenshotIconMode)
383
387
}
You can’t perform that action at this time.
0 commit comments