iamolegga / react-native-launch-arguments

Get launch arguments for testing with Detox and Appium
MIT License
55 stars 21 forks source link

Maestro no bool values on iOS #71

Closed retyui closed 1 year ago

retyui commented 1 year ago

Boolean values don't parsed properly on iOS, see an example below

maestro test:

- launchApp:
    appId: "com.example.app"
    arguments:
      boolTrue: true
      boolFalse: false
      boolStrTrue: "true"
      boolStrFalse: "false"

JS part

// Android
LaunchArguments.value() // {"boolFalse": false, "boolStrFalse": false, "boolStrTrue": true, "boolTrue": true}
NativeModules.LaunchArguments.value // {"boolFalse": false, "boolStrFalse": "false", "boolStrTrue": "true", "boolTrue": true}

// iOS
LaunchArguments.value() // {"boolStrFalse": false, "boolStrTrue": true}
NativeModules.LaunchArguments.value // {"boolStrFalse": "false", "boolStrTrue": "true"}

Docs:

retyui commented 1 year ago

I workaround I pass bool values as string and it solve my needs

- launchApp:
    appId: "com.example.app"
    arguments:
      isMaestro: "true"
LaunchArguments.value().isMaestro // true
iamolegga commented 1 year ago

I believe this is something related to how maestro builds a result call arguments, closing