Skip to content

Commit

Permalink
Merge branch 'integrationTesting' into B-21054-INT
Browse files Browse the repository at this point in the history
  • Loading branch information
paulstonebraker authored Sep 16, 2024
2 parents 3315a0b + 090d92b commit 6a1cd8d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/pages/Office/MoveDetails/MoveDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ const MoveDetails = ({
<div className={styles.container}>
<LeftNav sections={sections}>
<LeftNavTag
background="#d63e04"
background="#e34b11"
associatedSectionName="orders"
showTag={missingOrdersInfoCount !== 0}
testID="tag"
Expand Down
11 changes: 6 additions & 5 deletions src/pages/Office/MovePaymentRequests/MovePaymentRequests.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ const MovePaymentRequests = ({
setUnapprovedServiceItemCount(serviceItemCount);
}, [mtoShipments, setUnapprovedServiceItemCount]);

const pendingCount = paymentRequests?.filter((pr) => pr.status === paymentRequestStatus.PENDING).length;
useEffect(() => {
const pendingCount = paymentRequests?.filter((pr) => pr.status === paymentRequestStatus.PENDING).length;
setPendingPaymentRequestCount(pendingCount);
}, [paymentRequests, setPendingPaymentRequestCount]);
}, [pendingCount, setPendingPaymentRequestCount]);

const excludePPMShipments = mtoShipments?.filter((shipment) => shipment.shipmentType !== 'PPM');

Expand Down Expand Up @@ -221,11 +221,12 @@ const MovePaymentRequests = ({
<div className={txoStyles.container} data-testid="MovePaymentRequests">
<LeftNav sections={sections}>
<LeftNavTag
background="#e34b11"
associatedSectionName="payment-requests"
showTag={paymentRequests?.length > 0}
testID="numOfPaymentRequestsTag"
showTag={pendingCount > 0}
testID="numOfPendingPaymentRequestsTag"
>
{paymentRequests.length}
{pendingCount}
</LeftNavTag>
<LeftNavTag
className={classnames('usa-tag usa-tag--alert', styles.errorTag)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}

.warning {
color: $warning;
color: $error;

&.errorTag {
width: 20px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,10 @@ describe('MovePaymentRequests', () => {
});
});

it('displays the number of payment request on leftnav sidebar', async () => {
it('displays the number of pending payment requests on leftnav sidebar', async () => {
renderMovePaymentRequests(testProps);
await waitFor(() => {
expect(screen.getByTestId('numOfPaymentRequestsTag').textContent).toEqual('2');
expect(screen.getByTestId('numOfPendingPaymentRequestsTag').textContent).toEqual('1');
});
});
});
Expand All @@ -525,10 +525,10 @@ describe('MovePaymentRequests', () => {
expect(paymentRequstNavLink.text).toContain(name);
});

it('displays the number of payment request on leftnav sidebar', async () => {
it('does not display the number of pending payment requests on leftnav sidebar if no pending exist', async () => {
renderMovePaymentRequests(testProps);
await waitFor(() => {
expect(screen.getByTestId('numOfPaymentRequestsTag').textContent).toEqual('1');
expect(screen.queryByTestId('numOfPendingPaymentRequestsTag')).not.toBeInTheDocument();
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ const ServicesCounselingMoveDetails = ({
{shipmentConcernCount}
</LeftNavTag>
<LeftNavTag
background="#d63e04"
background="#e34b11"
associatedSectionName="orders"
showTag={missingOrdersInfoCount !== 0}
testID="tag"
Expand Down
6 changes: 3 additions & 3 deletions src/shared/styles/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ $base-darker: #3d4551;
$base-darkest: #171717;

//Group 4: Form State colors
$error: #d63e04;
$error-dark: #A03003;
$error: #e34b11;
$error-dark: #a03003;
$error-light: #f4e3db;
$warning: #ffbe2e;
$warning-light: #faf3d1;
Expand All @@ -39,7 +39,7 @@ $accent-nts: #d85bef;
$accent-ntsr: #8168b3;
$accent-boat: #5d92ba;
$accent-mobile-home: #1fd819;
$accent-pro-gear: #71767A;
$accent-pro-gear: #71767a;
$accent-default: $base-light;

// Group 6 Info colors
Expand Down

0 comments on commit 6a1cd8d

Please sign in to comment.