apple listing: asking for the version that is in review says it is locked (it said "already exists; a new version needs a higher number"); play images: a listing language missing from languages[] is skipped with the fix instead of stopping the run (play listing pushes its text). Both found by the live dry-run sweep; tests

This commit is contained in:
CRTkafa 2026-10-14 08:43:59 +08:00
parent 9d6f741092
commit b29f1c407c
4 changed files with 28 additions and 1 deletions

View file

@ -30,6 +30,11 @@ describe('version decision', () => {
expect(planVersion([v('v-0', '1.0.0', 'READY_FOR_DISTRIBUTION')], '1.1.0', attrs)).toMatchObject({ action: 'create', first: false });
expect(planVersion([v('v-0', '1.0.0', 'READY_FOR_DISTRIBUTION')], '1.0.0', attrs).reason).toContain('already exists (READY_FOR_DISTRIBUTION)');
expect(planVersion([v('v-0', '1.2.0', 'READY_FOR_DISTRIBUTION')], '1.1.0', attrs).reason).toContain('not higher than 1.2.0');
// the version asked for is the one in review (live sweep: apple listing --version 1.0.0 on an app in review said
// "already exists; a new version needs a higher number"): say it is locked, not to make another one
const inReview = planVersion([v('v-0', '1.0.0', 'WAITING_FOR_REVIEW')], '1.0.0', attrs);
expect(inReview).toMatchObject({ action: 'refuse', reason: expect.stringContaining('version 1.0.0 is WAITING_FOR_REVIEW: App Store Connect locks its texts and build') });
expect(String(inReview.reason)).not.toContain('higher number');
expect(planVersion([v('v-0', '1.0.0', 'READY_FOR_DISTRIBUTION'), v('v-1', '1.1.0', 'WAITING_FOR_REVIEW')], '1.2.0', attrs).reason).toContain('1.1.0 is WAITING_FOR_REVIEW');
expect(planVersion([v('v-0', '1.0.0', 'READY_FOR_DISTRIBUTION'), v('v-1', '1.1', 'REJECTED')], '1.1.0', attrs)).toMatchObject({ action: 'refuse', reason: expect.stringContaining('only while PREPARE_FOR_SUBMISSION') });
expect(planVersion([], '1.0.0', attrs)).toMatchObject({ action: 'create', first: true });