21508: Fix process io cypress tests, remove image preview test
authorStephen Smith <stephen@curii.com>
Tue, 2 Apr 2024 20:32:47 +0000 (16:32 -0400)
committerStephen Smith <stephen@curii.com>
Tue, 2 Apr 2024 20:32:47 +0000 (16:32 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

services/workbench2/cypress/e2e/process.cy.js
services/workbench2/src/views/process-panel/process-io-card.tsx

index 2a5a62927fd981f09132d1a9c5eb6a1db9205c2f..33f820c50e53a59f843649164f7741addc9283e9 100644 (file)
@@ -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);
index b0badd05cd3c7e1286e29f27b615f5afe2bfe17a..25bcb19e78900b173eefcaf825b7d219dc8c91d9 100644 (file)
@@ -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 <TableRow style={style} className={classNames(rowClasses)}>
+            return <TableRow
+                style={style}
+                className={classNames(rowClasses)}
+                data-cy={isMainRow(param) ? "process-io-param" : ""}>
                 <TableCell>
                     <Tooltip title={param.id}>
                         <Typography className={classes.paramTableCellText}>