继续收口暗色弹窗底部动作区

新增 PlatformDarkModalFooter 统一 dark modal footer 的布局壳
接入 NPC 弹窗、选择定制弹窗、任务更新弹层与物品详情 footer
补充组件级与弹窗集成测试并更新收口计划和共享决策记录
This commit is contained in:
2026-06-11 03:03:51 +08:00
parent ae1a15cee0
commit 54ff839b0b
10 changed files with 196 additions and 12 deletions

View File

@@ -276,6 +276,9 @@ test('NPC 弹窗标准 dark footer CTA 复用 PlatformActionButton', async () =>
const { unmount } = render(
<NpcModals gameState={createEmptyGameState()} npcUi={createEmptyNpcUi()} />,
);
const tradeFooter = screen.getByTestId('npc-trade-footer');
const giftFooter = screen.getByTestId('npc-gift-footer');
const recruitFooter = screen.getByTestId('npc-recruit-footer');
const cancelButtons = screen.getAllByRole('button', { name: '取消' });
const tradeConfirmButton = screen.getByRole('button', { name: '确认购买' });
@@ -291,6 +294,12 @@ test('NPC 弹窗标准 dark footer CTA 复用 PlatformActionButton', async () =>
].filter((button): button is HTMLElement => Boolean(button));
expect(footerButtons).toHaveLength(6);
expect(tradeFooter.className).toContain('platform-dark-modal-footer');
expect(tradeFooter.className).toContain('border-t');
expect(giftFooter.className).toContain('platform-dark-modal-footer');
expect(giftFooter.className).toContain('pb-5');
expect(recruitFooter.className).toContain('platform-dark-modal-footer');
expect(recruitFooter.className).toContain('pb-5');
footerButtons.forEach((button) => {
expect(button.className).toContain('platform-action-button--editor-dark');