You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now test cases are created and placed into act-rules/act-rules.github.io#master. These test cases should instead be added to the WAI website. As part of the transform-rule script, we'll want to generate testcase files and put them into a directory like so: content/testcases/{ruleId}/{testcaseHash}.{extension}
There is already a script to create these files in act-rules/act-rules-web. We'll need to convert that to typescript. In addition, we'll want to make a few more changes:
The hash should be an md5 hash, applied to the test case snippet, with sequences of ASCII-whitespace replaced with a single space character. This ensures changes in whitespace, which can happen when Prettier is updated, don't change hashes. Unlike is currently the case, rule ID and language (html, svg, xml) should not be included in the hash. Adding rule IDs creates problems with atomic/composite rules, and the language encoding is unnecessary since the file extension of the test case file avoids problems with those already
When the test case is HTML, and it does not include a doctype or an html element, the test case is wrapped in a small template:
<!doctype html><htmllang="en"><head><title>{rule title}: {Passed|Failed|Inapplicable} Example {#}<title></head><body>
{{code snippet here, properly formatted and indented }}
</body></html>
The text was updated successfully, but these errors were encountered:
Right now test cases are created and placed into act-rules/act-rules.github.io#master. These test cases should instead be added to the WAI website. As part of the
transform-rule
script, we'll want to generate testcase files and put them into a directory like so:content/testcases/{ruleId}/{testcaseHash}.{extension}
There is already a script to create these files in
act-rules/act-rules-web
. We'll need to convert that to typescript. In addition, we'll want to make a few more changes:The hash should be an md5 hash, applied to the test case snippet, with sequences of ASCII-whitespace replaced with a single space character. This ensures changes in whitespace, which can happen when Prettier is updated, don't change hashes. Unlike is currently the case, rule ID and language (html, svg, xml) should not be included in the hash. Adding rule IDs creates problems with atomic/composite rules, and the language encoding is unnecessary since the file extension of the test case file avoids problems with those already
When the test case is HTML, and it does not include a doctype or an html element, the test case is wrapped in a small template:
The text was updated successfully, but these errors were encountered: