17585: Added data-cy attribute
[arvados-workbench2.git] / src / components / collection-panel-files / collection-panel-files.tsx
index e5b88f2f16f2504766c1b5e597308bec2a5f564d..12dd554ce82965cdcafa2df1ccb1b3d807e4c66a 100644 (file)
@@ -235,6 +235,8 @@ export const CollectionPanelFiles = withStyles(styles)(connect((state: RootState
     React.useEffect(() => {
         if (rightKey) {
             fetchData(rightKey);
+            setLeftSearch('');
+            setRightSearch('');
         }
     }, [rightKey]); // eslint-disable-line react-hooks/exhaustive-deps
 
@@ -376,7 +378,7 @@ export const CollectionPanelFiles = withStyles(styles)(connect((state: RootState
     );
 
     return (
-        <div onClick={handleClick} ref={parentRef}>
+        <div data-cy="collection-files-panel" onClick={handleClick} ref={parentRef}>
             <div className={classes.pathPanel}>
                 {
                     path