Test link expansion inclusion rules with truth tables (reverse links)#3915
Merged
Test link expansion inclusion rules with truth tables (reverse links)#3915
Conversation
8244bb2 to
177160b
Compare
Note: this only covers reverse links. Direct links will be done separately (see #3886). This exhaustively tests the simplest case of link expansion, when there is a single candidate link to be included in a Content Store or GraphQL response. The simplicity makes it possible to test all possible combinations of properties of link sources and targets. This differs from other tests because it specifically checks whether a link should be included, whereas other tests only check whether GraphQL does the same thing as classic link expanion, whether that's correct or not. Drafts are currently only tested for classic link expansion. Once GraphQL supports drafts, a minor change to these tests will test GraphQL's link expansion too. The more complex scenario, not addressed here, is when there are several candidate links. Precedence determines which of the candidates are expanded. But for a link to be considered for precedence, it must already pass the inclusion rules tested in this PR.
177160b to
7abfcc4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: this only covers reverse links. Direct links will be done separately (see #3886).
This exhaustively tests the simplest case of link expansion, when there is a single candidate link to be included in a Content Store or GraphQL response. The simplicity makes it possible to test all possible combinations of properties of link sources and targets.
This differs from other tests because it specifically checks whether a link should be included, whereas other tests only check whether GraphQL does the same thing as classic link expanion, whether that's correct or not.
Drafts are currently only tested for classic link expansion. Once GraphQL supports drafts, a minor change to these tests will test GraphQL's link expansion too.
The more complex scenario, not addressed here, is when there are several candidate links. Precedence determines which of the candidates are expanded. But for a link to be considered for precedence, it must already pass the inclusion rules tested in this PR.