I updated the regexes in fun String.evaluateScripts(jsEngine: JsEngine) to not prevent the script to have any dollar sign
I'm confident this fixes the linked issue
I'm not confident enough this does not brake on a weird edge case
I tried thinking of some JS content that contains a dollar sign and that would brake due to this change but I don't have any idea. Maybe you'll find one
I added forwarding of the js console to maestro log file
I added a MAESTRO_CLI_LOG_LEVEL env var to limit log output level if needed
Proposed changes
fun String.evaluateScripts(jsEngine: JsEngine)
to not prevent the script to have any dollar signMAESTRO_CLI_LOG_LEVEL
env var to limit log output level if neededTesting
║ ║ > Flow: dollar ║ ║ ✅ Launch app "com.example.example" ║ ✅ Run ${console.log('Hello!')} ║ Log messages: ║ Hello! ║ ✅ Run ${console.log('Hello money! $')} ║ Log messages: ║ Hello money! $ ║ ✅ Run ${console.log('Hello money! \$')} ║ Log messages: ║ Hello money! $ ║ ✅ Run ${console.log('$')} ║ Log messages: ║ $ ║ ✅ Run ${console.log('\$')} ║ Log messages: ║ $ ║
Issues fixed
Fixes #1760
Fixes #1744