speced / bikeshed

:bike: A preprocessor for anyone writing specifications that converts source files into actual specs.
https://speced.github.io/bikeshed
Creative Commons Zero v1.0 Universal
1.11k stars 200 forks source link

Feature request: metadata header for linking to test suite #1001

Open foolip opened 7 years ago

foolip commented 7 years ago

Many WHATWG specs now link to tests in the header:

This is using the following syntax:

!Tests: <a href=https://github.com/w3c/web-platform-tests/tree/master/dom>web-platform-tests dom/</a> (<a href=https://github.com/w3c/web-platform-tests/labels/dom>ongoing work</a>)

Something more like this would be nice:

Tests: dom

Possibly with some way to point to a test suite other than web-platform-tests.

foolip commented 7 years ago

Looks like ReSpec has testSuiteURI for this: https://github.com/w3c/IndexedDB/commit/377b979783857cc6b37b769119cafe5c9af58228

(IndexedDB is now Bikeshed though.)

foolip commented 7 years ago

OK, I have found https://tabatkins.github.io/bikeshed/#metadata-test-suite which takes a URL.

Could that be tweaked to also be able to link to ongoing work?

tabatkins commented 7 years ago

The Test Suite metadata is nearly a no-op. All it does is produce linked text in your header.

I'm happy to make it easier to link to wpt, tho. Are those two url forms in your !Tests example always applicable, with the "dom" part swapped out?

foolip commented 7 years ago

Yes, because the labels in wpt are just the names of the top-level directories, it should be precisely as simple as it seems.

foolip commented 7 years ago

I've now come across one case which wouldn't be that simple in https://github.com/w3c/webappsec-csp/pull/223. However, I think it's probably fine to keep using the syntax I've used there.

dbaron commented 7 years ago

It might also be useful to be able to link to more than one label in wpt, e.g., to link to both https://github.com/w3c/web-platform-tests/labels/css-fonts and https://github.com/w3c/web-platform-tests/labels/css-fonts-3.

dbaron commented 7 years ago

Though it's also worth noting here that CSS also has nicer ways of viewing its test suites than the directory in wpt, so it's sometimes good to link to additional things, e.g., https://test.csswg.org/suites/css-fonts-3_dev/nightly-unstable/ in addition to the wpt directory.

tabatkins commented 6 years ago

I think I want to key this off of WPT Path Prefix now, actually. I can use that data to link straight to and land on a useful page.