Add test guards to wait for progress bar to complete before continuing
[arvados-workbench2.git] / src / views / main-panel / main-panel-root.tsx
index 5806f5b8276593a7a101f66f7ef3c39bdf6f2f6e..8f41ff3d96d1965ca1a5f1e07a71714ac3e30a9a 100644 (file)
@@ -31,13 +31,14 @@ export interface MainPanelRootDataProps {
     isNotLinking: boolean;
     isLinkingPath: boolean;
     siteBanner: string;
+    sessionIdleTimeout: number;
 }
 
 type MainPanelRootProps = MainPanelRootDataProps & WithStyles<CssRules>;
 
 export const MainPanelRoot = withStyles(styles)(
     ({ classes, loading, working, user, buildInfo, uuidPrefix,
-        isNotLinking, isLinkingPath, siteBanner }: MainPanelRootProps) =>
+        isNotLinking, isLinkingPath, siteBanner, sessionIdleTimeout }: MainPanelRootProps) =>
         loading
             ? <WorkbenchLoadingScreen />
             : <>
@@ -47,13 +48,13 @@ export const MainPanelRoot = withStyles(styles)(
                     uuidPrefix={uuidPrefix}
                     siteBanner={siteBanner}>
                     {working
-                        ? <LinearProgress color="secondary" />
+                        ? <LinearProgress color="secondary" data-cy="linear-progress" />
                         : null}
                 </MainAppBar>}
                 <Grid container direction="column" className={classes.root}>
                     {user
                         ? (user.isActive || (!user.isActive && isLinkingPath)
-                            ? <WorkbenchPanel isNotLinking={isNotLinking} isUserActive={user.isActive} />
+                            ? <WorkbenchPanel isNotLinking={isNotLinking} isUserActive={user.isActive} sessionIdleTimeout={sessionIdleTimeout} />
                             : <InactivePanel />)
                         : <LoginPanel />}
                 </Grid>