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

Fix fill functionality for textarea #1238

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

bandorko
Copy link
Contributor

@bandorko bandorko commented Mar 7, 2024

What?

Fixes a bug, where calling fill() on textarea throws error. #1225

Why?

fill() should work for any contenteditable node. Currently it works only for <input>

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

#1225

@iandesj
Copy link

iandesj commented Mar 8, 2024

I would test that this works for input elements, too.

@bandorko
Copy link
Contributor Author

bandorko commented Mar 8, 2024

@iandesj

Of course you can try it, if you build a custom k6 binary from the code on the branch. Fill() for <input> elements has worked so far, and it already has a test at https://github.com/grafana/xk6-browser/blob/main/tests/locator_test.go#L99-L105
If you find any scenario that fails with this implementation, I would be happy to deal with it.

inancgumus
inancgumus previously approved these changes Mar 11, 2024
Copy link
Member

@inancgumus inancgumus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥳 Thanks!!

common/element_handle.go Outdated Show resolved Hide resolved
@inancgumus inancgumus linked an issue Mar 11, 2024 that may be closed by this pull request
ankur22
ankur22 previously approved these changes Mar 11, 2024
Copy link
Collaborator

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@bandorko bandorko dismissed stale reviews from ankur22 and inancgumus via d815a2d March 11, 2024 13:24
@ankur22 ankur22 force-pushed the fix/1225_textarea_fill branch from d815a2d to 1592cf3 Compare March 11, 2024 14:35
@ankur22 ankur22 merged commit 73e8036 into grafana:main Mar 11, 2024
9 of 14 checks passed
@iandesj
Copy link

iandesj commented Mar 11, 2024

Thanks @ankur22, @inancgumus, and of course @bandorko 👏🏻

What does the process look like for getting this into the next k6 release? So I know what to expect.

@ankur22
Copy link
Collaborator

ankur22 commented Mar 11, 2024

What does the process look like for getting this into the next k6 release? So I know what to expect.

It will be in the next version of k6 (v0.50.0) which should be released in the next couple of weeks 🤞

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.

Errors when using fill() on a textarea Locator
4 participants