修复审核版本 revision 冲突
Project CI / Backend tests (pull_request) Failing after 33s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m57s
Project CI / Frontend tests (pull_request) Failing after 1m33s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 3m39s
Project CI / Repository checks (pull_request) Failing after 25s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 4m46s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m54s
Project CI / Native shell tests (pull_request) Successful in 6m1s

审核队列与版本快照使用所属游戏当前 publication_revision,避免新游戏审核通过时误携带 0。

详情审核动作使用最新详情 revision,并补充后台回归测试。
This commit is contained in:
2026-10-03 14:34:01 +08:00
parent 2eac0975df
commit 454ed320a5
4 changed files with 36 additions and 9 deletions
@@ -68,7 +68,7 @@ const detailResponse: AdminGameDistributionVersionDetailResponse = {
inputModes: ['keyboard'],
orientation: 'landscape',
status: 'unpublished',
publicationRevision: 4,
publicationRevision: 7,
playCount: 0,
createdAt: '2026-09-20T08:00:00Z',
},
@@ -293,4 +293,16 @@ test('详情展示发布者和冻结资料,并试玩当前待审版本', async
'http://127.0.0.1:8082/api/game-distribution/admin-previews/preview-1/',
);
expect(frame.getAttribute('sandbox')).toBe('allow-scripts');
fireEvent.click(screen.getByRole('button', { name: '通过' }));
await waitFor(() =>
expect(reviewAdminGameDistributionVersion).toHaveBeenCalledWith(
'admin-token',
'version-1',
expect.any(String),
expect.objectContaining({
decision: 'approve',
expectedPublicationRevision: 7,
}),
),
);
});
@@ -348,12 +348,24 @@ export function AdminGameDistributionReviewPage({
onBack={closeDetails}
onPreview={() => void startPreview()}
onReject={() => {
const expectedEntry = detail
? {
...selectedEntry,
publicationRevision: detail.game.publicationRevision,
}
: selectedEntry;
closeDetails();
openReasonPrompt(selectedEntry, 'reject');
openReasonPrompt(expectedEntry, 'reject');
}}
onApprove={() => {
const expectedEntry = detail
? {
...selectedEntry,
publicationRevision: detail.game.publicationRevision,
}
: selectedEntry;
closeDetails();
void submitReview(selectedEntry, 'approve');
void submitReview(expectedEntry, 'approve');
}}
/>
);