Skip to content

Commit

Permalink
fix: PR requests
Browse files Browse the repository at this point in the history
  • Loading branch information
kiram15 committed Aug 14, 2024
1 parent 36e99d7 commit 97c718d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ const CustomerIntegrations = ({
}) => {
const { ADMIN_PORTAL_BASE_URL } = getConfig();
const ssoDateText = ({ sso }) => (`Created ${formatDate(sso?.created)} • Last modified ${formatDate(sso?.modifed)}`);
const configDateText = ({ config }) => (`Last modified ${formatDate(config?.lastModifiedAt)}`);
const configDateText = ({ config }) => (`Created ${formatDate(config?.created)}Last modified ${formatDate(config?.lastModifiedAt)}`);

return (
<Container className="mt-3 pr-6 mb-5">
{(activeSSO || activeIntegrations || apiCredentialsEnabled) && (
<div>
<h2 className="pt-4">Associated Integrations</h2>
{activeSSO && activeSSO.map((sso) => (
Expand All @@ -30,7 +31,7 @@ const CustomerIntegrations = ({
{activeIntegrations && activeIntegrations.map((config) => (
<CustomerViewCard
slug={slug}
header="Learner platform"
header="Learning platform"
title={config.channelCode[0].toUpperCase() + config.channelCode.substr(1).toLowerCase()}
subtext={configDateText(config)}
buttonText="Open in Admin Portal"
Expand All @@ -47,6 +48,7 @@ const CustomerIntegrations = ({
/>
)}
</div>
)}
</Container>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,12 @@ describe('CustomerViewIntegrations', () => {

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

expect(screen.getAllByText('LEARNER PLATFORM')).toHaveLength(2);
expect(screen.getAllByText('LEARNING PLATFORM')).toHaveLength(2);
expect(screen.getByText('Moodle')).toBeInTheDocument();
expect(screen.getByText('Canvas')).toBeInTheDocument();
expect(screen.getAllByText('Last modified September 15, 2024')).toHaveLength(2);

expect(screen.getByText('INTEGRATION')).toBeInTheDocument();
expect(screen.getByText('API')).toBeInTheDocument();
Expand Down

0 comments on commit 97c718d

Please sign in to comment.