收口分类筛选与扫码弹窗壳层
RpgEntryHomeView 的分类筛选弹窗和扫码面板改用 UnifiedModal 补充扫码关闭清理与分类筛选关闭路径测试 更新 PlatformUiKit 收口计划与 .hermes 决策记录
This commit is contained in:
@@ -3086,7 +3086,12 @@ test('profile scan action opens camera scanner instead of recharge panel', async
|
||||
within(topbar as HTMLElement).getByRole('button', { name: '扫码' }),
|
||||
);
|
||||
|
||||
expect(await screen.findByRole('dialog', { name: '扫码' })).toBeTruthy();
|
||||
const qrScannerDialog = await screen.findByRole('dialog', { name: '扫码' });
|
||||
|
||||
expect(qrScannerDialog).toBeTruthy();
|
||||
expect(
|
||||
within(qrScannerDialog).getByRole('button', { name: '关闭扫码' }),
|
||||
).toBeTruthy();
|
||||
await waitFor(() => {
|
||||
expect(getUserMedia).toHaveBeenCalledWith({
|
||||
audio: false,
|
||||
@@ -3094,6 +3099,14 @@ test('profile scan action opens camera scanner instead of recharge panel', async
|
||||
});
|
||||
});
|
||||
expect(mockGetRpgProfileRechargeCenter).not.toHaveBeenCalled();
|
||||
expect(screen.queryByText('账户充值')).toBeNull();
|
||||
|
||||
await user.click(within(qrScannerDialog).getByRole('button', { name: '关闭扫码' }));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.queryByRole('dialog', { name: '扫码' })).toBeNull();
|
||||
});
|
||||
expect(stopTrack).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
test('desktop account entry uses saved avatar image when available', async () => {
|
||||
@@ -5294,11 +5307,21 @@ test('mobile game category filter dialog filters by play type', async () => {
|
||||
const filterDialog = await screen.findByRole('dialog', {
|
||||
name: '分类筛选',
|
||||
});
|
||||
const closeButton = within(filterDialog).getByRole('button', {
|
||||
name: '关闭分类筛选',
|
||||
});
|
||||
|
||||
expect(closeButton.className).toContain('platform-icon-button');
|
||||
|
||||
await user.click(within(filterDialog).getByRole('button', { name: '抓鹅' }));
|
||||
|
||||
expect(screen.queryByRole('button', { name: /奇幻拼图,试玩/u })).toBeNull();
|
||||
expect(screen.getByRole('button', { name: /奇幻抓鹅,进入/u })).toBeTruthy();
|
||||
|
||||
await user.click(closeButton);
|
||||
await waitFor(() => {
|
||||
expect(screen.queryByRole('dialog', { name: '分类筛选' })).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
test('bottom category tab becomes ranking and switches ranking metrics', async () => {
|
||||
|
||||
Reference in New Issue
Block a user