Built merchant management, activity history, and the pipeline

This commit is contained in:
Oleksandr Prokhorenko
2026-09-24 20:50:15 +03:00
parent 5de240fda3
commit 382f6e8841
43 changed files with 4679 additions and 812 deletions
+21 -1
View File
@@ -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);