Add automated testing script and expose payment hashes
Integrates a new bash script for automated end-to-end testing of the Timmy API. Updates API routes to expose payment hashes in stub mode for easier invoice payment simulation during testing. Modifies test plan documentation to include the new automated script. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 418bf6f8-212b-4bb0-a7a5-8231a061da4e Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 6f2776b0-a913-41d3-a988-759a82feb6f3 Replit-Helium-Checkpoint-Created: true
This commit is contained in:
@@ -214,7 +214,13 @@ router.get("/jobs/:id", async (req: Request, res: Response) => {
|
||||
const inv = job.evalInvoiceId ? await getInvoiceById(job.evalInvoiceId) : null;
|
||||
res.json({
|
||||
...base,
|
||||
...(inv ? { evalInvoice: { paymentRequest: inv.paymentRequest, amountSats: inv.amountSats } } : {}),
|
||||
...(inv ? {
|
||||
evalInvoice: {
|
||||
paymentRequest: inv.paymentRequest,
|
||||
amountSats: inv.amountSats,
|
||||
...(lnbitsService.stubMode ? { paymentHash: inv.paymentHash } : {}),
|
||||
},
|
||||
} : {}),
|
||||
});
|
||||
break;
|
||||
}
|
||||
@@ -222,7 +228,13 @@ router.get("/jobs/:id", async (req: Request, res: Response) => {
|
||||
const inv = job.workInvoiceId ? await getInvoiceById(job.workInvoiceId) : null;
|
||||
res.json({
|
||||
...base,
|
||||
...(inv ? { workInvoice: { paymentRequest: inv.paymentRequest, amountSats: inv.amountSats } } : {}),
|
||||
...(inv ? {
|
||||
workInvoice: {
|
||||
paymentRequest: inv.paymentRequest,
|
||||
amountSats: inv.amountSats,
|
||||
...(lnbitsService.stubMode ? { paymentHash: inv.paymentHash } : {}),
|
||||
},
|
||||
} : {}),
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user