Skip to content

Commit 97c718d

Browse files
committed
fix: PR requests
1 parent 36e99d7 commit 97c718d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Configuration/Customers/CustomerDetailView/CustomerIntegrations.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ const CustomerIntegrations = ({
1111
}) => {
1212
const { ADMIN_PORTAL_BASE_URL } = getConfig();
1313
const ssoDateText = ({ sso }) => (`Created ${formatDate(sso?.created)} • Last modified ${formatDate(sso?.modifed)}`);
14-
const configDateText = ({ config }) => (`Last modified ${formatDate(config?.lastModifiedAt)}`);
14+
const configDateText = ({ config }) => (`Created ${formatDate(config?.created)}Last modified ${formatDate(config?.lastModifiedAt)}`);
1515

1616
return (
1717
<Container className="mt-3 pr-6 mb-5">
18+
{(activeSSO || activeIntegrations || apiCredentialsEnabled) && (
1819
<div>
1920
<h2 className="pt-4">Associated Integrations</h2>
2021
{activeSSO && activeSSO.map((sso) => (
@@ -30,7 +31,7 @@ const CustomerIntegrations = ({
3031
{activeIntegrations && activeIntegrations.map((config) => (
3132
<CustomerViewCard
3233
slug={slug}
33-
header="Learner platform"
34+
header="Learning platform"
3435
title={config.channelCode[0].toUpperCase() + config.channelCode.substr(1).toLowerCase()}
3536
subtext={configDateText(config)}
3637
buttonText="Open in Admin Portal"
@@ -47,6 +48,7 @@ const CustomerIntegrations = ({
4748
/>
4849
)}
4950
</div>
51+
)}
5052
</Container>
5153
);
5254
};

src/Configuration/Customers/CustomerDetailView/tests/CustomerViewIntegrations.test.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,12 @@ describe('CustomerViewIntegrations', () => {
5353

5454
expect(screen.getByText('SSO')).toBeInTheDocument();
5555
expect(screen.getByText('Orange cats rule')).toBeInTheDocument();
56-
expect(screen.getByText('Created September 15, 2024 • Last modified September 15, 2024')).toBeInTheDocument();
56+
expect(screen.getAllByText('Created September 15, 2024 • Last modified September 15, 2024')).toHaveLength(3);
5757
expect(screen.getAllByText('Open in Admin Portal')).toHaveLength(3);
5858

59-
expect(screen.getAllByText('LEARNER PLATFORM')).toHaveLength(2);
59+
expect(screen.getAllByText('LEARNING PLATFORM')).toHaveLength(2);
6060
expect(screen.getByText('Moodle')).toBeInTheDocument();
6161
expect(screen.getByText('Canvas')).toBeInTheDocument();
62-
expect(screen.getAllByText('Last modified September 15, 2024')).toHaveLength(2);
6362

6463
expect(screen.getByText('INTEGRATION')).toBeInTheDocument();
6564
expect(screen.getByText('API')).toBeInTheDocument();

0 commit comments

Comments
 (0)