Game Center switch before submit: apple submit / resubmit and signing ensure create gameCenterDetails and gameCenterAppVersions when Game Center is in use (config, entitlements or the built IPA), shown in the dry run; validate blocks on either missing; fake 409 BUILD_INDICATES_GAME_CENTER_ENABLED until both exist; pitfall 89
This commit is contained in:
parent
dd9e059036
commit
163e666834
9 changed files with 152 additions and 26 deletions
|
|
@ -86,6 +86,9 @@ describe('apple signing ensure', () => {
|
|||
{ match: /^\/v1\/certificates\?/, answer: page([]) },
|
||||
{ match: /^\/v1\/bundleIds\/BUNDLE0001\/profiles/, answer: page([sbProfile]) },
|
||||
{ match: /^\/v1\/profiles\/PROF0001\/relationships\/certificates/, answer: page([{ type: 'certificates', id: 'CERT0001' }]) },
|
||||
// GAME_CENTER is wanted: ensure reads the app's Game Center switch (on here; the editable version list is empty)
|
||||
{ match: /^\/v1\/apps\/6400000101\/gameCenterDetail/, answer: { data: { type: 'gameCenterDetails', id: 'GCD0001' } } },
|
||||
{ match: /^\/v1\/apps\/6400000101\/appStoreVersions/, answer: page([]) },
|
||||
{ method: 'POST', match: /^\/v1\/bundleIdCapabilities$/, answer: (c: { body: unknown }) => ({ data: cap((c.body as { data: { attributes: { capabilityType: string } } }).data.attributes.capabilityType) }) },
|
||||
];
|
||||
|
||||
|
|
@ -103,6 +106,17 @@ describe('apple signing ensure', () => {
|
|||
expect(calls.filter(c => c.method !== 'GET')).toEqual([]);
|
||||
});
|
||||
|
||||
test('GAME_CENTER without the app\'s Game Center detail: the dry run plans gameCenterDetails too (the submit 409 otherwise)', async () => {
|
||||
ascEnv();
|
||||
const p = project(cfg('automatic'));
|
||||
const rs = routes(['IN_APP_PURCHASE']);
|
||||
rs.unshift({ match: /^\/v1\/apps\/6400000101\/gameCenterDetail/, answer: { errors: [{ status: '404' }] } as never, status: 404 } as never);
|
||||
const calls = mockFetch(rs);
|
||||
const r = await capture(() => signing(p.ctx(['ensure', '--dry'])));
|
||||
expect(r.out + r.err).toContain('would POST /v1/gameCenterDetails');
|
||||
expect(calls.filter(c => c.method !== 'GET')).toEqual([]);
|
||||
});
|
||||
|
||||
test('automatic: a real run adds capabilities, reads them back and creates no certificate or profile', async () => {
|
||||
ascEnv();
|
||||
const p = project(cfg('automatic'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue