Skip to content

feat: update Git role editor and related tests to reflect changes in … - #668

Merged
pikann merged 2 commits into
masterfrom
feature/update-git-e2e-tests
Oct 30, 2026
Merged

pikann merged 2 commits into
masterfrom
feature/update-git-e2e-tests

Conversation

@pikann

@pikann pikann commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the failing e2e-tests run on master (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

Spec Cause Fix
git-settings – No provider is installed "No Git provider is installed" now renders in both the Connections and Repositories sections, so the locator hit two elements Scoped to the Repositories section
git-settings – reader needs write access Stub had no connection, so the page showed "add a connection first" instead of the write-access message Stub a connection
git-automation (5 link-error tests) The link form only shows when a connection exists; the stub returned none Stub a connection; GIT_NO_IDENTITY now expects "No connection is available for this platform"
git-agent-tab – own identity can be removed Confirm button is now "Remove connection" Updated label
git-role-editor (+ .feature) Workspace switch is now "Manage workspace Git connections" Updated label
git-role-templates – Editor works end to end Editor holds git:write, so linking passes the permission gate and returns 503 (no provider plugin in the e2e stack), not 403 Assert the status is not 403
sidebar-navigation (2 tests) The resize handle overlays the expanded sidebar's rail, so a pointer click never reaches it Dispatch the first click on the rail directly

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), and users-management "assigning roles without writing users" failed only on mobile-safari and was not investigated.

@pullfrog pullfrog Bot 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.

ℹ️ Minor suggestions only — the fixes are sound; two assertions could be tightened.

Reviewed changes

  • Role editor label — git-role-editor.feature and git-role-editor.spec.ts rename the workspace switch to "Manage workspace Git connections", matching the admin.json label; assertions untouched.
  • Editor link assertion — git-role-templates.spec.ts now expects the link POST to be not 403 instead of 403, reflecting that the Editor role passes the permission gate and the providerless e2e stack answers 503.
  • Agent tab confirm — git-agent-tab.spec.ts clicks "Remove connection" (the label DeleteGitIdentityDialog renders via admin.git.delete.confirm).
  • Automation stub — git-automation.spec.ts adds a CONNECTION stub plus a /git/connections route so the link form renders, and updates the GIT_NO_IDENTITY copy.
  • Settings scoping — git-settings.spec.ts scopes "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.ts dispatches the expanded-state rail/toggle click because the resize handle overlays the rail center.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot 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.

ℹ️ The two prior suggestions are addressed; one small naming nit inline.

Reviewed changes

  • Tightened the Editor link assertion — git-role-templates.spec.ts now asserts the link POST returns 503 and errorCode(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.ts drops the dispatchEvent("click") workaround for a real sidebarTrigger(page).click() in both the collapse/expand and rail suites, and normalizes one import's quotes. The main-scoped locator also sidesteps the ambiguous getByLabel("Toggle Sidebar") match.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using 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();

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.

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.

@pikann
pikann merged commit d2bb454 into master Oct 30, 2026
2 checks passed
@pikann
pikann deleted the feature/update-git-e2e-tests branch October 30, 2026 08:59
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.

1 participant