Single-branch mode E2E: Test upstream actions#14155
Open
estib-vega wants to merge 1 commit into
Open
Conversation
estib-vega
commented
Jun 10, 2026
Contributor
- Test divergence resolution
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Playwright E2E coverage for single-branch mode workflows around upstream sync/push and divergence/conflict handling, along with supporting test helpers and git-fixture scripts.
Changes:
- Adds single-branch upstream push/sync E2E tests and supporting setup helpers.
- Introduces shared upstream UI helpers (
fetchRemoteChanges,integrateUpstreamChanges,pushFirstStack) and new git-ref assertion helpers for E2E. - Adds new Playwright fixture scripts for seeding/updating a remote branch and creating an “empty” single-branch project.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| e2e/playwright/tests/singleBranch/upstreamIntegration.spec.ts | Adds single-branch upstream integration/conflict scenarios (currently declared as skipped tests). |
| e2e/playwright/tests/singleBranch/upstream.spec.ts | Adds single-branch upstream push/sync scenarios validating ahead/behind/divergence states. |
| e2e/playwright/tests/singleBranch/helpers.ts | Extends single-branch test helpers for remote-branch seeding, empty-branch setup, and push helper. |
| e2e/playwright/src/upstream.ts | Adds reusable upstream UI interaction helpers (sync, integrate, push). |
| e2e/playwright/src/branch.ts | Adds E2E git assertions for ref equality/existence and status text checks. |
| e2e/playwright/scripts/single-branch__seed-remote-branch.sh | Seeds a remote single-branch-fixture branch for upstream-related single-branch tests. |
| e2e/playwright/scripts/single-branch__add-remote-commit.sh | Creates a non-conflicting remote advancement on the single-branch fixture branch. |
| e2e/playwright/scripts/single-branch__add-conflicting-remote-commit.sh | Creates a conflicting remote advancement on the single-branch fixture branch. |
| e2e/playwright/scripts/single-branch__add-conflicting-base-commit.sh | Advances target (master) with a conflicting commit for integration tests. |
| e2e/playwright/scripts/project-in-empty-single-branch-mode.sh | Creates a project state where an empty checked-out branch exists in single-branch mode. |
| }, | ||
| }); | ||
|
|
||
| test.skip("shows target conflicts with dirty worktree changes", async ({ page, gitbutler }) => { |
| await assertDirtyWorktree(localClone); | ||
| }); | ||
|
|
||
| test.skip("keeps single-branch mode when target advancement conflicts with a local commit", async ({ |
| await expect(getByTestId(page, "workspace-view")).toBeVisible(); | ||
| }); | ||
|
|
||
| test.skip("keeps an empty checked-out branch when the target advances", async ({ |
Comment on lines
+5
to
+7
| pushd local-clone | ||
| git push -u origin HEAD~2:refs/heads/single-branch-fixture | ||
| git branch --set-upstream-to=origin/single-branch-fixture single-branch-fixture |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.