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

[v.1.36.0] $ within inline-javascript cannot be used #1760

Open
bullPaul opened this issue May 31, 2024 · 0 comments
Open

[v.1.36.0] $ within inline-javascript cannot be used #1760

bullPaul opened this issue May 31, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bullPaul
Copy link

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

  1. Start the simulator
  2. Run maestro test ...
  3. The step is run without an issue but no log is actually sent to the terminal

Expected behavior
For cases written above:

  1. Gets logged to the terminal with the dollar sign and the value of the env variable
  2. assertVisible etc 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

@bullPaul bullPaul added the bug Something isn't working label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant