Replace niche templates with simple starters and direct template submission
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func TestShowcaseDefinitions(t *testing.T) {
|
||||
for _, name := range []string{"bug-fix", "new-feature", "dashboard-screenshots", "dependency-upgrade", "incident-diagnosis", "scheduled-summary", "scheduled-web-research", "anime-digest", "notification-test", "anime-today"} {
|
||||
for _, name := range []string{"task", "summary", "review", "research", "three-stage"} {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
source, err := os.ReadFile(filepath.Join("..", "..", "examples", name+".md"))
|
||||
if err != nil {
|
||||
@@ -19,12 +19,11 @@ func TestShowcaseDefinitions(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
success, failure, fork := false, false, false
|
||||
success, failure := false, false
|
||||
for _, stage := range graph.Stages {
|
||||
if stage.FallbackError {
|
||||
t.Fatalf("%s should declare its error route explicitly", stage.Key)
|
||||
}
|
||||
targets := map[string]bool{}
|
||||
for _, target := range stage.Edges {
|
||||
if target == protocol.SuccessEnd {
|
||||
success = true
|
||||
@@ -32,20 +31,11 @@ func TestShowcaseDefinitions(t *testing.T) {
|
||||
if target == protocol.FailureEnd {
|
||||
failure = true
|
||||
}
|
||||
if !protocol.IsTerminal(target) {
|
||||
targets[target] = true
|
||||
}
|
||||
}
|
||||
if len(targets) > 1 {
|
||||
fork = true
|
||||
}
|
||||
}
|
||||
if !success || !failure {
|
||||
t.Fatal("showcase must have both terminal outcomes")
|
||||
}
|
||||
if name == "new-feature" && !fork {
|
||||
t.Fatal("feature showcase must contain an exclusive route fork")
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user