R-498: the app page's first steps name the household's address, not wiki.DOMAIN
AppInfo.WithAddress fills the catalog placeholder (<label>.DOMAIN -> the effective subdomain + customer domain, bare DOMAIN -> the domain) on a copy; appDetailHandler applies it. Pinned per catalog template (both languages) and on the rendered page. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -91,3 +91,24 @@ func TestAutoUpdateLine_PageSaysItOnce(t *testing.T) {
|
||||
t.Error("the line must go once the app no longer runs what the automatic step installed")
|
||||
}
|
||||
}
|
||||
|
||||
// R-498: the app page's „Első lépések" shows the household's address, never the catalog's wiki.DOMAIN.
|
||||
func TestR498_AppPageFirstStepsShowTheRealAddress(t *testing.T) {
|
||||
s, _ := credsHarness(t)
|
||||
sd := filepath.Join(s.cfg.Paths.StacksDir, "crafty")
|
||||
meta := "display_name: Crafty\nslug: crafty\nsubdomain: wiki\napp_info:\n first_steps:\n - 'Nyisd meg a wiki.DOMAIN címet a böngészőben'\n"
|
||||
if err := os.WriteFile(filepath.Join(sd, ".felhom.yml"), []byte(meta), 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
_ = s.stackMgr.ScanStacks()
|
||||
s.loadTemplates()
|
||||
rr := httptest.NewRecorder()
|
||||
s.appDetailHandler(rr, httptest.NewRequest("GET", "/apps/crafty", nil), "crafty")
|
||||
page := html.UnescapeString(rr.Body.String())
|
||||
if !strings.Contains(page, "Nyisd meg a wiki.example.hu c") {
|
||||
t.Fatalf("the first step must name the real address wiki.example.hu (status %d)", rr.Code)
|
||||
}
|
||||
if strings.Contains(page, "wiki.DOMAIN") {
|
||||
t.Error("the literal wiki.DOMAIN reached the page")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user