plate numbers

This commit is contained in:
2026-10-01 14:04:56 +05:30
parent a40274fdd8
commit 575b00172d
5 changed files with 28 additions and 0 deletions
+19
View File
@@ -308,6 +308,25 @@ async function run(port) {
'lease with both GCI and finance failed'
);
const registered = await request(port, 'PATCH', '/api/stocks/CH-GREEN/stage', {
token: dealerToken,
body: { stage: 'rmvRegistration' },
});
assert(registered.status === 200, 'rmv stage failed');
const plateMissing = await request(port, 'PATCH', '/api/stocks/CH-GREEN/stage', {
token: dealerToken,
body: { stage: 'plateReceived' },
});
assert(plateMissing.status === 400, 'plate received without a number should fail');
const plated = await request(port, 'PATCH', '/api/stocks/CH-GREEN/stage', {
token: dealerToken,
body: { stage: 'plateReceived', plateNumber: 'WP ABC-1234' },
});
assert(
plated.status === 200 && plated.json.data.plateNumber === 'WP ABC-1234',
'saving the plate number failed'
);
const outside = await request(port, 'POST', '/api/stocks/CH-YELLOW/transfer', {
token: repToken,
body: { dealerId: dealerC.json.data.id },