Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
josh-burton opened this issue Nov 5, 2024 · 6 comments · May be fixed by #2441
Open

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

josh-burton opened this issue Nov 5, 2024 · 6 comments · May be fixed by #2441
Assignees
Labels
bug Something isn't working P1 High-priority issues at the top of the work list

Comments

@josh-burton
Copy link

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
<!-- Replace this line with your logs. Do not remove the backticks! -->

Patrol version

patrol_finders: 2.1.3

Patrol Doctor output

Patrol Doctor output

Flutter Doctor output

Flutter Doctor output
@josh-burton
Copy link
Author

It seems this is caused by this recent PR: #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
Copy link
Author

Related issue: #2313

@Kendru98 Kendru98 self-assigned this Nov 7, 2024
@Kendru98 Kendru98 added the bug Something isn't working label Nov 7, 2024
@Kendru98
Copy link
Contributor

Kendru98 commented Nov 8, 2024

Thanks for reporting issue @josh-burton we will look into it!

@Kendru98 Kendru98 added the P1 High-priority issues at the top of the work list label Nov 8, 2024
@piotruela
Copy link
Collaborator

Hi @josh-burton. Can you please provide reproducible example of a test in which it does not work? I think more factors need to come into play than just typing into the text field twice for this error to occur.

@GChanathip
Copy link
Contributor

GChanathip commented Nov 26, 2024

@piotruela you can reproduce by using this repo
git clone https://github.com/GChanathip/patrol_example.git --branch patrol-issue

i reproduced by using Patrol 3.130 and Patrol cli 3.4.0 with android 13 emulator.

use this command to reproduce
patrol test --target integration_test/search_product_test.dart

I'm not sure about the root cause, but I started facing this issue after PR #2314 was merged

@feiwhang
Copy link

feiwhang commented Dec 4, 2024

I faced this when trying to enterText on the field that is autofocus. When I disable autofocus the issue is gone.

@pdenert pdenert linked a pull request Dec 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 High-priority issues at the top of the work list
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants