Repository navigation
test: the label test of a completion list's default edit range fails without the label fallback - #2275
Merged
lagergren merged 1 commit intoNov 26, 2026
Conversation
…without the label fallback The test of redhat-developer#2268 passed without its fix too, since LSP4IJ inserts the label of an item without a text edit in place of the word before the caret, which was the whole text. Its default edit range now covers "ga-tail", more than that word, so the fallback gives "gap-1" and the word insertion "gap-1-tail". The edit ranges of both lists stay within the document, and an indentation of redhat-developer#2268 is restored.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2275 +/- ##
==========================================
+ Coverage 58.07% 58.10% +0.02%
==========================================
Files 848 848
Lines 36436 36436
Branches 5717 7541 +1824
==========================================
+ Hits 21162 21170 +8
+ Misses 12283 12277 -6
+ Partials 2991 2989 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Follow-up to #2268, as its review said.
What
The test of the label fallback that #2268 added,
testAnItemWithOnlyALabelReplacesTheDefaultEditRangeWithItsLabel, passed without #2268's fix too. LSP4IJ inserts the label of an item without a text edit in place of the word before the caret, and in that test the word before the caret was the whole document (gabecamegap-1either way).Change
ga-tail, more than the word before the caret.gap-1.gap-1-tail.Tests
LSPCompletionContributor, the label test fails withexpected:<gap-1> but was:<gap-1-tail>. With it, it passes.CompletionItemDefaultsEditRangeTest,CssCompletionClientConfigTestandMicroProfileConfigPropertiesCompletionTestpass headless on 2024.2, 2025.3 and IU 2026.3: 18 tests each.