play: old testing builds below production listed with their replace command (status, validate); 'Not live yet' instead of 'In review'; commit redone without changesNotSentForReview on the auto-send 400; pitfalls #129

This commit is contained in:
CRTkafa 2026-11-08 02:18:24 +07:00
parent 83d351cf42
commit 9c001d1ca9
13 changed files with 130 additions and 15 deletions

View file

@ -7,7 +7,7 @@ import { trainsOf } from '../cli/release';
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { clearPlayPublicCache, pageVersion, pageVersionInfo, playPublicPage } from '../cli/lib/play-public';
import { appleReleases, playReleaseLabel, playReleases, releaseTrains, sameVersion, versionKey } from '../cli/lib/portfolio';
import { appleReleases, PLAY_NOT_LIVE, playReleaseLabel, playReleases, releaseTrains, sameVersion, versionKey } from '../cli/lib/portfolio';
import { laneOf, laneText, releasePlan, storeNow, versionHistory } from '../cli/lib/train';
const realFetch = globalThis.fetch;
@ -45,7 +45,7 @@ describe('version matching across the stores', () => {
expect(p.ios?.release?.version).toBe('1.0');
expect(p.android?.release?.version).toBe('1.0.0');
expect(p.done).toBe(false);
expect(p.android!.steps.map(x => x.text).join(' ')).toContain('1.0: In review');
expect(p.android!.steps.map(x => x.text).join(' ')).toContain('1.0: Not live yet');
});
});
@ -53,7 +53,7 @@ describe('Google Play "Live" needs the public store page', () => {
test('completed production + page 404 = in review, never live', () => {
const [prod] = playReleases(PLAY_STATUS_FIRST_404);
expect(prod).toMatchObject({ phase: 'review', state: 'completed', publicPage: 'notPublic', fraction: 1 });
expect(playReleaseLabel(prod!)).toBe('In review');
expect(playReleaseLabel(prod!)).toBe(PLAY_NOT_LIVE);
const lane = laneOf('android', prod!);
expect(lane.at).toBe(2); // the review stage, not live / rollout
expect(lane.share).toBeNull();
@ -77,14 +77,14 @@ describe('Google Play "Live" needs the public store page', () => {
expect(playReleaseLabel(r)).toBe('Live');
});
test('rule: page 404, managed publishing off: In review; on: In review / ready to publish', () => {
expect(playReleaseLabel(prodRel({ state: 'notPublic', versionName: null }))).toBe('In review');
expect(playReleaseLabel(prodRel({ state: 'notPublic', versionName: null }))).toBe(PLAY_NOT_LIVE);
expect(playReleaseLabel(prodRel({ state: 'notPublic', versionName: null }, '1.1.0', 'completed', { managedPublishing: true }))).toBe('In review / ready to publish (managed publishing)');
});
test('rule: page live with an older version: In review (live: <older>)', () => {
const r = prodRel({ state: 'public', versionName: '1.0.0' });
expect(r).toMatchObject({ phase: 'review', liveVersion: '1.0.0' });
expect(playReleaseLabel(r)).toBe('In review (live: 1.0.0)');
expect(laneText(laneOf('android', r))).toBe('in review (live: 1.0.0)');
expect(playReleaseLabel(r)).toBe(`${PLAY_NOT_LIVE} (live: 1.0.0)`);
expect(laneText(laneOf('android', r))).toBe(`not live yet: in review or blocked before review (the API cannot tell; see Publishing overview) (live: 1.0.0)`);
expect(storeNow([r], 'android').now).toBeNull();
});
test('rule: rollout, halted, draft', () => {