fixes
This commit is contained in:
1 parent
3b0d692839
commit
8b540d22bc
14 files changed
+526
-82
No files matched your search
@@ -150,3 +150,19 @@ func TestRunSteps_defaultFormulaDrivesGeneration(t *testing.T) {
|
||||
}
|
||||
_ = company.DefaultLanguage
|
||||
}
|
||||
|
||||
// Without a stored category prompt, fallback content must still use the target
|
||||
// product's language, not default to old English HTML instructions.
|
||||
func TestWithDefaultCategoryFormula_localizedFallback(t *testing.T) {
|
||||
for _, lang := range []string{"en", "hr", "sl", "de", "ja"} {
|
||||
input := ProductInput{CategoryUniqueID: "grohe", CategoryDisplayName: "Bathroom faucets", Language: lang}
|
||||
got := withDefaultCategoryFormula(input)
|
||||
expected, err := aiprompts.OfflineDefaultPrompt(lang)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got.CategoryEnhancePrompt != expected {
|
||||
t.Fatalf("%s fallback uses wrong language", lang)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user