maestro
maestro copied to clipboard
[v.1.36.0] $ within inline-javascript cannot be used
Describe the bug
Adding a $ (dollar sign) within the ${} for inline-javascript for use as a string does not work as expected. It works with just a regular plain string e.g. "$100" but if you need to use it with an env variable then it goes awry.
Case 1: - evalScript: ${console.log('$')}
Case 2: - text: '${"$" + ENV_VARIABLE + "+"}'
This was mentioned in Slack as well.
To Reproduce 0. Write the test with the single line
- Start the simulator
- Run
maestro test ... - The step is run without an issue but no log is actually sent to the terminal
Expected behavior For cases written above:
- Gets logged to the terminal with the dollar sign and the value of the env variable
assertVisibleetc works as expected with this while parsing the screen as usual
Screenshots N/A
Environment information (please complete the following information):
- Maestro version [v.1.36.0]
- Platform: [iOS 17.0.0+]
- Framework: [React Native with Expo]
- Device model and OS version: [iPhone 14+]
- Simulator
- Host [Mac]
Workspace (if applicable) N/A
Bugreport output (if applicable) N/A
Additional context N/A