webcomponents / polyfills

Web Components Polyfills
BSD 3-Clause "New" or "Revised" License
1.14k stars 165 forks source link

Migrate the custom element polyfill tests to `@web/test-runner`. #509

Closed bicknellr closed 2 years ago

bicknellr commented 2 years ago

This PR migrates the custom element polyfill tests from WCT to @web/test-runner.


bicknellr commented 2 years ago

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!

bicknellr commented 2 years ago

Now that https://github.com/modernweb-dev/web/pull/1993 has landed and those components were released in https://github.com/modernweb-dev/web/pull/1997, the proper way to update this would be to wait for a release of @web/test-runner-saucelabs that depends on at least @web/test-runner-webdriver@0.5.1 and have the tests package depend on at least that version. In the mean time, I've added @web/test-runner-webdriver@^0.5.1 as a dependency of the tests package, which is compatible with @web/test-runner-saucelabs' dependency/constraint of @web/test-runner-webdriver@^0.5.0, so @web/test-runner-webdriver@0.5.1 will be installed first under tests and then @web/test-runner-saucelabs will have its dependency of @web/test-runner-webdriver@^0.5.0 deduped against it, causing it to use 0.5.1.

bicknellr commented 2 years ago

Opened https://github.com/modernweb-dev/web/pull/1999 to bump @web/test-runner-saucelabs' dependency range for @web/test-runner-webdriver to ^0.5.1.

rictic commented 2 years ago

Quoting the changelog presubmit:

Please add a CHANGELOG entry, or add the "Skip Changelog" label if not required.

bicknellr commented 2 years ago

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 packages/tests/shadydom/event-path.html, the "composedPath of events from non-Node subclasses works" now fails because of the change I made here that causes the test to recognize an error thrown before the test ends. I think the other, "focus currentTarget is valid when unwrapped in noPatch", was already failing before but wasn't caught because we couldn't get the tests to run reliably and decided to rely on the internal tests instead.

bicknellr commented 2 years ago

Thanks for the taking the time to review!