mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 20:34:19 +00:00
Single-binary web UI for visual skill management — React 19 + Vite frontend embedded via go:embed, Go net/http REST API backend (30+ endpoints). Includes dashboard, skills browser, targets, sync, collect, search, install, config editor, backup/restore, and git sync pages. Also adds Bitbucket/GitLab URL parsing for install, git operations library, skill version checking, CI frontend build steps, Docker sandbox support, and website docs for the ui command.
34 lines
700 B
Go
34 lines
700 B
Go
package integration
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"skillshare/internal/testutil"
|
|
)
|
|
|
|
func TestUI_NoConfig_ReturnsInitError(t *testing.T) {
|
|
sb := testutil.NewSandbox(t)
|
|
defer sb.Cleanup()
|
|
|
|
result := sb.RunCLI("ui", "--no-open")
|
|
|
|
result.AssertFailure(t)
|
|
result.AssertAnyOutputContains(t, "run 'skillshare init' first")
|
|
}
|
|
|
|
func TestUI_SourceMissing_ReturnsInitError(t *testing.T) {
|
|
sb := testutil.NewSandbox(t)
|
|
defer sb.Cleanup()
|
|
|
|
missingSource := filepath.Join(sb.Root, "missing-source")
|
|
sb.WriteConfig(`source: ` + missingSource + `
|
|
targets: {}
|
|
`)
|
|
|
|
result := sb.RunCLI("ui", "--no-open")
|
|
|
|
result.AssertFailure(t)
|
|
result.AssertAnyOutputContains(t, "run 'skillshare init' first")
|
|
}
|