maestro icon indicating copy to clipboard operation
maestro copied to clipboard

[v1.35.0][Flutter] Unable to detect Button Widget "enabled" state

Open hakoniemi opened this issue 1 year ago • 0 comments

Describe the bug Maestro is unable to detect whether MaterialButton (e.g. TextButton) is enabled or disabled. This may be related to that enabled property seems to be deprecated as a property. Current state is based on whether onPressed value is null or not.

To Reproduce

  1. Create a TextButton widget
  2. append onPressed as null
  3. apply Semantics label or Text to make it accessible
  4. Write a Maestro flow with:
- assertNotVisible:
    text: .*Reference.*
    enabled: true

(or the opposite with assertVisible and enabled: false)

Expected behavior Maestro should detect the actual state based on value of onPressed instead of deprecated enabled property

Environment information:

  • Maestro version: v1.35.0
  • Platform: iOS 17.0
  • Framework: Flutter
  • Device model and OS version: iPhone SE 3rd (Simulator)

hakoniemi avatar Feb 11 '24 10:02 hakoniemi