Fix help callout anchoring and Push remote setup
- Anchor startup help callouts inside the scrollable pane workspace so they scroll with the exercise and terminal content they point at. - Rebuild the Push level remote as a bare sibling repo with a temporary worktree for the remote-only commit, avoiding Android non-bare remote push failures. - Leave a visible local worktree edit in Push while enabling rebase autostash so status, diff, and pull --rebase all behave as expected. - Add native Push setup coverage for diverged status output, plain diff output, and clean pull --rebase behavior.
This commit is contained in:
@@ -175,6 +175,30 @@ class GitSandboxEngineTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun nativePushLevelHasDivergedStatusAndRebasesCleanly() {
|
||||
val git = File("/usr/bin/git")
|
||||
assumeTrue(git.exists() && git.canExecute())
|
||||
val root = Files.createTempDirectory("githug-push-level").toFile()
|
||||
try {
|
||||
val runtime = GitRepositoryRuntime(root, git)
|
||||
val level = pushLevel()
|
||||
val repo = runtime.prepareLevel(level)
|
||||
|
||||
val (_, statusOutput) = runtime.execute(level, repo, "git status")
|
||||
assertTrue(statusOutput.any { it.contains("diverged", ignoreCase = true) })
|
||||
|
||||
val (_, diffOutput) = runtime.execute(level, repo, "git diff")
|
||||
assertTrue(diffOutput.isNotEmpty())
|
||||
|
||||
val (rebasedRepo, pullOutput) = runtime.execute(level, repo, "git pull --rebase origin master")
|
||||
assertFalse(pullOutput.any { it.contains("fatal:", ignoreCase = true) || it.contains("error:", ignoreCase = true) })
|
||||
assertTrue(rebasedRepo.files.any { it.name == "file4" && it.tracked })
|
||||
} finally {
|
||||
root.deleteRecursively()
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun cdDotDotShortcutMovesToParentDirectory() {
|
||||
val repo = RepoState(initialized = true, currentDir = "src/main")
|
||||
|
||||
Reference in New Issue
Block a user