leancodepl / patrol

Flutter-first UI testing framework. Ready for action!
https://patrol.leancode.co
Apache License 2.0
898 stars 134 forks source link

[patrol_finders] enterText() only works the first time #2395

Open josh-burton opened 2 hours ago

josh-burton commented 2 hours ago

Steps to reproduce

Write a widget test where 2 different texts fields have text entered.

Actual results

patrol_finders can only input text into a text field once.

Logs

Logs ``` ```

Patrol version

patrol_finders: 2.1.3

Patrol Doctor output

Patrol Doctor output

Flutter Doctor output

Flutter Doctor output
josh-burton commented 2 hours ago

It seems this is caused by this recent PR: https://github.com/leancodepl/patrol/pull/2314

Unregistering the testTextInput means any further interaction with text fields won't work.

It seems like the registering of the testTextInput is probably the root cause here, as the default widget tester doesn't do this and doesn't demonstrate the issue.

josh-burton commented 2 hours ago

Related issue: https://github.com/leancodepl/patrol/issues/2313