From c6d45fd23d170c56e29cfa427d2d94afc647c75a Mon Sep 17 00:00:00 2001 From: rmanaem Date: Fri, 13 Dec 2024 12:06:22 -0500 Subject: [PATCH] Addressed the PR review comments --- cypress/e2e/ResultsTSV.cy.ts | 12 ++++++------ src/components/ResultContainer.tsx | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cypress/e2e/ResultsTSV.cy.ts b/cypress/e2e/ResultsTSV.cy.ts index 0f5c98fc..bf5a0bb6 100644 --- a/cypress/e2e/ResultsTSV.cy.ts +++ b/cypress/e2e/ResultsTSV.cy.ts @@ -115,8 +115,8 @@ describe('Unprotected response', () => { expect(phenotypicSession.split('\t')[12]).to.equal('multisource interference task'); expect(phenotypicSession.split('\t')[13]).to.equal(''); expect(phenotypicSession.split('\t')[14]).to.equal(''); - expect(phenotypicSession.split('\t')[15]).to.equal('Flow Weighted, T2 Weighted'); - expect(phenotypicSession.split('\t')[16]).to.equal('fmriprep 23.1.3, freesurfer 7.3.2'); + expect(phenotypicSession.split('\t')[15]).to.equal('Flow Weighted,T2 Weighted'); + expect(phenotypicSession.split('\t')[16]).to.equal('fmriprep 23.1.3,freesurfer 7.3.2'); expect(imagingSession.split('\t')[0]).to.equal('some dataset'); expect(imagingSession.split('\t')[1]).to.equal( @@ -133,10 +133,10 @@ describe('Unprotected response', () => { expect(imagingSession.split('\t')[10]).to.equal(''); expect(imagingSession.split('\t')[11]).to.equal(''); expect(imagingSession.split('\t')[12]).to.equal(''); - expect(imagingSession.split('\t')[13]).to.equal('Flow Weighted, T2 Weighted'); - expect(imagingSession.split('\t')[14]).to.equal('fmriprep 23.1.3, freesurfer 7.3.2'); - expect(imagingSession.split('\t')[15]).to.equal('Flow Weighted, T2 Weighted'); - expect(imagingSession.split('\t')[16]).to.equal('fmriprep 23.1.3, freesurfer 7.3.2'); + expect(imagingSession.split('\t')[13]).to.equal('Flow Weighted,T2 Weighted'); + expect(imagingSession.split('\t')[14]).to.equal('fmriprep 23.1.3,freesurfer 7.3.2'); + expect(imagingSession.split('\t')[15]).to.equal('Flow Weighted,T2 Weighted'); + expect(imagingSession.split('\t')[16]).to.equal('fmriprep 23.1.3,freesurfer 7.3.2'); }); }); }); diff --git a/src/components/ResultContainer.tsx b/src/components/ResultContainer.tsx index 71842a29..abb8c457 100644 --- a/src/components/ResultContainer.tsx +++ b/src/components/ResultContainer.tsx @@ -73,7 +73,7 @@ function ResultContainer({ ): string | string[] | null { // Handle array of URIs if (Array.isArray(uri)) { - return uri.map((singleUri) => convertURIToLabel(type, singleUri)).join(', '); + return uri.map((singleUri) => convertURIToLabel(type, singleUri)).join(','); } if (!uri) { @@ -136,7 +136,7 @@ function ResultContainer({ .flatMap(([name, versions]) => (versions as string[]).map((version: string) => `${name} ${version}`) ) - .join(', ') + .join(',') : ''; } @@ -187,11 +187,11 @@ function ResultContainer({ 'protected', // session_completed_pipelines isHumanFile ? convertURIToLabel('modality', res.image_modals) - : res.image_modals?.join(', '), + : res.image_modals?.join(','), isHumanFile ? convertURIToLabel( 'pipeline', - parsePipelinesInfoToString(res.available_pipelines).split(', ') + parsePipelinesInfoToString(res.available_pipelines).split(',') ) : parsePipelinesInfoToString(res.available_pipelines), ].join('\t') @@ -220,20 +220,20 @@ function ResultContainer({ : subject.assessment, isHumanFile ? convertURIToLabel('modality', subject.image_modal) - : subject.image_modal?.join(', '), + : subject.image_modal?.join(','), isHumanFile ? convertURIToLabel( 'pipeline', - parsePipelinesInfoToString(subject.completed_pipelines).split(', ') + parsePipelinesInfoToString(subject.completed_pipelines).split(',') ) : parsePipelinesInfoToString(subject.completed_pipelines), isHumanFile ? convertURIToLabel('modality', res.image_modals) - : res.image_modals?.join(', '), + : res.image_modals?.join(','), isHumanFile ? convertURIToLabel( 'pipeline', - parsePipelinesInfoToString(res.available_pipelines).split(', ') + parsePipelinesInfoToString(res.available_pipelines).split(',') ) : parsePipelinesInfoToString(res.available_pipelines), ].join('\t')