Repository navigation
Assert the edge query stays pending when no schema exists - #2666
Merged
Merged
Conversation
Layer: 1-no-schema-edge-test
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.
Summary
The test "should not fetch edge connections when no active schema exists" couldn't always tell "the edge query never ran" from "the query ran and found no edge types to fetch", so removing the query's
enabledgate could slip past it.User-facing: none
expect(result.current.edgeDiscoveryQuery.fetchStatus).toBe("idle"); +expect(result.current.edgeDiscoveryQuery.status).toBe("pending"); expect(fetchEdgeConnectionsSpy).not.toHaveBeenCalled();Evidence
Before: with the gate in
edgeConnectionsQueryreplaced byenabled: trueand the query allowed to settle, the test passed:fetchStatusreturns to"idle"and the query function takes its empty-edge-list branch without callingfetchEdgeConnections.After: agent-tested by mutating the gate locally and reverting:
With the test's current timing, the existing
fetchStatuscheck already catches the mutation, because the query is still fetching when it runs. The newstatuscheck covers the settled case, so the test no longer depends on the query being in flight at the assertion. Both checks stay.Merge Danger
Door: two-way
Impact: none. Test-only.
Changelog entry
None needed. Test-only change.
Related
enabledgate is removed #2662🤖 Written by an AI agent on my behalf.