feat(billing): ?plan= 深链用一句文案指向目标卡,而不是第三层描边
D13 把 URL 高亮改成纯滚动定位后留下一个空档:桌面上三张套餐卡本来就都在 视口内,滚动等于什么都没指。付费转化路径上,用户从「开通年度会员」的链接 进来,看不到任何东西指向那张卡。 产品在「加一行文案 / 维持现状 / 把描边加回来」里选了第一个。 用卡片自己的套餐名,不用序数——手机端 [data-plan-alias="monthly"] 带 order:-1,序数会指错。新增断言锁住这两点(必须有 note、不得出现序数写法)。 测试 3354 不变,fail 仍 31 且与基线逐条一致;/ 仍 Static; 干净构建 CSS gzip 39,724→39,733。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0193vBv6w5MV2cifdTUu9H5P
This commit is contained in:
co-authored by
Claude Opus 5
parent
5edc519db9
commit
c3bcddb652
@@ -216,6 +216,13 @@ test("plan param forces the membership segment and highlights the matching card"
|
||||
assert.match(panelSource, /ref=\{highlighted \? highlightedCardRef : undefined\}/);
|
||||
assert.match(panelSource, /aria-current=\{highlighted \? "true" : undefined\}/);
|
||||
assert.match(panelSource, /highlightedCardRef/);
|
||||
// 滚动定位本身在桌面上指不到任何东西——三张卡本来就都在视口里。所以深链必须
|
||||
// 另有一句文字说明它指向哪张卡,且必须用卡片自己的名字而不是序数:手机端
|
||||
// `[data-plan-alias="monthly"]` 带 order:-1,序数会指错。
|
||||
assert.match(panelSource, /const highlightedName = highlightedPlan/);
|
||||
assert.match(panelSource, /plans\.find\(\(product\) => planAlias\(product\) === highlightedPlan\)\?\.name/);
|
||||
assert.match(panelSource, /className="membership-plan-note"/);
|
||||
assert.doesNotMatch(panelSource, /第 \{[\s\S]{0,120}\} 张/);
|
||||
assert.match(hookSource, /scrollIntoView\(\{ behavior: "smooth", block: "center" \}\)/);
|
||||
assert.match(hookSource, /card\.focus\(\{ preventScroll: true \}\)/);
|
||||
assert.match(hookSource, /initialTab: input\.highlightedPlan \? "membership" : input\.initialTab/);
|
||||
|
||||
Reference in New Issue
Block a user