Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
rtorrero committed Aug 16, 2023
1 parent c4ab411 commit e5ffe57
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 3 additions & 5 deletions assets/js/components/ClustersList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ function ClustersList() {
filterFromParams: true,
filter: (filter, key) => (element) =>
element[key].some((sid) => filter.includes(sid)),
render: (_, { sid }) => {
return sid.map((singleSid, index) => {
render: (_, { sid }) =>
sid.map((singleSid) => {
const linkData = getSapSystemLinkBySID(
applicationInstances,
databaseInstances,
Expand All @@ -104,15 +104,13 @@ function ClustersList() {

return (
<SapSystemLink
key={index}
systemType={linkData ? linkData.type : null}
sapSystemId={linkData ? linkData.sap_system_id : null}
>
{singleSid}
</SapSystemLink>
);
});
},
}),
},
{
title: 'Hosts',
Expand Down
11 changes: 7 additions & 4 deletions assets/js/components/SapSystemLink.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ import { sapSystemFactory } from '@lib/test-utils/factories';

describe('SapSystemLink', () => {
it('renders Link when sapSystemId and systemType is provided', () => {
const { id, sid }= sapSystemFactory.build()
const { id, sid } = sapSystemFactory.build();

console.log("test: sapsystemId and sid:", id, sid)
renderWithRouter(<SapSystemLink systemType="databases" sapSystemId={id}>{sid}</SapSystemLink>);
renderWithRouter(
<SapSystemLink systemType="databases" sapSystemId={id}>
{sid}
</SapSystemLink>
);

const sapSystemLinkElement = screen.getByRole('link', { sid });

Expand All @@ -29,4 +32,4 @@ describe('SapSystemLink', () => {
screen.getByText('SAP System currently not registered.')
).toBeInTheDocument();
});
});
});

0 comments on commit e5ffe57

Please sign in to comment.