Files
Githug-Android/app/src/main/java/solutions/tretter/githugandroid/levels/RemoteAddLevel.kt
Joe Tretter 781b5090f7 Fix Git editor reword workflow and UI coverage
- show Git editor file paths instead of the submitted git command
- surface follow-up commit message editors during interactive rebase reword
- add rename-commit UI tests for editor and amend-message solution paths
- add broader embedded level solution scenarios for alternate Git workflows
2026-06-26 11:23:16 -05:00

23 lines
1.1 KiB
Kotlin

package solutions.tretter.githugandroid
/**
* Port of the upstream ruby-githug `remote_add` level.
*
* Setup documents the repository shape the learner explores. Evaluation is kept
* state-based whenever the exercise changes repository objects; answer-only
* levels intentionally validate the answer entered at the prompt.
*/
internal fun remoteAddLevel(): Level = level(
id = "remote_add",
title = "Remote Add",
description = "Add a remote repository called `origin` with the url https://github.com/githug/githug",
hints = listOf("You can run `git remote --help` for the man pages."),
commandSuggestions = listOf("git remote add origin https://github.com/githug/githug"),
setup = { RepoState(initialized = true, branches = mapOf("master" to 0)) },
validator = repoPredicate { repo -> repo.remotes["origin"] == "https://github.com/githug/githug" },
testCases = listOf(
levelTestCase("add origin remote", "git remote add origin https://github.com/githug/githug"),
levelTestCase("add origin remote with tracked branch option", "git remote add -t master origin https://github.com/githug/githug"),
),
)