mobile-dev-inc / maestro

Painless Mobile UI Automation
https://maestro.mobile.dev/
Apache License 2.0
5.69k stars 260 forks source link

Multiple Selectors At The Same Time [v1.3.3] #1508

Closed satbirkira closed 2 months ago

satbirkira commented 11 months ago

Describe the bug Multiple selectors will be ignored.

To Reproduce

- runFlow:
    when:
      visible:
        id: "fnctst-checkbox-agree"
        checked: false
    commands:
        - ....

This also causes a "Assertion is false: id: fnctst-checkbox-agree is visible" which does not make sense

- assertVisible:
    id: "fnctst-checkbox-agree"
    checked: true

Expected behavior What should happen is that if "fnctst-checkbox-agree" is not checked, then the commands should run, but the commands will run regardless of the checked state. The second snippet, it thinks it's doing a assertNotVisible or something

Note: This checkbox is using BouncyCheckbox from "react-native-bouncy-checkbox",

satbirkira commented 11 months ago

I figured it out! Here is what I had to do, kind of weird but it works.


- runFlow:
    when:
      visible:
        id: "fnctst-checkbox-agree"
        text: "checked"
    commands:
        - ....

- assertVisible:
    id: "fnctst-checkbox-agree"
    text: "checked"
bartekpacia commented 2 months ago

Glad you resolved it :)