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

Separate week and month cases from selection-not-application.html #32479

Merged
merged 3 commits into from
Mar 18, 2022

Conversation

josepharhar
Copy link
Contributor

This was discussed here:
web-platform-tests/interop#11 (comment)

@foolip
Copy link
Member

foolip commented Jan 20, 2022

Thanks @josepharhar!

Just in case you haven't seen the mechanism, do you think https://web-platform-tests.org/writing-tests/testharness.html#variants would be an improvement here? If the test is copied and edited, one can get basically the same result by doing something like this:

<meta name="variant" content="">
<meta name="variant" content="?week,month">
...
<script>
...
var nonApplicableTypes = ["hidden", "email", "datetime-local", "date", "time", "number", "range", "color", "checkbox", "radio", "file", "submit", "image", "reset", "button"];
if (location.search) {
  nonApplicableTypes = location.search.substr(1).split(',');
}
</script>

This also incidentally allows tweaking the URL to subset the tests for debugging purposes, although only if one understands how the variants stuff is set up.

This would also make it easy to later merge the tests again by deleting the variants bits.

@foolip
Copy link
Member

foolip commented Jan 21, 2022

@josepharhar if you take that suggestion, I think you should also remove the early return in "Type is not supported - don't bother with the following checks" so that the tests run unconditionally. That's consistent with what I did in #32468.

@josepharhar
Copy link
Contributor Author

Done and done, thanks for the suggestion!

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