feat(web): 立项向导确认步/故事结构分段控件/书名必填提示 + 作品卡键盘焦点可见 + 作品库分段切换
This commit is contained in:
@@ -5,11 +5,22 @@ import {
|
||||
canSubmit,
|
||||
clampStep,
|
||||
emptyWizardForm,
|
||||
STEP_TITLES,
|
||||
toCreateRequest,
|
||||
WIZARD_STEPS,
|
||||
type WizardForm,
|
||||
} from "./wizard";
|
||||
|
||||
describe("wizard step metadata", () => {
|
||||
it("provides one title per step", () => {
|
||||
expect(STEP_TITLES).toHaveLength(WIZARD_STEPS);
|
||||
});
|
||||
|
||||
it("ends on a confirmation step rather than an empty world step", () => {
|
||||
expect(STEP_TITLES[WIZARD_STEPS - 1]).toBe("确认与提交");
|
||||
});
|
||||
});
|
||||
|
||||
describe("wizard step gating", () => {
|
||||
it("blocks advancing past step 1 without a title", () => {
|
||||
expect(canAdvance(1, emptyWizardForm)).toBe(false);
|
||||
|
||||
Reference in New Issue
Block a user