Skip to content

Commit

Permalink
ui: addition of collaborations in Data collection
Browse files Browse the repository at this point in the history
  • Loading branch information
drjova committed Dec 17, 2024
1 parent 8a8d14a commit d4456a1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { shallow } from 'enzyme';
import { fromJS } from 'immutable';
import LiteratureRecordsList from '../../../common/components/LiteratureRecordsList';
import LiteratureRecordsList from '../LiteratureRecordsList';

describe('LiteratureRecordsList', () => {
it('renders with multiple records', () => {
Expand Down
2 changes: 2 additions & 0 deletions ui/src/data/components/DataItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function DataItem({ metadata, page }) {
const recordId = metadata.get('control_number');
const urls = metadata.get('urls');
const canEdit = metadata.get('can_edit', false);
const collaborations = metadata.get('collaborations', []);

return (
<div data-test-id="data-result-item">
Expand Down Expand Up @@ -74,6 +75,7 @@ function DataItem({ metadata, page }) {
<AuthorsAndCollaborations
authorCount={authorCount}
authors={authors}
collaborations={collaborations}
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ exports[`DataItem renders with all props set 1`] = `
},
]
}
collaborations={Immutable.List []}
collaborations={Array []}
collaborationsWithSuffix={Immutable.List []}
enableAuthorsShowAll={false}
/>
Expand Down Expand Up @@ -154,7 +154,7 @@ exports[`DataItem renders with only needed props 1`] = `
<AuthorsAndCollaborations
authorCount={0}
authors={Immutable.List []}
collaborations={Immutable.List []}
collaborations={Array []}
collaborationsWithSuffix={Immutable.List []}
enableAuthorsShowAll={false}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const DetailPage = ({
const dois = filterDoisByMaterial(metadata.get('dois', []));
const recordId = metadata.get('control_number');
const literatureRecords = metadata.get('literature');
const collaborations = metadata.get('collaborations');

const urls = metadata.get('urls');

Expand Down Expand Up @@ -82,6 +83,7 @@ const DetailPage = ({
<AuthorsAndCollaborations
authorCount={authorCount}
authors={authors}
collaborations={collaborations}
enableAuthorsShowAll
page="Data detail"
/>
Expand Down

0 comments on commit d4456a1

Please sign in to comment.