Skip to content

test(import): fix stale QGIS nested group name expectation - #1597

Merged
giswqs merged 1 commit into
mainfrom
fix/qgis-group-name-test-expectation
Jul 31, 2026
Merged

test(import): fix stale QGIS nested group name expectation#1597
giswqs merged 1 commit into
mainfrom
fix/qgis-group-name-test-expectation

Conversation

@giswqs

@giswqs giswqs commented Jul 31, 2026

Copy link
Copy Markdown
Member

Problem

main is red: CI run 30669858506 fails on one test —
QGIS project import > inherits visibility from unchecked parent groups:

+ actual - expected
    [ 'Transport', false ],
+   [ 'Places', false ]
-   [ 'Transport / Places', false ]

Cause

A merge race between two PRs:

Each PR was green on its own base; the combination is not.

Fix

Update the stale expectation to the nested naming. The importer behavior — both the nested names from #1593 and the parent-visibility inheritance from #1584 — is correct and unchanged.

Verification

  • node --import tsx --test tests/qgis-project-import.test.ts — 13/13 pass
  • npm run test:frontend — 4571 pass, 0 fail
  • pre-commit run --files tests/qgis-project-import.test.ts — passed (includes the npm build hook)

Summary by CodeRabbit

  • Tests
    • Updated project import coverage to reflect the expected separate display of the “Places” nested group.

#1593 changed QGIS layer-group names from flattened ("Transport /
Places") to plain names plus a parentId. #1584 branched before that
change and added a visibility-inheritance test still asserting the
flattened name, so main went red once both landed.

The importer behavior is correct; only the expectation was stale.
Copilot AI review requested due to automatic review settings July 31, 2026 22:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 65dbb104-7b13-4f3a-a962-7d5fac6062e4

📥 Commits

Reviewing files that changed from the base of the PR and between e910e01 and 14c34b7.

📒 Files selected for processing (1)
  • tests/qgis-project-import.test.ts

📝 Walkthrough

Walkthrough

The QGIS project import test now expects the nested Places group as a separate visibility entry instead of the flattened Transport / Places name.

Changes

QGIS import test

Layer / File(s) Summary
Nested group visibility assertion
tests/qgis-project-import.test.ts
The test expects Places as a separate nested group entry.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers: copilot, shiroksh

Poem

I’m a rabbit checking groups with care,
Places now stands alone there.
No flattened name to hop through,
The test reflects the nesting view.
One small change, clear and true!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the stale QGIS import test expectation and matches the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/qgis-group-name-test-expectation

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

The fix is fully consistent with the already-established behavior (line 129 confirms ["Transport", "Places"] as the expected nested group names elsewhere in the same file, and groupDisplayName at line 431-434 confirms the importer returns just the own name, not a flattened path). This is a minimal, correct one-line test fix exactly as described in the PR body — no other issues to find.

No inline comments needed; this is a trivial, verified-correct fix.

Code review

Bugs: None found. The updated expectation (["Places", false] instead of ["Transport / Places", false]) matches the current groupDisplayName implementation (apps/geolibre-desktop/src/lib/qgis-project-import.ts:431-434), which returns a group's own name rather than a flattened path — consistent with the same expectation already used elsewhere in the same test file (tests/qgis-project-import.test.ts:129). Confidence: high.

Security: N/A — test-only change, no security surface affected.

Performance: N/A — no runtime code changed.

Quality: The change is minimal and correctly scoped to just the stale assertion; no unrelated cleanup was bundled in. Confidence: high.

CLAUDE.md: No applicable guidelines triggered (no lockfile, catalog, or mirrored-constant changes involved).

No issues found — this is a correct, well-justified one-line fix for a merge-race test regression.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Cloudflare PR preview

Item Value
Site https://7cf9e3e9.geolibre-preview.pages.dev
Demo app https://7cf9e3e9.geolibre-preview.pages.dev/demo/
Commit 14c34b7

@github-actions

Copy link
Copy Markdown
Contributor

🔍 GitHub Pages PR preview

Item Value
Site Deploy failed. See the job log.
Demo app Unavailable
Commit 14c34b7

@giswqs
giswqs merged commit ce8f3c2 into main Jul 31, 2026
13 checks passed
@giswqs
giswqs deleted the fix/qgis-group-name-test-expectation branch July 31, 2026 22:51
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.

2 participants