Merge branch '18484-collection-manifest-fix' into main. Closes #18484.
authorLucas Di Pentima <lucas.dipentima@curii.com>
Wed, 1 Dec 2021 20:36:55 +0000 (17:36 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Wed, 1 Dec 2021 20:36:55 +0000 (17:36 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

cypress/integration/project.spec.js
src/components/chips/chips.tsx
src/views-components/main-content-bar/main-content-bar.tsx
src/views/run-process-panel/inputs/float-array-input.tsx
src/views/run-process-panel/inputs/int-array-input.tsx
src/views/run-process-panel/inputs/string-array-input.tsx

index af2d93e3c605ec79f1538c9224ce09800489bbfd..1c1759523ea0243113d0dd41fcbecbcfe636b257 100644 (file)
@@ -179,4 +179,19 @@ describe('Project tests', function() {
             cy.get('[data-cy=not-found-page]').should('not.exist');
         });
     });
+
+    it('shows details panel when clicking on the info icon', () => {
+        cy.createGroup(activeUser.token, {
+            name: `Test root project ${Math.floor(Math.random() * 999999)}`,
+            group_class: 'project',
+        }).as('testRootProject').then(function(testRootProject) {
+            cy.loginAs(activeUser);
+
+            cy.get('[data-cy=side-panel-tree]').contains(testRootProject.name).click();
+
+            cy.get('[data-cy=additional-info-icon]').click();
+
+            cy.contains(testRootProject.uuid).should('exist');
+        });
+    });
 });
\ No newline at end of file
index eb68ed7a257942a6fb554f80b544089d93fcaa43..c4724d1bb1a8d9b0ffcb3c79b6127c1a1fddd6c1 100644 (file)
@@ -38,7 +38,7 @@ export const Chips = withStyles(styles)(
         render() {
             const { values, filler } = this.props;
             return <Grid container spacing={8} className={this.props.classes.root}>
-                {values.map(this.renderChip)}
+                {values && values.map(this.renderChip)}
                 {filler && <Grid item xs>{filler}</Grid>}
             </Grid>;
         }
index 10ae1790da29cff215bb48de177f08bce707ad08..480150cb45daec040f12d05d27f3ccc3043cfdf6 100644 (file)
@@ -60,7 +60,7 @@ export const MainContentBar =
         buttonVisible: isButtonVisible(state),
         projectUuid: state.detailsPanel.resourceUuid,
     }), (dispatch) => ({
-            onDetailsPanelToggle: toggleDetailsPanel,
+            onDetailsPanelToggle: () => dispatch<any>(toggleDetailsPanel()),
             onRefreshButtonClick: (id) => {
                 dispatch<any>(loadSidePanelTreeProjects(id));
                 dispatch<any>(reloadProjectMatchingUuid([id]));
@@ -80,7 +80,7 @@ export const MainContentBar =
                             </Grid>
                             <Grid item>
                                 {props.buttonVisible && <Tooltip title="Additional Info">
-                                    <IconButton color="inherit" className={props.classes.infoTooltip} onClick={props.onDetailsPanelToggle}>
+                                    <IconButton data-cy="additional-info-icon" color="inherit" className={props.classes.infoTooltip} onClick={props.onDetailsPanelToggle}>
                                         <DetailsIcon />
                                     </IconButton>
                                 </Tooltip>}
index 780cbc90fedc7e8a45e93b798fd3843c433a3d6d..3f0a5334fa468c2deba7095435937bd0e2ef3bac 100644 (file)
@@ -30,7 +30,7 @@ const validationSelector = createSelector(
 );
 
 const required = (value: string[]) =>
-    value.length > 0
+    value && value.length > 0
         ? undefined
         : ERROR_MESSAGE;
 
index 03cb07ea3e1368ec3829e502a2b26376356471f0..8077f28a600342cf95b3e77cf0980a17a4b30d0c 100644 (file)
@@ -30,7 +30,7 @@ const validationSelector = createSelector(
 );
 
 const required = (value: string[]) =>
-    value.length > 0
+    value && value.length > 0
         ? undefined
         : ERROR_MESSAGE;
 
index cabbf749816fa844f4293418daa7298a176f2686..8955009a0d52984a9393b675e9721825f4a746d0 100644 (file)
@@ -31,7 +31,7 @@ const validationSelector = createSelector(
 );
 
 const required = (value: string[] = []) =>
-    value.length > 0
+    value && value.length > 0
         ? undefined
         : ERROR_MESSAGE;