maestro icon indicating copy to clipboard operation
maestro copied to clipboard

[1.36.0] `addMedia` does not resolve path consistently based on execution context

Open greeeg opened this issue 4 months ago • 1 comments

Describe the bug

I have a project folder structure like this:

.
├── e2e
│   ├── output
│   ├── assets
│   ├── scenarios
│   ├── scripts
│   └── utils

Assets contains medias I'm using with addMedia in my scenarios:

# e2e/scenarios/my-scenario.yaml
appId: com.example
name: Attach a receipt to a transaction
---
- addMedia:
    - '../assets/sample-receipt.jpg'

When running maestro test ./e2e/scenarios/my-scenario.yaml, everything works as expected, but when I run maestro test e2e/scenarios, the relative path does not work. I could only make it work by moving the assets folder within the scenarios folder.

I would expect this to work in both contexts, or the notion of Maestro workspace needs to be clarified

Environment information (please complete the following information):

  • Maestro version: 1.36.0
  • Platform: Android
  • Framework: React Native
  • Simulator
  • Mac M3

greeeg avatar Mar 29 '24 09:03 greeeg