Skip to content

Single-branch mode E2E: Test upstream actions#14155

Open
estib-vega wants to merge 1 commit into
masterfrom
sbm-e2e-tests-3
Open

Single-branch mode E2E: Test upstream actions#14155
estib-vega wants to merge 1 commit into
masterfrom
sbm-e2e-tests-3

Conversation

@estib-vega

Copy link
Copy Markdown
Contributor
  • Test divergence resolution

Copilot AI review requested due to automatic review settings June 10, 2026 08:28

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.

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
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