Files
skillshare/tests/integration/ui_test.go
T
Willie 092fb14f8a feat: add web dashboard with embedded React SPA (skillshare ui)
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.
2026-02-08 05:08:30 +08:00

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")
}