apple testflight groups: bare lists the groups and what the config would create (read-only); groups sync (or --yes) creates; flows: bare = read, sync = write; MCP tool runs groups sync

This commit is contained in:
CRTkafa 2026-10-12 10:48:59 +08:00
parent 1724296e59
commit 41d2ffcc24
12 changed files with 44 additions and 13 deletions

View file

@ -140,7 +140,7 @@ describe('testflight mcp tools', () => {
const tool = (n: string) => TOOLS.find(t => t.name === n)!;
test('status read-only, writes dry by default, distribute is internal-only, testers / review not exposed', () => {
expect(tool('apple_testflight_status')).toMatchObject({ write: false, network: true });
expect(toArgv(tool('apple_testflight_groups')).argv).toEqual(['apple', 'testflight', 'groups', '--dry']);
expect(toArgv(tool('apple_testflight_groups')).argv).toEqual(['apple', 'testflight', 'groups', 'sync', '--dry']);
expect(toArgv(tool('apple_testflight_what_to_test'), { build: '42', locale: 'en-US,tr' }).argv).toEqual(['apple', 'testflight', 'what-to-test', '--build', '42', '--locale', 'en-US,tr', '--dry']);
expect(toArgv(tool('apple_testflight_distribute'), { build: '42', groups: 'Team', dry_run: false }).argv).toEqual(['apple', 'testflight', 'distribute', '--build', '42', '--group', 'Team', '--internal-only']);
expect(validateInput(tool('apple_testflight_distribute'), { build: 'latest', groups: 'Team' })[0]).toContain('does not match');