Skip to content

refactor to use test_driver - #10500

Merged
marcoscaceres merged 2 commits into
masterfrom
pr_test_driver
Apr 25, 2018
Merged

marcoscaceres merged 2 commits into
masterfrom
pr_test_driver

Conversation

@marcoscaceres

@marcoscaceres marcoscaceres commented Apr 17, 2018 •

Copy link
Copy Markdown
Contributor

No description provided.

const button = document.getElementById("button");

promise_test(async t => {
button.onclick = async () => {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@gsnedders, this is my first attempt to use test_driver, does this look ok?

@marcoscaceres

Copy link
Copy Markdown
Contributor Author

Noting that if we do this, we are effectively shutting off Safari and Edge. That seems kinda bad.

@foolip

foolip commented Apr 23, 2018

Copy link
Copy Markdown
Member

@kereliuk, can you review?

@marcoscaceres

Copy link
Copy Markdown
Contributor Author

So, @gsnedders checked and it looks like we are going to be good on Safari soon (works in Safari TP!). However, it's unclear what the story is going to be on Edge. @MSFTkihans, could you please investigate support of Web Driver? Or does anyone know someone we can ask over on the Microsoft side? I'd really like for the Edge team to be onboard here, as then we can migrate a bunch of other tests to use this.

@foolip

foolip commented Apr 23, 2018

Copy link
Copy Markdown
Member

I think @thejohnjansen should be able to find the right contact for Edge.

@gsnedders

Copy link
Copy Markdown
Member

@marcoscaceres

Noting that if we do this, we are effectively shutting off Safari and Edge. That seems kinda bad.

As long as they're manual tests, they're pretty much shutting off everyone as basically nobody will ever run them, hence I'm not convinced it's any regression.

Ultimately, if they decide not to (internally) support the cross-browser way to do test automation that we discussed at length, that's their problem IMO.

@kereliuk kereliuk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

r+

This looks good! Also for me this is failing on Firefox, but that might be expected.

@foolip

foolip commented Apr 24, 2018

Copy link
Copy Markdown
Member

This is using test_driver.click(button), and that already works on Edge:
https://wpt.fyi/uievents/order-of-events/mouse-events/click-cancel.html

Safari doesn't work because document.elementsFromPoint isn't there. Safari 11.0 is pretty old, though, maybe it's been added since. @youennf?

@marcoscaceres

Copy link
Copy Markdown
Contributor Author

As long as they're manual tests, they're pretty much shutting off everyone as basically nobody will ever run them, hence I'm not convinced it's any regression.

Agree. We do manually run them at Mozilla, Google, and Apple to check conformance while implementing, and to help get us out of Candidate Recommendation.... but after CR... 😢.

Ultimately, if they decide not to (internally) support the cross-browser way to do test automation that we discussed at length, that's their problem IMO.

Easy, 🐯! We are all doing the best we can here.

The test automation is limited because this needs to deal with extremely complicated browser UI (the Payment Sheet). We are going to hit this a lot with a lot of the APIs coming down the standards pipe.

I don't have a solution for that, apart from maybe having pref-enabled browser testing modes. I don't know what you'll all have been discussing as possible solutions for the web, but if there are some documents, I'd like to read them.

@marcoscaceres
marcoscaceres merged commit 0ffac8f into master Apr 25, 2018
@marcoscaceres
marcoscaceres deleted the pr_test_driver branch April 25, 2018 03:12
@foolip

foolip commented Apr 25, 2018 •

Copy link
Copy Markdown
Member

@kereliuk, do we have a concise description somewhere of the WebDriver API + testdriver.js approach that we're pursuing for most automation needs?

@MSFTkihans

Copy link
Copy Markdown

@marcoscaceres Apologies for my late reply: I was out of the office for a week.
I'll ask around the office but I think @foolip is right: John Jansen is a good contact for quality, given that he's a principal manager.
Edge definitely supports use of Webdriver: we make use of it in testing. I'll see if I can find someone to loop into this conversation who works with it.

@kereliuk

Copy link
Copy Markdown
Contributor

@foolip Nope, but I think this is a good thing to have. Will put on roadmap!

@instylevii

Copy link
Copy Markdown

@marcoscaceres What's the question related to WebDriver here? We support the JWP dialect for older builds (RS4 and below) and are actively working on the W3C dialect for RS5.

@thejohnjansen

Copy link
Copy Markdown
Contributor

I'm really sorry for the delay in responding. It turns out that I am not good at GitHub notifications yet and this was buried...

No excuses.

It's not clear to me yet what would block Edge from working with this. @marcoscaceres, do you have an example of how this fails in Edge?

@marcoscaceres

Copy link
Copy Markdown
Contributor Author

@thejohnjansen, sorry, I had misread somewhere that test_driver might not be supported by Edge. I'm really happy to hear that it should work.

What's confused me is that the WPT's README section on Running Tests Automatically, states that it's not possible to provide "edge" as an argument. It says:

where product is currently firefox or chrome

Is that expected to change?

@gsnedders

Copy link
Copy Markdown
Member

@marcoscaceres Ergh, our duplicated documentation bites us again (turns out that having to remember to update both README.md and the actual documentation every time any one of a billion things changes is hard). Can you file a bug for that? Also note that wptrunner is only relevant insofar as Mozilla's infra and wpt.fyi is concerned: every other vendor has their own running infrastructure for it.

@foolip

foolip commented Apr 27, 2018

Copy link
Copy Markdown
Member

@kereliuk can you create and self-assign an issue for de-duplicating the documentation? #6565 is another issue that's kinda blocked on that.

@kereliuk

Copy link
Copy Markdown
Contributor

Done #10684

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants