28 lines
517 B
Go
28 lines
517 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestFrontendHasRepositoryLinkButton(t *testing.T) {
|
|
source, err := os.ReadFile("frontend/src/App.tsx")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
app := string(source)
|
|
|
|
expectations := []string{
|
|
"BrowserOpenURL",
|
|
"Github",
|
|
"打开项目仓库",
|
|
"http://10.1.0.1:3000/sgg-sgg-tools/sgg-sgg-ai-skill-manage-windows",
|
|
}
|
|
for _, expected := range expectations {
|
|
if !strings.Contains(app, expected) {
|
|
t.Fatalf("App.tsx is missing %q", expected)
|
|
}
|
|
}
|
|
}
|