apple submit --yes submits a draft prepared with --no-submit that already holds the version and items (was 'nothing to submit'); iap-submit the same for a draft holding the asked-for items; test, pitfall 90, CHANGELOG
This commit is contained in:
parent
0d1926f7d7
commit
4d70be3404
6 changed files with 52 additions and 6 deletions
|
|
@ -225,6 +225,24 @@ describe('apple submit --build <n> (a first submission, the desktop owner action
|
|||
expect(shown(b)).toEqual([]);
|
||||
});
|
||||
|
||||
test('--no-submit --yes, then --yes: the second step submits the prepared draft that holds everything already', async () => {
|
||||
fresh();
|
||||
const p = project(ONE);
|
||||
await capture(() => appleSubmit(p.ctx(['--build', '8', '--no-submit', '--yes'])));
|
||||
const sid = s.asc.all('reviewSubmissions')[0]!.id;
|
||||
expect(s.asc.all('reviewSubmissions').map(x => x.attributes.state)).toEqual(['READY_FOR_REVIEW']);
|
||||
expect(s.asc.children(sid, 'reviewSubmissionItems')).toHaveLength(2);
|
||||
s.faults.push({ ...NOT_READY, match: new RegExp(`^/v1/reviewSubmissions/${sid}$`), times: 1 });
|
||||
const a = s.calls.length;
|
||||
const r = await capture(() => appleSubmit(p.ctx(['--build', '8', '--yes'])));
|
||||
expect([r.exit ?? 0, r.err]).toEqual([0, '']);
|
||||
expect(r.out).toContain('in it already');
|
||||
expect(r.out).not.toContain('nothing to submit');
|
||||
expect(shown(a)).toEqual([`PATCH /v1/reviewSubmissions/${sid}`, `PATCH /v1/reviewSubmissions/${sid}`]);
|
||||
expect(s.asc.all('reviewSubmissions').map(x => x.attributes.state)).toEqual(['WAITING_FOR_REVIEW']);
|
||||
expect(r.out).toContain(`review submission ${sid} submitted`);
|
||||
});
|
||||
|
||||
test('a live version is not submitted; no editable version is a clear stop', async () => {
|
||||
fresh();
|
||||
s.asc.res.get('ver-1')!.attributes.appVersionState = 'READY_FOR_SALE';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue