fix: updated Clangd test case based on latest changes
Description
Added Clangd path and query driver paths verification in the Clangd preference page.
Fixes # (IEP-XXX)
Type of change
Please delete options that are not relevant.
- Bug fix (non-breaking change which fixes an issue)
Test Configuration:
- ESP-IDF Version:
- OS (Windows,Linux and macOS):
Checklist
- [ ] PR Self Reviewed
- [ ] Applied Code formatting
- [ ] Added Documentation
- [ ] Added Unit Test
- [X] Verified on all platforms - Windows,Linux and macOS
Summary by CodeRabbit
-
Tests
- Improved tests to explicitly verify clangd path and query driver updates for new projects.
- Simplified flows by removing multi-step target-change and rebuild sequences for clearer, faster checks.
- Renamed and refocused tests for clarity and maintainability.
-
Chores
- Cleaned up test fixture setup by removing obsolete target-selector initialization, dialogs and helper utilities.
Walkthrough
Updated a UI test: renamed the main test and helper methods, removed LaunchBar target-selector and target-change/build flows, and replaced per-target driver assertions with direct clangd path and query-driver assertions.
Changes
| Cohort / File(s) | Summary |
|---|---|
Test refactor tests/com.espressif.idf.ui.test/src/com/espressif/idf/ui/test/executable/cases/project/NewEspressifIDFProjectClangFilesTest.java |
Renamed main test and several helpers; removed LaunchBarTargetSelector field and its initialization; deleted target-dialog/selection helpers and target-change/build steps; replaced driver validations with direct clangd path and query-driver assertions via new helpers (thenCompareActualClangdPathWithExpected(), thenCompareActualQueryDriversWithExpected()); removed obsolete methods/fields and adjusted labels/strings accordingly. |
Sequence Diagram(s)
(omitted β changes are test refactor only, no runtime control-flow changes warranting a diagram)
Estimated code review effort
π― 2 (Simple) | β±οΈ ~10 minutes
- Review focus: the single modified test file, renamed helpers, removed selector/dialog flows, and correctness of new assertion helpers.
Possibly related PRs
- espressif/idf-eclipse-plugin#1171 β relates to adding/integrating clangd path updates used by the new path assertions.
- espressif/idf-eclipse-plugin#1131 β modifies the same test class and related target-selection/driver verification behavior.
- espressif/idf-eclipse-plugin#1288 β touches query-driver update behavior that the test now verifies differently.
Suggested reviewers
- sigmaaa
- kolipakakondal
- alirana01
Poem
π I hopped through tests and trimmed the trail,
Old targets furl, new paths set sail.
Clangd and queries now neatly paired,
Quiet checks where fuss once flared,
Nibble, tidy β code well aired.
Pre-merge checks and finishing touches
β Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | β οΈ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | You can run @coderabbitai generate docstrings to improve docstring coverage. |
β Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | β Passed | Check skipped - CodeRabbitβs high-level summary is enabled. |
| Title check | β Passed | The title 'fix: updated Clangd test case based on latest changes' accurately reflects the main changeβa test case refactoring to align with updated clangd driver verification logic. |
β¨ Finishing touches
- [ ] π Generate docstrings
π§ͺ Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
- [ ] Commit unit tests in branch
IEP-1640
π Recent review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
π₯ Commits
Reviewing files that changed from the base of the PR and between 1b0a16a7b42408706fbd0fc7101e0a43b905e5c5 and af90f61c805310474865082d2370344068cff6c7.
π Files selected for processing (1)
tests/com.espressif.idf.ui.test/src/com/espressif/idf/ui/test/executable/cases/project/NewEspressifIDFProjectClangFilesTest.java(4 hunks)
π§° Additional context used
𧬠Code graph analysis (1)
tests/com.espressif.idf.ui.test/src/com/espressif/idf/ui/test/executable/cases/project/NewEspressifIDFProjectClangFilesTest.java (2)
tests/com.espressif.idf.ui.test/src/com/espressif/idf/ui/test/executable/cases/project/NewEspressifIDFProjectSDKconfigTest.java (1)
Fixture(78-251)tests/com.espressif.idf.ui.test/src/com/espressif/idf/ui/test/executable/cases/project/NewEspressifIDFProjectTest.java (1)
Fixture(193-444)
β° Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build_macos
- GitHub Check: build
π Additional comments (3)
tests/com.espressif.idf.ui.test/src/com/espressif/idf/ui/test/executable/cases/project/NewEspressifIDFProjectClangFilesTest.java (3)
126-126: LGTM: Test method renamed to reflect simplified flow.The new name accurately describes the test's purpose without implying build or target-change operations that are no longer part of the flow.
437-437: Verify the intent of using "Cancel" instead of "Apply and Close".The button was changed from
"Apply and Close"to"Cancel". Using "Cancel" is appropriate if the test only reads preference values without making changes. However, ensure this doesn't inadvertently skip any initialization logic that might be triggered by the "Apply" action.
129-130: Verify that clangd and query driver paths are populated without a build step.The test now reads clangd and query driver paths directly from Eclipse preferences immediately after project creation. However, based on code analysis:
updateClangdPath()is only called fromToolsActivationJob, which is triggered manually via UI wizards/tool manager, not automatically on project creation- The original test included a build step, which may have been necessary to trigger path population
- Without this step, the preferences dialog may not contain the expected paths
Confirm that either:
- Paths are auto-populated during project creation through a mechanism not yet located in the codebase
- The test setup or fixture properly initializes these paths before the assertions
- Default values from
IDFClangdMetadataDefaultsare sufficient for the test to pass
[!TIP]
π Customizable high-level summaries are now available in beta!
You can now customize how CodeRabbit generates the high-level summary in your pull requests β including its content, structure, tone, and formatting.
- Provide your own instructions using the
high_level_summary_instructionssetting.- Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
- Use
high_level_summary_in_walkthroughto move the summary from the description to the walkthrough section.Example instruction:
"Divide the high-level summary into five sections:
- π Description β Summarize the main change in 50β60 words, explaining what was done.
- π References β List relevant issues, discussions, documentation, or related PRs.
- π¦ Dependencies & Requirements β Mention any new/updated dependencies, environment variable changes, or configuration updates.
- π Contributor Summary β Include a Markdown table showing contributions:
| Contributor | Lines Added | Lines Removed | Files Changed |- βοΈ Additional Notes β Add any extra reviewer context. Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.