@@ -505,30 +505,22 @@ test.describe('Billing: Patient Chart workflow', () => {
505505 await waitForSuccessNotification ( page , 'Payment processed successfully' ) ;
506506 } ) ;
507507
508- /**
509- * TODO: Uncomment this after the ticket below has been implemented:
510- * https://openmrs.atlassian.net/browse/O3-5394
511- *
512- * The ticket is about updating the payment status of the line items when the payment is processed.
513- * Once the ticket is implemented, we can uncomment the test step below
514- */
515-
516- // await test.step('Then the line item should be marked as PAID', async () => {
517- // await page.reload();
518- // await invoicePage.waitForInvoiceToLoad();
519-
520- // const lineItems = await invoicePage.getLineItems();
521- // lineItems.forEach((lineItem) => {
522- // expect(lineItem.status).toBe('PAID');
523- // });
524-
525- // // Verify backend state
526- // const billResponse = await api.get(`billing/bill/${billUuid}?v=full`);
527- // const billData = await billResponse.json();
528- // billData.lineItems.forEach((lineItem: { paymentStatus: string }) => {
529- // expect(lineItem.paymentStatus).toBe('PAID');
530- // });
531- // });
508+ await test . step ( 'Then the line item should be marked as PAID' , async ( ) => {
509+ await page . reload ( ) ;
510+ await invoicePage . waitForInvoiceToLoad ( ) ;
511+
512+ const lineItems = await invoicePage . getLineItems ( ) ;
513+ lineItems . forEach ( ( lineItem ) => {
514+ expect ( lineItem . status ) . toBe ( 'PAID' ) ;
515+ } ) ;
516+
517+ // Verify backend state
518+ const billResponse = await api . get ( `billing/bill/${ billUuid } ?v=full` ) ;
519+ const billData = await billResponse . json ( ) ;
520+ billData . lineItems . forEach ( ( lineItem : { paymentStatus : string } ) => {
521+ expect ( lineItem . paymentStatus ) . toBe ( 'PAID' ) ;
522+ } ) ;
523+ } ) ;
532524 } ) ;
533525
534526 test ( 'Process payment with multiple payment methods' , async ( { page, api, patient } ) => {
0 commit comments