-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passed/failed for assertion results in TestRenderer and migrate to pass/fail for report comparison algorithms #847
Conversation
|
||
const AssertionsFieldset = ({ assertions, commandIndex, assertionsHeader }) => { | ||
// Handle case where build process didn't include assertionResponseQuestion | ||
const normalizedHeader = useMemo(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value from support.json
wasn't being correctly included with test commands in assertionsHeader.descriptionHeader
. I am not sure but my sense is that this isn't from changes in this PR but instead comes from the state of the work that this PR is built upon. If this isn't the case, let me know. Either way this calculation handles the issue and it can become a tiny tech debt task after all of the v2 changes have landed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The renderer in this app has to be built on top of the individual collected json files. Architecturally, that means the .collected.json for any of these tests have to include the relevant data. Looking into this, it's clear there is some extending that can happen here to support that. The same issue is present when viewing a example collected test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stalgiag I've submitted w3c/aria-at#1005 as a potential fix. Let me know your thoughts.
There's other potential tech debt I've noticed, that may come up during future v2 format support work, that I think we can handle as they arise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking again at how this is used, I'm also not against just explicitly depending on the support.json
in this use case. It should always be up to date because of the import script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave as-is for now and I'll check out #1005 for sweeping this up later. Definitely would be nice to avoid the weirdness of looking for the undefined value here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circling back around - It doesn't seem that collectedText.supportJSON
is coming through with the changes in #1005. I can look more into this next week if we think it is important to handle now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem that collectedText.supportJSON is coming through with the changes
The supportJson
attribute would be added in the object called by the following line as well:
await testRunIO.setInputsFromCollectedTestAsync(renderableContent)
if we think it is important to handle now.
I don't right now. Still fully onboard with just calling it from the available support.json
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good to me. Although I imagine in the future, we'll want to clean up references to failedReason
.
Also I think these references to failedReason being updated in the harness' state may need to be updated to be safe? I imagine it's something like the following based on your other changes:
if (assertionResult.passed)
commands[i].assertions[j].result = 'pass';
- else if (assertionResult.failedReason === 'NO_OUTPUT')
- commands[i].assertions[j].result = 'failMissing';
- else if (assertionResult.failedReason === 'INCORRECT_OUTPUT')
- commands[i].assertions[j].result = 'failIncorrect';
- else commands[i].assertions[j].result = 'notSet';
+ else commands[i].assertions[j].result = 'fail';
|
||
const AssertionsFieldset = ({ assertions, commandIndex, assertionsHeader }) => { | ||
// Handle case where build process didn't include assertionResponseQuestion | ||
const normalizedHeader = useMemo(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking again at how this is used, I'm also not against just explicitly depending on the support.json
in this use case. It should always be up to date because of the import script.
Thanks for this! I forgot that this value is not just excluded from v2, it is being deprecated from use across all test versions. This allowed me to more destructively remove the references. I only left them in two locations:
This also means that there is some additional clean up that can happen upstream in the resources files in aria-at. I'll handle that next week. |
cd1cdc9
to
aaa628c
Compare
Sounds like a plan, thanks for being on top of that! |
7212f02
to
5caad44
Compare
Co-authored-by: Howard Edwards <[email protected]>
5caad44
to
e9f4388
Compare
see #736
This PR does the following:
failedReason
into account when calculating conflictsFor reviewers, the
client/resources
changes are not relevant to this PR and have been reviewed elsewhere.