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
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>;
}
buttonVisible: isButtonVisible(state),
projectUuid: state.detailsPanel.resourceUuid,
}), (dispatch) => ({
- onDetailsPanelToggle: toggleDetailsPanel,
+ onDetailsPanelToggle: () => dispatch<any>(toggleDetailsPanel()),
onRefreshButtonClick: (id) => {
dispatch<any>(loadSidePanelTreeProjects(id));
dispatch<any>(reloadProjectMatchingUuid([id]));
</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>}
);
const required = (value: string[]) =>
- value.length > 0
+ value && value.length > 0
? undefined
: ERROR_MESSAGE;
);
const required = (value: string[]) =>
- value.length > 0
+ value && value.length > 0
? undefined
: ERROR_MESSAGE;
);
const required = (value: string[] = []) =>
- value.length > 0
+ value && value.length > 0
? undefined
: ERROR_MESSAGE;