diff --git a/src/apps/wallet-admin/src/lib/components/payment-view/PaymentView.spec.tsx b/src/apps/wallet-admin/src/lib/components/payment-view/PaymentView.spec.tsx index 79e317371..bf3806abf 100644 --- a/src/apps/wallet-admin/src/lib/components/payment-view/PaymentView.spec.tsx +++ b/src/apps/wallet-admin/src/lib/components/payment-view/PaymentView.spec.tsx @@ -4,6 +4,7 @@ import { render, screen, waitFor, + within, } from '@testing-library/react' import { Winning } from '../../models/WinningDetail' @@ -122,8 +123,6 @@ describe('PaymentView', () => { expect(await screen.findByRole('heading', { name: 'Engagement Details' })) .toBeTruthy() - expect(await screen.findByText('copilot-manager')) - .toBeTruthy() await waitFor(() => { expect(screen.getAllByText('43.75')) .toHaveLength(2) @@ -131,6 +130,24 @@ describe('PaymentView', () => { expect(await screen.findByText(/Completed sprint support and bug triage\./)) .toBeTruthy() + const workLogHeading = await screen.findByRole('heading', { + name: 'Work Log / Manager Inputs', + }) + const workLogSection = workLogHeading.parentElement + + if (!workLogSection) { + throw new Error('Expected work log section to be rendered.') + } + + expect(screen.getAllByText('Payment Creator')) + .toHaveLength(1) + expect(within(workLogSection) + .getByText('Payment Creator')) + .toBeTruthy() + expect(within(workLogSection) + .getByText('copilot-manager')) + .toBeTruthy() + const descriptionLink = await screen.findByRole('link', { name: 'Wipro - US Foods - Week Ending: Mar 21, 2026', }) diff --git a/src/apps/wallet-admin/src/lib/components/payment-view/PaymentView.tsx b/src/apps/wallet-admin/src/lib/components/payment-view/PaymentView.tsx index 795a124a8..02db5e10c 100644 --- a/src/apps/wallet-admin/src/lib/components/payment-view/PaymentView.tsx +++ b/src/apps/wallet-admin/src/lib/components/payment-view/PaymentView.tsx @@ -164,17 +164,6 @@ const PaymentView: React.FC = (props: PaymentViewProps) => { Handle

{props.payment.handle}

- {isEngagementPayment && ( -
- Payment Creator -

- {isPaymentDetailsLoading - ? 'Loading...' - : formatOptionalText(paymentDetails?.paymentCreatorHandle)} -

-
- )} -
Type

{props.payment.type}

@@ -306,6 +295,12 @@ const PaymentView: React.FC = (props: PaymentViewProps) => { {renderOptionalLinkedText(paymentDetails?.workLog?.remarks)}

+
+ Payment Creator +

+ {formatOptionalText(paymentDetails?.paymentCreatorHandle)} +

+
)}