fix: reconcile architecture adjustment merge

This commit is contained in:
2026-06-07 00:57:23 +08:00
parent ce930ee5c3
commit 48ef19d518
20 changed files with 431 additions and 33 deletions

View File

@@ -358,6 +358,7 @@ const {
}));
vi.mock('../../services/apiClient', () => ({
BACKGROUND_AUTH_REQUEST_OPTIONS: {},
refreshStoredAccessToken: mockRefreshStoredAccessToken,
}));
@@ -2670,7 +2671,7 @@ test('profile total play time card always uses hours', async () => {
});
const playTimeCard = screen.getByRole('button', {
name: //u,
name: //u,
});
expect(within(playTimeCard).getByText('1.5小时')).toBeTruthy();
@@ -2684,11 +2685,11 @@ test('profile played works card shows count unit', async () => {
});
const playedCard = screen.getByRole('button', {
name: /\s*1/u,
name: /\s*1/u,
});
expect(within(playedCard).getByText('1个')).toBeTruthy();
expect(within(playedCard).queryByText('已玩游戏数量')).toBeNull();
expect(within(playedCard).getByText('已玩游戏数量')).toBeTruthy();
await screen.findByText('1 / 1');
});
@@ -2700,8 +2701,12 @@ test('profile stats cards are centered without update timestamp', async () => {
const walletCard = screen.getByRole('button', {
name: /\s*0/u,
});
const playTimeCard = screen.getByRole('button', { name: /\s*0/u });
const playedCard = screen.getByRole('button', { name: /\s*0/u });
const playTimeCard = screen.getByRole('button', {
name: /\s*0/u,
});
const playedCard = screen.getByRole('button', {
name: /\s*0/u,
});
for (const card of [walletCard, playTimeCard, playedCard]) {
expect(card.className).toContain('platform-profile-stat-card');
@@ -2753,8 +2758,8 @@ test('mobile profile page matches the reference layout sections', async () => {
expect(statPanel.className).toContain('platform-profile-stats-panel');
expect(statPanel.querySelector('.platform-profile-stats-grid')).toBeTruthy();
expect(within(statPanel).getByRole('button', { name: /\s*70/u })).toBeTruthy();
expect(within(statPanel).getByRole('button', { name: /\s*0/u })).toBeTruthy();
expect(within(statPanel).getByRole('button', { name: /\s*0/u })).toBeTruthy();
expect(within(statPanel).getByRole('button', { name: /\s*0/u })).toBeTruthy();
expect(within(statPanel).getByRole('button', { name: /\s*0/u })).toBeTruthy();
expect(
within(statPanel).getByRole('button', { name: /\s*70/u }).className,
).toContain('platform-profile-stat-card');