feat(ECR-012–016): 合规、题库、时辰刷新、头像、MBTI OEJTS 与埋点

落地输入合规、探索题库、报告日/时辰刷新、账号头像、OEJTS 量表,并补齐 H5 埋点与 Admin 漏斗;同步 ESS 工件、切至自建 Git、清理 GitHub Actions。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-13 01:27:58 +08:00
co-authored by Cursor
parent 13860bf1ef
commit 89756f65b4
227 changed files with 7405 additions and 1407 deletions
+28 -1
View File
@@ -1,6 +1,9 @@
package scale
import "testing"
import (
"strconv"
"testing"
)
func TestScoreMajority_communication(t *testing.T) {
key, label := ScoreMajority(map[string]string{
@@ -20,6 +23,30 @@ func TestScoreMajority_emotion(t *testing.T) {
}
}
func TestScoreJungian_ENFP(t *testing.T) {
// 8 Qs per dim: EI low→E, SN high→N, TF low→F, JP high→P
meta := map[string]JungianQuestionMeta{}
answers := map[string]string{}
add := func(dim string, ids []string, vals []int) {
for i, id := range ids {
meta[id] = JungianQuestionMeta{Dimension: dim}
answers[id] = strconv.Itoa(vals[i])
}
}
add("EI", []string{"e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8"}, []int{1, 1, 2, 1, 2, 1, 1, 2}) // sum 11 → E
add("SN", []string{"s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8"}, []int{5, 5, 4, 5, 4, 5, 5, 4}) // sum 37 → N
add("TF", []string{"t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8"}, []int{1, 2, 1, 2, 1, 1, 2, 1}) // sum 11 → F
add("JP", []string{"j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8"}, []int{5, 4, 5, 5, 4, 5, 5, 4}) // sum 37 → P
code, _, pct := ScoreJungian(answers, meta, 8)
if code != "ENFP" {
t.Fatalf("code=%s want ENFP", code)
}
r := BuildJungianResult(code, pct)
if r["type_code"] != "ENFP" {
t.Fatalf("type_code=%v", r["type_code"])
}
}
func TestScoreMajority_empty(t *testing.T) {
_, label := ScoreMajority(nil, CommunicationLabels(), "平衡探索型")
if label != "平衡探索型" {