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:
parent
1724296e59
commit
41d2ffcc24
12 changed files with 44 additions and 13 deletions
|
|
@ -56,6 +56,9 @@ fold: >
|
|||
describe('steps', () => {
|
||||
test('classification: reads, writes, waits, owner steps', () => {
|
||||
expect(classify(['validate'])).toBe('read');
|
||||
// bare `testflight groups` only lists; `groups sync` creates (a listing-sounding command once created groups)
|
||||
expect(classify(['apple', 'testflight', 'groups'])).toBe('read');
|
||||
expect(classify(['apple', 'testflight', 'groups', 'sync'])).toBe('write');
|
||||
expect(classify(['release', 'plan', '1.2.0'])).toBe('read');
|
||||
expect(classify(['apple', 'next-build'])).toBe('read');
|
||||
expect(classify(['apple', 'upload', '--no-wait'])).toBe('write');
|
||||
|
|
|
|||
|
|
@ -87,6 +87,17 @@ async function twice(run: () => Promise<void>): Promise<{ first: string[]; secon
|
|||
|
||||
const count = (type: string): number => s.asc.all(type).length;
|
||||
|
||||
describe('apple testflight groups: bare lists, sync creates', () => {
|
||||
test('bare `groups` writes nothing and names what sync would create', async () => {
|
||||
const p = project(CONFIG);
|
||||
const before = s.calls.length;
|
||||
const r = await capture(() => appleTestflight(p.ctx(['groups'])));
|
||||
expect(writes(s.calls.slice(before))).toEqual([]);
|
||||
expect(r.out).toContain('would create "Friends", "Public"');
|
||||
expect(r.out).toContain('storebound apple testflight groups sync');
|
||||
});
|
||||
});
|
||||
|
||||
describe('App Store Connect: a second run writes nothing', () => {
|
||||
test('apple iap: product, localizations, price schedule, availability once', async () => {
|
||||
const p = project(CONFIG);
|
||||
|
|
@ -119,7 +130,7 @@ describe('App Store Connect: a second run writes nothing', () => {
|
|||
for (const [name, run] of [
|
||||
['cpp', () => appleCpp(p.ctx(['create']))],
|
||||
['events', () => appleEvents(p.ctx(['create']))],
|
||||
['testflight', () => appleTestflight(p.ctx(['groups']))],
|
||||
['testflight', () => appleTestflight(p.ctx(['groups', 'sync']))],
|
||||
['review-details', () => appleReviewDetails(p.ctx([]))],
|
||||
['bundle', () => appleBundle(p.ctx([]))],
|
||||
['offer-codes', () => appleOfferCodes(p.ctx([]))],
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue