-
Notifications
You must be signed in to change notification settings - Fork 148
Introducing input automation stubs #250
Comments
Dupe of #142, I'd say? |
So @gsnedders what do you think of the proposed API in #251 ? I know it is not complete by any means for example it doesn't have the keyboard events or other stuff. But I just wanted to start landing the changes and iterating over that and using it in different tests to be able to make it more complete with the feedback of different vendors. |
To quote myself from public-test-infra:
Would this be workable for input automation, or is this issue entirely separate from the proposed API in https://navidz.github.io/web-input-automation/? |
I believe this depends on the test to decide how to handle it. I mean the proposed API returns a promise. So I assume a well written test should fail if the returned promise failed and if it passed it should move on to the next step. Right? |
Sigh, I didn't see #251 yet. Now I have. So, I wonder why a stub is needed. A test could look like this: async_test(t => {
var driver = new InputDriver();
driver.sendpointerActions([...]);
document.addEventListener('something', t.step_func_done());
}); It simply assume the API exists, and if it doesn't it'll fail, in this case by throwing an exception on the first line. Would that work? (We could still implement the API in our own testharnessreport.js of course, or something that's more like our other LayoutTests-only APIs. It would need to be something where we have a path to making it work for Chrome release builds as well.) |
I'm not sure failing at a particular line because of non-existence function is the pattern I see anywhere in wpt tests. I'm fine with that certainly if no one else has any objection. |
https://github.com/w3c/web-platform-tests/blob/master/battery-status/battery-promise.html is an example of a test that starts by calling So, I'm trying to see if we can treat testing APIs just like the APIs under test, just assuming existence.
I'm not sure I understand. In an
|
This issue has been moved to web-platform-tests/wpt#7187; please continue all discussion there. |
@foolip @jgraham @RByers
I created this issue to track adding the automation APIs we talked about here as the first stage. Is that okay to add it to testharnessreport.js for now?
The text was updated successfully, but these errors were encountered: