Skip to content
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

UI test to check for relevant completion options in bootstrap.properties and server.env #1205

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

anusreelakshmi934
Copy link
Contributor

@anusreelakshmi934 anusreelakshmi934 commented Jan 1, 2025

Fixes #852

testCompletionValuesInServerEnv Video

serverEnv.mov

testCompletionValuesInBootstrapProperties Video

Bootstrap.mov

Copy link
Contributor

@mrglavas mrglavas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anusreelakshmi934 I noticed testCompletionValuesInServerEnv() and testCompletionValuesInBootstrapProperties() are mostly copies of each other. We're always trying to reduce and avoid code duplication to make the plugin and tests easier to maintain.

@TrevCraw Wondering what your thoughts are on whether this is sufficient coverage since you opened this issue.

@TrevCraw
Copy link
Contributor

TrevCraw commented Jan 8, 2025

Based on this file - https://github.com/OpenLiberty/liberty-language-server/blob/main/liberty-ls/src/main/java/io/openliberty/tools/langserver/utils/ServerPropertyValues.java#L27 - it looks like LCLS returns a List of Strings for the default completion items for each property key. Therefore, I think it is safe to assume each key should behave the same regarding the filtering applied by LSP4IJ to order the completion items. Testing one property key in each file should be sufficient.

@anusreelakshmi934
Copy link
Contributor Author

Based on this file - https://github.com/OpenLiberty/liberty-language-server/blob/main/liberty-ls/src/main/java/io/openliberty/tools/langserver/utils/ServerPropertyValues.java#L27 - it looks like LCLS returns a List of Strings for the default completion items for each property key. Therefore, I think it is safe to assume each key should behave the same regarding the filtering applied by LSP4IJ to order the completion items. Testing one property key in each file should be sufficient.

So @TrevCraw Is it okay to have two methods since testCompletionValuesInServerEnv() and testCompletionValuesInBootstrapProperties() are mostly copies of each other as pointed out my @mrglavas .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create UI test to check for relevant completion options in bootstrap.properties and server.env
4 participants