Skip to content

data-tests can't handle "?" #4966

@plehegar

Description

@plehegar

Description of problem

URL to affected spec or repo:

https://w3c.github.io/pointerevents/

What happened (e.g., it crashed)?:

When one uses
data-tests="pointerevent_pointermove_isprimary_same_as_pointerdown.html?mouse"

Respec generates an invalid warning :

The following test could not be found in Web Platform Tests: pointerevent_pointermove_isprimary_same_as_pointerdown.html?mouse.

Expected behavior (e.g., it shouldn't crash):

No warning.

The file exists:
https://github.com/web-platform-tests/wpt/blob/master/pointerevents/pointerevent_pointermove_isprimary_same_as_pointerdown.html

but uses a parameter to run properly.

wpt.fyi does report results:

https://wpt.fyi/results/pointerevents/pointerevent_pointermove_isprimary_same_as_pointerdown.html%3Fmouse?label=experimental&label=master&aligned

Optional, steps to reproduce:

  1. Add the data-tests attribute
  2. reload the document and see the warning

https://github.com/speced/respec/blob/main/src/core/linter-rules/wpt-tests-exist.js#L36 should probably add

.map(test => test.trim().split("?")[0])

I'll make a PR unless someone believes differently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions