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

Add tests for input and change event properties #24995

Merged
merged 4 commits into from
Aug 14, 2020
Merged

Conversation

domenic
Copy link
Member

@domenic domenic commented Aug 13, 2020

See whatwg/html#5453.

I think this is my first testdriver test!

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24995 August 13, 2020 17:01 Inactive
@foolip
Copy link
Member

foolip commented Aug 14, 2020

I see there's just one failure, in Safari: https://wpt.fyi/results/html/semantics/forms/input-change-event-properties.html?sha=4639b08e10&label=pr_head

Additional asserts might make it clearer which event didn't fire as expected.

@domenic
Copy link
Member Author

domenic commented Aug 14, 2020

Hmm, that's probably my bad; I assumed pressing down arrow on a select would be enough to change it in every browser, but that's rather UI dependent. This will be hard to fix without a Mac...

@foolip
Copy link
Member

foolip commented Aug 14, 2020

I made a recording which might help figure out how to make this work on macOS. I clicked the select element with the mouse, then the down arrow only changes the selected option in the popup, it doesn't commit that change. Pressing space does.

Maybe sending a down and space key will work? If not then I'm not sure. Is it necessary for the change event to be triggered by use interaction with the form element, or could that one be done programatically?

@domenic
Copy link
Member Author

domenic commented Aug 14, 2020

I made a recording which might help figure out how to make this work on macOS

Thank you very much!!

Maybe sending a down and space key will work?

From your description, I should send a click first, right?

Is it necessary for the change event to be triggered by use interaction with the form element, or could that one be done programatically?

Yes; programmatic changes do not trigger these events.

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24995 August 14, 2020 16:01 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24995 August 14, 2020 17:37 Inactive
@domenic
Copy link
Member Author

domenic commented Aug 14, 2020

I give up; I can't manage to get Safari to trigger. Maybe it is an actual Safari bug! I'll merge and folks who own Macs can try to fix it...

@domenic domenic merged commit 47f659d into master Aug 14, 2020
@domenic domenic deleted the input-change-composed branch August 14, 2020 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants