From 1d176eaba47cd86f1d091fcfbfd0d74852cdc891 Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Sat, 6 Jul 2024 15:14:33 +0200 Subject: [PATCH] modules/android_integration: termux-setup-storage & unsupported --- modules/environment/android-integration.nix | 2 +- tests/emulator/android_integration.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/environment/android-integration.nix b/modules/environment/android-integration.nix index 6ca733a3..255b687d 100644 --- a/modules/environment/android-integration.nix +++ b/modules/environment/android-integration.nix @@ -36,7 +36,7 @@ in description = lib.mdDoc '' Provide a `termux-setup-storage` command that makes the app request storage permission, - and then creates a $HOME/storage symlink. + and then creates a $HOME/storage directory with symlinks to storage. ''; }; diff --git a/tests/emulator/android_integration.py b/tests/emulator/android_integration.py index 7271cd75..61dabc6c 100644 --- a/tests/emulator/android_integration.py +++ b/tests/emulator/android_integration.py @@ -63,7 +63,10 @@ def run(d): screenshot(d, 'termux-setup-storage-invoked') wait_for(d, 'Allow Nix to access') screenshot(d, 'permission-requested') - d.ui(text='Allow').click() + if 'text="Allow"' in d.ui.dump_hierarchy(): + d.ui(text='Allow').click() + elif 'text="ALLOW"' in d.ui.dump_hierarchy(): + d.ui(text='ALLOW').click() screenshot(d, 'permission-granted') d('input text "ls -l storage"')