Built merchant management, activity history, and the pipeline
This commit is contained in:
@@ -262,6 +262,7 @@ async function fixture(id, status = 'NEW_LEAD', ownerId = 'user-manager1') {
|
||||
data: {
|
||||
id,
|
||||
name: 'Workflow Test',
|
||||
estimatedMonthlyVolumeUsd: '10000',
|
||||
legalName: 'Workflow Test Ltd',
|
||||
website: 'https://workflow.example',
|
||||
industry: 'SOFTWARE',
|
||||
@@ -438,11 +439,30 @@ test('corrections, resubmission, approval and activation preserve one merchant a
|
||||
mutate(
|
||||
`/merchants/${id}/transitions`,
|
||||
cookie,
|
||||
{ version: (await detail()).version, toStatus },
|
||||
{
|
||||
version: (await detail()).version,
|
||||
toStatus,
|
||||
...(toStatus === 'REJECTED' ? { reason: 'Attempted terminal transition' } : {}),
|
||||
},
|
||||
'POST',
|
||||
);
|
||||
try {
|
||||
assert.equal((await move('LIVE')).status, 409);
|
||||
assert.equal(
|
||||
(
|
||||
await mutate(
|
||||
`/merchants/${id}/activities`,
|
||||
sales,
|
||||
{
|
||||
version: (await detail()).version,
|
||||
kind: 'CALL',
|
||||
text: 'Confirmed contact before progression',
|
||||
},
|
||||
'POST',
|
||||
)
|
||||
).status,
|
||||
201,
|
||||
);
|
||||
for (const stage of ['CONTACTED', 'QUALIFIED', 'KYB'])
|
||||
assert.equal((await move(stage)).status, 201);
|
||||
assert.equal((await move('COMPLIANCE_REVIEW')).status, 409);
|
||||
|
||||
Reference in New Issue
Block a user