Use the user-provided source name in SourceInfoCard (#103542)
This commit is contained in:
parent
a416e81b49
commit
51767e7cb9
|
@ -44,6 +44,12 @@ describe('SourceLayout', () => {
|
|||
expect(wrapper.find('.testChild')).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('passes a source name to SourceInfoCard', () => {
|
||||
const wrapper = shallow(<SourceLayout />);
|
||||
|
||||
expect(wrapper.find(SourceInfoCard).prop('sourceName')).toEqual('Jira');
|
||||
});
|
||||
|
||||
it('renders the default Workplace Search layout when on an organization view', () => {
|
||||
setMockValues({ ...mockValues, isOrganization: true });
|
||||
const wrapper = shallow(<SourceLayout />);
|
||||
|
|
|
@ -35,19 +35,12 @@ export const SourceLayout: React.FC<PageTemplateProps> = ({
|
|||
const { contentSource, dataLoading } = useValues(SourceLogic);
|
||||
const { isOrganization } = useValues(AppLogic);
|
||||
|
||||
const {
|
||||
name,
|
||||
createdAt,
|
||||
serviceType,
|
||||
serviceName,
|
||||
isFederatedSource,
|
||||
supportedByLicense,
|
||||
} = contentSource;
|
||||
const { name, createdAt, serviceType, isFederatedSource, supportedByLicense } = contentSource;
|
||||
|
||||
const pageHeader = (
|
||||
<>
|
||||
<SourceInfoCard
|
||||
sourceName={serviceName}
|
||||
sourceName={name}
|
||||
sourceType={serviceType}
|
||||
dateCreated={moment(createdAt).format('MMMM D, YYYY')}
|
||||
isFederatedSource={isFederatedSource}
|
||||
|
|
Loading…
Reference in a new issue