From: Stephen Smith Date: Tue, 2 Apr 2024 20:32:47 +0000 (-0400) Subject: 21508: Fix process io cypress tests, remove image preview test X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/3a7e0c1b7de023461f90d41a1878ec43c3d187a9?hp=648b0db5d0fedc67206c08625bfb42511b4ee23b 21508: Fix process io cypress tests, remove image preview test Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- diff --git a/services/workbench2/cypress/e2e/process.cy.js b/services/workbench2/cypress/e2e/process.cy.js index 2a5a62927f..33f820c50e 100644 --- a/services/workbench2/cypress/e2e/process.cy.js +++ b/services/workbench2/cypress/e2e/process.cy.js @@ -1279,6 +1279,7 @@ describe("Process tests", function () { .contains(name) .parents("tr") .within($mainRow => { + cy.get($mainRow).scrollIntoView(); label && cy.contains(label); if (multipleRows) { @@ -1444,11 +1445,11 @@ describe("Process tests", function () { .parents("[data-cy=process-io-card]") .within(ctx => { cy.get(ctx).scrollIntoView(); - cy.get('[data-cy="io-preview-image-toggle"]').click({ waitForAnimations: false }); const outPdh = testOutputCollection.portable_data_hash; verifyIOParameter("output_file", null, "Label Description", "cat.png", `${outPdh}`); - verifyIOParameterImage("output_file", `/c=${outPdh}/cat.png`); + // Disabled until image preview returns + // verifyIOParameterImage("output_file", `/c=${outPdh}/cat.png`); verifyIOParameter("output_file_with_secondary", null, "Doc Description", "main.dat", `${outPdh}`); verifyIOParameter("output_file_with_secondary", null, "Doc Description", "secondary.dat", undefined, true); verifyIOParameter("output_file_with_secondary", null, "Doc Description", "secondary2.dat", undefined, true); diff --git a/services/workbench2/src/views/process-panel/process-io-card.tsx b/services/workbench2/src/views/process-panel/process-io-card.tsx index b0badd05cd..25bcb19e78 100644 --- a/services/workbench2/src/views/process-panel/process-io-card.tsx +++ b/services/workbench2/src/views/process-panel/process-io-card.tsx @@ -555,9 +555,11 @@ const ProcessIOPreview = memo( const showLabel = data.some((param: ProcessIOParameter) => param.label); const hasMoreValues = (index: number) => ( - data[index+1] && !(data[index+1].id || data[index+1].label) + data[index+1] && !isMainRow(data[index+1]) ); + const isMainRow = (param: ProcessIOParameter) => (param && (param.id || param.label && !param.value.secondary)); + const RenderRow = ({index, style}) => { const param = data[index]; @@ -565,7 +567,10 @@ const ProcessIOPreview = memo( [classes.noBorderRow]: hasMoreValues(index), }; - return + return