-
Notifications
You must be signed in to change notification settings - Fork 165
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
Migrate the custom element polyfill tests to @web/test-runner
.
#509
Conversation
This also removes the tests for the scoped custom element registry from those run during the root `test` npm script. These tests are currently known to be failing and were not previously run during automated tests.
…w that they have been fixed upstream.
…. (...) These tests are currently failing, but were not being run before.
`outerHTML` is not wrapped by the polyfill and these tests were not being run.
49fecf1
to
ec79bd9
Compare
This still depends on getting the issue linked in the description fixed and I'd like to factor the WTR configs a bit differently, but I think this PR is close enough to start getting some feedback. PTAL, thanks! |
@web/test-runner
.@web/test-runner
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you make of these errors? We got the same error in both sauce runs:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW those links are to the same run :) That particular error is due to modernweb-dev/web#1986. I've been locally testing this PR on Safari 9 and 10 on Sauce by modifying files my tests
package's node_modules
to match the PR I pushed for that issue. Getting that fixed is definitely a blocker.
Also, that test in the event-path.html
file where I added done()
and one other in that same file fail in at least Chrome 41 when Shady DOM's noPatch
mode is enabled. Though, I don't think these should necessarily be considered a blocker for this PR since they're legit failures AFAICT.
@@ -10,214 +10,109 @@ | |||
--> | |||
<title>Custom Elements Tests</title> | |||
<meta charset="utf-8" /> | |||
<script src="../../node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_js.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to double check that adding this was actually necessary. I don't remember if I did this before or after I had the test environment script in a reasonable state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this was necessary. The custom elements polyfill depends on Promise
support (so every other test file already includes it) but this one originally didn't because it's for the native shim. The test environment now also depends on promises.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be more proper for the test environment to include a promise polyfill itself and for this one import to be removed, but I'm getting a different set of errors in IE 11 with core-js' promise polyfill added. I'll keep trying for a little bit - maybe I've chosen an entry point that assumes other features that aren't available in IE 11.
Now that modernweb-dev/web#1993 has landed and those components were released in modernweb-dev/web#1997, the proper way to update this would be to wait for a release of |
Opened modernweb-dev/web#1999 to bump |
Quoting the changelog presubmit:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like tests are still failing on Sauce
I added the label because this PR has no user-facing changes. Also, those failures on Saucelabs are real failures from before this PR. In |
…. (...) `@web/test-runner-saucelabs@0.8.1` is the first version that depends on `@web/test-runner-webdriver@0.5.1`, which contains updates required by this branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Thanks for the taking the time to review! |
This PR migrates the custom element polyfill tests from WCT to
@web/test-runner
.tests
package.tests
andscoped-custom-element-registry
).tests
package now includes a plugin for@web/dev-server
that matches enough of the compilation behavior ofpolyserve
to provide the tests with the same environment as before.