wpt.fyi
wpt.fyi copied to clipboard
Add support for view=test query parameter
Backend changes:
- Add "test" to the allowlist values for the view url parameter
- Add TestParseViewParam to assert behavior for existing view params and the new "test" parameter
Frontend changes:
- Add new Test View button
- Add test_view_ prefix. This prefix is used to keep track of the new view=test mode.
- Add new helper method isTestView() to support this new view
- Add helper method isInteropView to retroactively support the already supported interop view.
- Create getNodeTotalProp and getNodePassProp to encapsulate the logic of which property from the aggregation node to use.
About view=test mode
- Test pass is only counted if the number of subtest passes == the total subtests
- This should not display percentages. Only the counts from the first bullet point when at directory level.
- When on the individual test level, it should only show
PASS
when subtest passes == the total subtests- Other cases:
- When the status == OKAY and subtest passes != the total subtests, still show FAIL
- Show the status for other cases that come from the existing STATUS_ABBREVIATIONS mapping
- Fallback to showing FAIL for anything else
For reviewers:
- Double check to make sure I accounted for the legacy v1 summary case.
High level view:
Test View:
Mixed View: