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

[6.x] Add waitForInput #960

Merged
merged 2 commits into from
Feb 1, 2022
Merged

[6.x] Add waitForInput #960

merged 2 commits into from
Feb 1, 2022

Conversation

SjorsO
Copy link
Contributor

@SjorsO SjorsO commented Feb 1, 2022

This PR adds a waitForInput method that waits for an input field by name. This PR is similar to #914.

I have some flaky tests in CI that very sometimes fail to type in a text input. The tests look something like this:

->clickAndWaitForReload('@edit-'.$user->id)
->type('name', 'Sjors')

The new waitForInput method can solve this:

->clickAndWaitForReload('@edit-'.$user->id)
->waitForInput('name')
->type('name', 'Sjors')

I haven't added any tests. I still can't figure out how to craft a mock that calls itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants