Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulator locks when running Maestro tests after setting notification permissions with applesimutils #2103

Open
1 task done
zimimi opened this issue Oct 21, 2024 · 1 comment

Comments

@zimimi
Copy link

zimimi commented Oct 21, 2024

Is there an existing issue for this?

  • I have searched the existing issues and didn't find mine.

Steps to reproduce

  1. Boot the iOS simulator.
  2. Set notification permissions for the app using applesimutils:
    applesimutils --booted --bundle ${appId} --setPermissions notifications=YES
  3. Launch the app and run Maestro tests:
    maestro test <path_to_test_script>
  4. Observe that the simulator screen locks, and the Maestro tests fail.

Actual results

  • The simulator locks after running the maestro test command.
  • Screen displays the lock screen, and the simulator appears to be in a locked.
  • Maestro tests fail.

Expected results

  • The simulator should remain unlocked and responsive when running Maestro tests after setting permissions with applesimutils.
  • Maestro tests should execute successfully without the simulator locking.
  • The app should have notification permissions granted, and the tests should proceed without needing to handle the permission prompt within the test script.

About app

  • This is a React Native app on iOS and Android platforms.
  • The problem occurs only on iOS; Android tests run without issues.
  • The issue is observed when using the iPhone 15 simulator running iOS 17.5.

About environment

Maestro Version: 1.38.1
OS: Mac OS X
OS Version: 14.7
Arch: aarch64
Java Version: 18
XCode Version: 15.4

Logs

Logs
<!-- Replace this line with your logs. *DO NOT* remove the backticks! -->

Maestro version

1.38.1

How did you install Maestro?

Homebrew

Anything else?

I found a workaround by handling notification permission in Maestro Script: Moved the notification permission handling into the Maestro test script using:

  tapOn:
    text: "Allow"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant