Repository navigation
feat: update Git role editor and related tests to reflect changes in … - #668
Conversation
…workspace Git connections
There was a problem hiding this comment.
ℹ️ Minor suggestions only — the fixes are sound; two assertions could be tightened.
Reviewed changes
- Role editor label —
git-role-editor.featureandgit-role-editor.spec.tsrename the workspace switch to "Manage workspace Git connections", matching theadmin.jsonlabel; assertions untouched. - Editor link assertion —
git-role-templates.spec.tsnow expects the link POST to be not403instead of403, reflecting that the Editor role passes the permission gate and the providerless e2e stack answers503. - Agent tab confirm —
git-agent-tab.spec.tsclicks "Remove connection" (the labelDeleteGitIdentityDialogrenders viaadmin.git.delete.confirm). - Automation stub —
git-automation.spec.tsadds aCONNECTIONstub plus a/git/connectionsroute so the link form renders, and updates theGIT_NO_IDENTITYcopy. - Settings scoping —
git-settings.spec.tsscopes "No Git provider is installed" to the Repositories section and stubs a connection for the reader case so the write-access copy shows. - Sidebar rail —
sidebar-navigation.spec.tsdispatches the expanded-state rail/toggle click because the resize handle overlays the rail center.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ The two prior suggestions are addressed; one small naming nit inline.
Reviewed changes
- Tightened the Editor link assertion —
git-role-templates.spec.tsnow asserts the link POST returns503anderrorCode(link) === "GIT_PROVIDER_UNAVAILABLE", replacing the loose.not.toBe(403)and pinning the deterministic providerless-stack response. - Real click for the sidebar toggle —
sidebar-navigation.spec.tsdrops thedispatchEvent("click")workaround for a realsidebarTrigger(page).click()in both the collapse/expand and rail suites, and normalizes one import's quotes. Themain-scoped locator also sidesteps the ambiguousgetByLabel("Toggle Sidebar")match.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
| await sidebarRail(page).click(); | ||
| // The resize handle overlays the rail while expanded, so only the trigger | ||
| // collapses it; the rail is clickable once the handle is gone. | ||
| await sidebarTrigger(page).click(); |
There was a problem hiding this comment.
Now that the collapse step goes through sidebarTrigger(page), this test no longer exercises the rail for collapsing — the rail only expands it. The title still promises "collapses and expands", so it now misdescribes what runs; rename it (e.g. "The sidebar rail expands the sidebar") or split the two paths to keep it honest.

Summary
Fixes the failing
e2e-testsrun onmaster(https://github.com/Paca-AI/paca/actions/runs/41019805882). The failures were specs that had fallen behind the Git connections redesign and the new sidebar resize handle. Only e2e specs and one feature file change; no app code.Changes
git-settings– No provider is installedgit-settings– reader needs write accessgit-automation(5 link-error tests)GIT_NO_IDENTITYnow expects "No connection is available for this platform"git-agent-tab– own identity can be removedgit-role-editor(+.feature)git-role-templates– Editor works end to endgit:write, so linking passes the permission gate and returns 503 (no provider plugin in the e2e stack), not 403sidebar-navigation(2 tests)Testing
Ran the six affected specs on chromium against the local e2e docker stack: all pass.
Not run: firefox, webkit and the mobile projects. Two failures in the original run were left alone:
git-permissions"git:read cannot link" was flaky (passed on retry), andusers-management"assigning roles without writing users" failed only on mobile-safari and was not investigated.