mirror of
https://github.com/tw93/Mole.git
synced 2026-03-22 23:05:08 +00:00
fix(tests): prevent permission dialogs during test runs
Add MOLE_TEST_MODE=1 checks to skip AppleScript osascript calls and sudo operations that trigger system permission dialogs during tests: - lib/check/all.sh: Skip login items listing - lib/clean/apps.sh: Skip running app detection - lib/clean/user.sh: Skip Finder trash operations and sudo test calls - lib/core/log.sh: Skip sudo status check in debug log - lib/uninstall/batch.sh: Skip login item removal Also add MOLE_TEST_MODE=1 export to all test files that load these modules to ensure consistent test isolation.
This commit is contained in:
@@ -10,6 +10,10 @@ setup_file() {
|
||||
HOME="$(mktemp -d "${BATS_TEST_DIRNAME}/tmp-browser-cleanup.XXXXXX")"
|
||||
export HOME
|
||||
|
||||
# Prevent AppleScript permission dialogs during tests
|
||||
MOLE_TEST_MODE=1
|
||||
export MOLE_TEST_MODE
|
||||
|
||||
mkdir -p "$HOME"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user