-
Notifications
You must be signed in to change notification settings - Fork 6
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
Relationship alias coverage fixes #317
Conversation
Coverage report
Test suite run success459 tests passing in 31 suites. Report generated by 🧪jest coverage report action from 5769ba7 |
…ion alias id in annotation structure, replacing old +1 hack
3242601
to
a871fc0
Compare
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.
Love that this fix is working out for us! I added some little comment cleanup suggestions so that you can easily batch most of them, and then a couple of other small suggestions.
We still have a couple of other - 1
and + 1
's in the ClauseResultsHelpers file. Do we know if we will have any similar issues with these other alias id's? Might be out of scope for this task, but wanted to bring it up in case we need to create a follow on task.
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.
Nice updates!
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.
Lgtm!
Summary
Fixes highlighting of aliases in with/without relationships.
New behavior
Looks in the annotation for the localId that includes the relationship alias so it can be highlighted to match the relationship source.
Also uses the uncoverage work to properly 'not' change the highlighting in coverage when there is a node of the annotation that does not have a result due to its localId not existing in the logic.
Code changes
ClauseResultsHelpers.ts
- Added new functionality to find the localId in the annotation that contains the source and alias of relationship clauses. This is then assigned as the alias for the source of the relationship so the alias can be highlighted as covered when the source is covered.HTMLBuilder.ts
- Now using the uniquified clauseReuslts results from uncoverage to highlight coverage and allow for annotation nodes that we do not care about (i.e. the ones with localId's only in annotations which we cannot account for in expressions) to not have any styling so they can inherit their parent styling.Testing guidance
Run unit tests and regression scripts to look for changes in coverage. Some changes in coverage and highlighting are to be expected.