fix(qa): 第五轮系统性质量保障缺陷修复 + 单元/集成测试
安全/鉴权:登出清服务端 httpOnly 令牌、登录 IP 限流前置 bcrypt、停用账号 令牌在 6 个内联 role handler 失效、admin/items 存在性 oracle 认证前置、 同意偏好 sanitize fail-closed、api-crypto 按 HTTP 方法判体。 CMS:workflow 状态更新+审计收进交互式 $transaction(失败即回滚)、编辑器 richtext 走 textarea 防换行损毁、array/object 子字段按作用域读写防污染、 about/contact/erp-upgrade 补 ISR revalidate 与路由映射。 UI/a11y:AnimatedCounter 入视口前显起点、CLS 累计上报、MetricCard 动画入 effect 并卸载取消 rAF、后台状态四态映射/搜索防抖+序号守卫/媒体单 input/ 吞错改横幅/表单 label-aria 关联。 新增对应判别性单测与 pagination/rate-limit/client-ip/sanitize/validate-content-data 等模块及 tests-integration 真库集成层。
This commit is contained in:
1 parent
040951c0a3
commit
a366bd1400
224 files changed
+8938
-5579
No files matched your search
@@ -92,8 +92,12 @@ describe('DESIGN_SYSTEM', () => {
|
||||
expect(DESIGN_SYSTEM.effects.scroll.fadeInUp.initial).toEqual({ opacity: 0, y: 24 });
|
||||
expect(DESIGN_SYSTEM.effects.scroll.fadeInUp.animate).toEqual({ opacity: 1, y: 0 });
|
||||
expect(DESIGN_SYSTEM.effects.scroll.fadeInUp.viewport).toEqual({ once: true, margin: '-80px' });
|
||||
expect(DESIGN_SYSTEM.effects.scroll.fadeInUp.transition.duration).toBe(0.6);
|
||||
expect(DESIGN_SYSTEM.effects.scroll.staggerChildren.delay).toBe(0.08);
|
||||
// CONTEXT.md「动效设计四原则」:入场 180–280ms(--transition-fast … --transition-normal),
|
||||
// 子元素 stagger 30–60ms。断言区间而非具体值,令牌漂移时才会红。
|
||||
expect(DESIGN_SYSTEM.effects.scroll.fadeInUp.transition.duration).toBeGreaterThanOrEqual(0.18);
|
||||
expect(DESIGN_SYSTEM.effects.scroll.fadeInUp.transition.duration).toBeLessThanOrEqual(0.28);
|
||||
expect(DESIGN_SYSTEM.effects.scroll.staggerChildren.delay).toBeGreaterThanOrEqual(0.03);
|
||||
expect(DESIGN_SYSTEM.effects.scroll.staggerChildren.delay).toBeLessThanOrEqual(0.06);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -135,7 +139,9 @@ describe('DESIGN_SYSTEM', () => {
|
||||
expect(DESIGN_SYSTEM.components.badge).toBeDefined();
|
||||
expect(DESIGN_SYSTEM.components.badge.base).toContain('rounded-full');
|
||||
expect(DESIGN_SYSTEM.components.badge.variants).toBeDefined();
|
||||
expect(DESIGN_SYSTEM.components.badge.variants.primary).toContain('var(--color-brand)');
|
||||
// 双通道(DESIGN.md:154):底色仍走 --color-brand-bg,文字走翻转的 --color-brand-ink。
|
||||
expect(DESIGN_SYSTEM.components.badge.variants.primary).toContain('bg-[var(--color-brand-bg)]');
|
||||
expect(DESIGN_SYSTEM.components.badge.variants.primary).toContain('text-brand-ink');
|
||||
expect(DESIGN_SYSTEM.components.badge.variants.secondary).toContain('var(--color-text-secondary)');
|
||||
expect(DESIGN_SYSTEM.components.badge.variants.success).toContain('text-green-700');
|
||||
expect(DESIGN_SYSTEM.components.badge.variants.warning).toContain('text-yellow-700');
|
||||
@@ -145,7 +151,7 @@ describe('DESIGN_SYSTEM', () => {
|
||||
expect(DESIGN_SYSTEM.components.button).toBeDefined();
|
||||
expect(DESIGN_SYSTEM.components.button.primary).toContain('bg-[var(--color-brand)]');
|
||||
expect(DESIGN_SYSTEM.components.button.secondary).toContain('border-[var(--color-border-primary)]');
|
||||
expect(DESIGN_SYSTEM.components.button.ghost).toContain('text-[var(--color-brand)]');
|
||||
expect(DESIGN_SYSTEM.components.button.ghost).toContain('text-brand-ink');
|
||||
});
|
||||
|
||||
it('has metric component styles', () => {
|
||||
|
||||
Reference in new issue
Block a user