W3C home > Mailing lists > Public > spec-prod@w3.org > July to September 2017

Re: [ReSpec] `data-tests` and new goodies in v15+

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 15 Aug 2017 11:24:45 -0700
Message-ID: <CAAWBYDBLDeXH0_ahweYf8i1Dn=P5UjWwdeP4iszpnDMONLZErg@mail.gmail.com>
To: Marcos Caceres <mcaceres@mozilla.com>
Cc: spec-prod <spec-prod@w3.org>
On Thu, Jul 27, 2017 at 3:08 AM, Marcos Caceres <mcaceres@mozilla.com> wrote:
> Hi All
> 🎅 new goodies, just for you:
>  🎁 Link to your (web-platform-) tests: add `testSuiteURI` + a space
> separated list of paths to `data-tests` to link to tests. See below.

Any chance of seeing a live example of this, so I can tell how it
works and what sort of UI you're producing? Happy to reproduce this in

>  🎁 `isPreview` config option: allows you to denote that a spec is
> just a preview. This is now used by Tobie's pull request preview tool.

>From reading the PR, it appears that this just adds the warning box?
If so, then for any Bikeshed users, this can be done by adding a
`Warning: not-ready` metadata to your document, or calling `bikeshed
spec --md-warning="not ready"` to dynamically add it during

>  🎁 If you have `github`, you don't need "shortName" anymore
> (shortName is derived from your github repo!)

Ah, so if my repo is `tabatkins/css-foo`, it'll assume the shortname
is `css-foo` by default? That seems like it would misfire on levelled
specs, no?  Or does it have some logic for that?

> ## data-tests attribute (beta!)
> The `data-tests` attribute takes a list of space-separated URLs,
> allowing you to link tests to testable assertions. This will add a
> details drop down to the testable assertion, with an unordered list of
> tests.

I recommend changing this to comma-separated, since this is still new.
If you ever want to associate more data with the url, you'll be very
sorry about using space separation. I did, in the past. ^_^

> The data-test works together with the testSuiteURI config option, so
> it must be present or ReSpec will yell at you.
> It's best used with <p> and <li> elements.
> ## Examples of usage
> ```
> <script>
> const respecConfig = {
>  testSuiteURI: "https://wpt.fyi/payment-request/",
> };
> </script>
> <p data-tests="test-1.html test-2.html">
>   The user agent MUST do this stuff...
> </p>
> ```

Does this require the element to have an ID or something to link to? I
probably just need to see it in action to see what this actually does.

Received on Tuesday, 15 August 2017 18:25:30 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:55:22 UTC