app icon indicating copy to clipboard operation
app copied to clipboard

Setup Detox

Open Maschga opened this issue 2 months ago • 6 comments

🪧 Setup Detox 🧱 Add prebuild scripts 📝 Write tests

TODO:

  • [x] test on macOS @naltatis
  • [ ] write tests
  • [x] add actions

HOWTO for macOS:

  1. Run npx detox build -c ios.sim.release
  2. Run npx detox test -c ios.sim.release

Maschga avatar Oct 25 '25 10:10 Maschga

@Maschga local macOS setup works for me. I've build iOS and Android pipelines. Still struggling with tech-setup stuff there. I've adjusted a few things in the process. Feel free to change things back if needed. Goal is to have a setup that works locally and in CI 😄

naltatis avatar Nov 22 '25 19:11 naltatis

Having the same difficulties. Local android setup works, but ci does not. :D Thanks for letting me know.

Maschga avatar Nov 22 '25 19:11 Maschga

@naltatis Pipeline works! 🥳

Maschga avatar Nov 25 '25 15:11 Maschga

Unglaublich! 🎉

giphy-6

naltatis avatar Nov 25 '25 19:11 naltatis

I'm afraid we can't use the depot-macos-15 since it does not have the latest stable Xcode. That's why I switched back to Githubs macOS runner.

naltatis avatar Nov 25 '25 19:11 naltatis

I'm having massive problems with iOS testing when opening/loading the web view. Sometimes the web view doesn't load, sometimes Detox can't connect to the app, sometimes Detox waits so long for the main thread to stop that a timeout occurs and with luck the tests succeed. I'm stuck here, I don't have macOS. Android works.

Maschga avatar Nov 26 '25 10:11 Maschga

Hi @Maschga, iOS tests run successfully on my machen and in actions (also iOS). Had to go back to native GitHub runner. Slow but seems to work now. I've skipped the tests that require a local evcc instance. My suggestion would be to finish this PR, add documentation (README) and npm run scripts. Let's make the inclusion of an ad-hoc evcc instance a separate PR. There we'd have to do it in a way that works on android/iOS and locally without manual intervention. Since you've already built this for the android pipeline this should not be a huge issue.

Thanks for working on this and figuring all this out 🙌

naltatis avatar Dec 23 '25 15:12 naltatis

Thank you for getting the macOS runner working! 💫✅🎉


My suggestion would be to finish this PR, add documentation (README) and npm run scripts. Added documentation and npm run scripts.

Can you have a look at it and complete the macOS/iOS testing documentation?

Slow but seems to work now.

Is it possible to use Detox runner to build the app and GitHub runner to test the app?

There we'd have to do it in a way that works on android/iOS and locally without manual intervention.

Shouldn't be a big deal. That's why I'd like to integrate this functionality in this PR. Is that okay for you?

Locally:

macOS: See https://docs.evcc.io/docs/installation/macos Linux: See https://docs.evcc.io/docs/installation/linux Windows: Should work by downloading and installing *.exe

Runners:

Linux: Already working macOS: Should be the same like Locally

Maschga avatar Dec 23 '25 18:12 Maschga

Shouldn't be a big deal. That's why I'd like to integrate this functionality in this PR. Is that okay for you?

Ok, then let's do it here.

naltatis avatar Dec 23 '25 20:12 naltatis

Is it possible to use Detox runner to build the app and GitHub runner to test the app?

You mean Depot, not Detox right? I've also mixed those up a couple of times today. 😄 Right now, I'd stick to the single GH-runner style. I spent a lot of time with the depot macOS runner today. Building the app for test requires a version matching simulator (iOS 26) which the Depot runner doesn't seem to offer. Github also offers larger macOS runners. We currently can't use them since they are only available for Github Team and Enterprise accounts, but I'll see what it takes to upgrade our account. This would be the easiest ways.

naltatis avatar Dec 23 '25 20:12 naltatis