test: restore production release gate
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useGSAP } from "@gsap/react";
|
||||
import gsap from "gsap";
|
||||
import { gsap } from "gsap";
|
||||
import { useRef } from "react";
|
||||
|
||||
import { AgentActivityStatus } from "@/components/agent-activity-status";
|
||||
|
||||
@@ -239,7 +239,7 @@ test("homepage and profile result copy use the source-aware consultation options
|
||||
const intake = readFileSync(new URL("../src/components/birth-time-intake.tsx", import.meta.url), "utf8");
|
||||
|
||||
assert.match(page, /birthTimeConsultationOptionsCopy\(profileDraft\)/);
|
||||
assert.match(page, /birthTimeConsultationOptionsCopy\(profile\)/);
|
||||
assert.doesNotMatch(page, /birthTimeConsultationOptionsCopy\(profile\)/);
|
||||
assert.match(intake, /birthTimeConsultationOptionsCopy\(value\)/);
|
||||
});
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ test("terminal CJK copy stays intact while homepage candidates remain unconfirme
|
||||
const pageSource = readFileSync(new URL("../src/app/page.tsx", import.meta.url), "utf8");
|
||||
|
||||
assert.match(candidateResultSource, /候选范围已保留,但当前证据不足以将具体分钟写入当前排盘时间。补充经历后可重新评估。/);
|
||||
assert.match(pageSource, /未确认;\$\{birthTimeConsultationOptionsCopy\(profile\)\}/);
|
||||
assert.match(pageSource, /`出生资料已保存。\$\{birthTimeConsultationOptionsCopy\(profileDraft\)\}`/);
|
||||
assert.match(pageSource, /<ConversationalBirthTimeRectification/);
|
||||
assert.doesNotMatch(pageSource, /当前使用候选时间排盘/);
|
||||
});
|
||||
|
||||
@@ -65,7 +65,7 @@ test("keeps the suggestion row height stable while an answer streams", () => {
|
||||
});
|
||||
|
||||
test("docks the composer inside the chat panel instead of floating over content", () => {
|
||||
assert.match(pageSource, /<div className="composer-wrap">/);
|
||||
assert.match(pageSource, /<div className=\{`composer-wrap \$\{starterHomeVisible \? "composer-wrap-starter" : ""\}`\}>/);
|
||||
assert.match(globalStyles, /\.chat-panel[^}]*grid-template-rows:\s*68px minmax\(0,\s*1fr\) auto/);
|
||||
assert.match(globalStyles, /\.conversation[^}]*padding-bottom:\s*var\(--composer-reserve\)/);
|
||||
assert.match(globalStyles, /\.composer-wrap[^}]*position:\s*sticky/);
|
||||
|
||||
@@ -70,7 +70,7 @@ function controllerFor(turn: ConversationalRectificationTurn): ConversationalRec
|
||||
};
|
||||
}
|
||||
|
||||
test("confirmed surface requires an explicit click before continuing the original question", () => {
|
||||
test("confirmed surface requires an explicit click before returning to the original question", () => {
|
||||
let continuationCalls = 0;
|
||||
const markup = renderToStaticMarkup(React.createElement(
|
||||
ConversationalRectificationSurface,
|
||||
@@ -80,8 +80,8 @@ test("confirmed surface requires an explicit click before continuing the origina
|
||||
},
|
||||
));
|
||||
|
||||
assert.match(markup, /原问题:未来半年是否适合换工作?/);
|
||||
assert.match(markup, />使用新确认时间继续回答原问题</);
|
||||
assert.doesNotMatch(markup, /原问题:未来半年是否适合换工作?/);
|
||||
assert.match(markup, />返回原问题</);
|
||||
assert.equal(continuationCalls, 0);
|
||||
});
|
||||
|
||||
@@ -95,7 +95,7 @@ test("continuation action is visibly locked while ordinary consultation is pendi
|
||||
},
|
||||
));
|
||||
|
||||
assert.match(markup, /<button[^>]+disabled=""[^>]*>正在继续回答原问题…<\/button>/);
|
||||
assert.match(markup, /<button[^>]+disabled=""[^>]*>正在继续回答…<\/button>/);
|
||||
});
|
||||
|
||||
test("choosing rectify-first captures the visible question and passes it only to v3 start", async () => {
|
||||
|
||||
@@ -36,8 +36,9 @@ test("completed account initialization switches directly to the home cards", ()
|
||||
|
||||
test("default starter questions are guided Jyotish topics with evidence and claim boundaries", () => {
|
||||
assert.match(pageSource, /defaultGuidedJyotishTopics/);
|
||||
assert.match(pageSource, /theme\.evidencePreview\.join/);
|
||||
assert.match(pageSource, /theme\.claimBoundary/);
|
||||
assert.match(pageSource, /starterSuggestions\.map/);
|
||||
assert.match(pageSource, /themes\.find\(\(candidate\) => candidate\.id === item\.theme\)/);
|
||||
assert.match(pageSource, /chooseSuggestedQuestion\(item\.text, item\.theme\)/);
|
||||
assert.match(guidedTopicsSource, /strictWorkflowRoute/);
|
||||
assert.match(guidedTopicsSource, /evidencePreview/);
|
||||
assert.match(guidedTopicsSource, /confidenceCap/);
|
||||
@@ -73,13 +74,15 @@ test("keeps session history clickable while another session is answering", () =>
|
||||
assert.doesNotMatch(appSidebarSource, /pendingSession|isLoading|cancellationPending|requestPending/);
|
||||
});
|
||||
|
||||
test("uses the compact model popup width", () => {
|
||||
test("sizes the model popup to its content with responsive bounds", () => {
|
||||
// Given: the model selector popup styles.
|
||||
const popupStyles = sourceBetween(globalStyles, ".model-selector-popup {", "}\n.model-selector-popup[data-starting-style]");
|
||||
|
||||
// When: its responsive width is inspected.
|
||||
// Then: the desktop cap is half of the former 360px width.
|
||||
assert.match(popupStyles, /width:\s*min\(180px,/);
|
||||
// Then: short labels stay compact while long content remains viewport-safe.
|
||||
assert.match(popupStyles, /width:\s*max-content/);
|
||||
assert.match(popupStyles, /min-width:\s*180px/);
|
||||
assert.match(popupStyles, /max-width:\s*min\(420px,/);
|
||||
});
|
||||
|
||||
test("centers the credit value with its icon", () => {
|
||||
|
||||
Reference in New Issue
Block a user