tests: art_pull in the local-write tools, art_live / art_thumb in the store-only reads, onboard tests without the art step

This commit is contained in:
CRTkafa 2026-10-14 04:28:03 +08:00
parent 00be838b76
commit 81915651bd
3 changed files with 3 additions and 3 deletions

View file

@ -203,7 +203,7 @@ describe('storebound onboard (recorded live shapes)', () => {
ascEnv(); playEnv();
const p = liveProject();
liveStores({ draft: true });
const r = await capture(() => onboard(p.ctx(['--write'], ['write'])));
const r = await capture(() => onboard(p.ctx(['--write', '--no-art'], ['write'])));
expect(r.out + r.err).not.toContain('demo-secret-sentinel');
expect(r.out + r.err).toContain('sign-in for review: required (App Store review detail: demo account required (a demo account is set there))');
const creds = JSON.parse(readFileSync(join(p.root, '.storebound', 'credentials.json'), 'utf8'));

View file

@ -238,7 +238,7 @@ describe('serve: store-only apps (virtual)', () => {
const r = await s.call('reviews.list', { virtual: V, args: { days: 30 }, credentials: APPLE });
expect(r.error).toBeUndefined();
expect(existsSync(join(s.calls[0]!.o.cwd, 'storebound.config.json'))).toBe(true);
expect([...VIRTUAL_READS].sort()).toEqual(['apple_ppo_status', 'apple_status', 'apple_testflight_status', 'health', 'health_issue', 'listing_live', 'play_status', 'reviews_list']);
expect([...VIRTUAL_READS].sort()).toEqual(['apple_ppo_status', 'apple_status', 'apple_testflight_status', 'art_live', 'art_thumb', 'health', 'health_issue', 'listing_live', 'play_status', 'reviews_list']);
for (const m of ['play.listing', 'catalog.diff', 'project.listings', 'check', 'reviews.approve'])
expect((await s.call(m, { virtual: V, args: m === 'reviews.approve' ? { file: 'apple-1.md' } : {} })).error).toMatchObject({ code: ERR.invalidParams });
expect((await s.call('health', { virtual: V, project: '/tmp' })).error).toMatchObject({ code: ERR.invalidParams });

View file

@ -85,7 +85,7 @@ describe('mcp tools', () => {
}
}
// the local-write exception covers only the pull tools, and only with dry_run false
expect(Object.keys(LOCAL_WRITE_TOOLS).sort()).toEqual(['apple_listing_pull', 'catalog_pull', 'onboard', 'play_listing_pull']);
expect(Object.keys(LOCAL_WRITE_TOOLS).sort()).toEqual(['apple_listing_pull', 'art_pull', 'catalog_pull', 'onboard', 'play_listing_pull']);
for (const n of Object.keys(LOCAL_WRITE_TOOLS)) expect(toArgv(TOOLS.find(t => t.name === n)!, {}).argv).not.toContain('--write');
const phased = TOOLS.find(t => t.name === 'apple_phased_release')!;
expect(phased.props!.action!.enum).toEqual(['on', 'pause']);