[arvados-workbench2] updated: 2.7.0-216-g8997608d

git repository hosting git at public.arvados.org
Mon Nov 6 19:17:59 UTC 2023


Summary of changes:
 cypress/integration/side-panel.spec.js             | 36 ++++++++++++++++++++++
 .../side-panel-toggle/side-panel-toggle.tsx        |  2 +-
 .../side-panel/side-panel-collapsed.tsx            |  9 +++---
 3 files changed, 42 insertions(+), 5 deletions(-)

       via  8997608d0fae4eba9d92d7e363bdc6bb462e933d (commit)
       via  4288d7816f793b621fa8c70cb646c19136e05d2a (commit)
       via  599aa352ade599966cf2a4606a1e6a1776a0738d (commit)
      from  ef5e2f624a7f51fc326a7ef34e8c12134b108ab4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 8997608d0fae4eba9d92d7e363bdc6bb462e933d
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Mon Nov 6 14:17:55 2023 -0500

    19302: wrote navigation test Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js
index 80b1d81d..de6385d1 100644
--- a/cypress/integration/side-panel.spec.js
+++ b/cypress/integration/side-panel.spec.js
@@ -138,12 +138,37 @@ describe('Side panel tests', function() {
 
     it('collapses and un-collapses', () => {
 
-            cy.loginAs(activeUser)
-            
-            cy.get('[data-cy=side-panel-tree]').should('exist')
-            cy.get('[data-cy=side-panel-toggle]').click()
-            cy.get('[data-cy=side-panel-tree]').should('not.exist')
-            cy.get('[data-cy=side-panel-toggle]').click()
-            cy.get('[data-cy=side-panel-tree]').should('exist')
-        })
+        cy.loginAs(activeUser)
+        cy.get('[data-cy=side-panel-tree]').should('exist')
+        cy.get('[data-cy=side-panel-toggle]').click()
+        cy.get('[data-cy=side-panel-tree]').should('not.exist')
+        cy.get('[data-cy=side-panel-collapsed]').should('exist')
+        cy.get('[data-cy=side-panel-toggle]').click()
+        cy.get('[data-cy=side-panel-tree]').should('exist')
+        cy.get('[data-cy=side-panel-collapsed]').should('not.exist')
+    })
+
+    it.only('can navigate from collapsed panel', () => {
+
+        const collapsedCategories = {
+            'shared-with-me': '/shared-with-me',
+            'public-favorites': '/public-favorites',
+            'my-favorites': '/favorites',
+            groups: '/groups',
+            'all-processes': '/all_processes',
+            trash: '/trash',
+            'home-projects': `/projects/${activeUser.user.uuid}`,
+        }
+
+        cy.loginAs(activeUser)
+        cy.get('[data-cy=side-panel-tree]').should('exist')
+        cy.get('[data-cy=side-panel-toggle]').click()
+        cy.get('[data-cy=side-panel-collapsed]').should('exist')
+
+        for (const cat in collapsedCategories) {
+            cy.get(`[data-cy=collapsed-${cat}]`).should('exist').click()
+            cy.url().should('include', collapsedCategories[cat])
+        }
+    })
 })
+
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index 747966ac..1fd3af31 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -111,10 +111,11 @@ export const SidePanelCollapsed = withStyles(styles)(
 
         const { root, unselected, selected } = classes
         return (
-            <List className={root}>
+            <List data-cy="side-panel-collapsed" className={root}>
                 {sidePanelCollapsedCategories.map((cat) => (
                     <ListItem
                         key={cat.name}
+                        data-cy={`collapsed-${cat.name.toLowerCase().replace(/\s+/g, '-')}`}
                         className={selectedPath === cat.name ? selected : unselected}
                         onClick={() => handleClick(cat)}
                     >

commit 4288d7816f793b621fa8c70cb646c19136e05d2a
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Mon Nov 6 11:15:26 2023 -0500

    19302: cleanup Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js
index 2bab55e8..80b1d81d 100644
--- a/cypress/integration/side-panel.spec.js
+++ b/cypress/integration/side-panel.spec.js
@@ -136,7 +136,7 @@ describe('Side panel tests', function() {
         });
     });
 
-    it.only('collapses and un-collapses', () => {
+    it('collapses and un-collapses', () => {
 
             cy.loginAs(activeUser)
             
@@ -146,5 +146,4 @@ describe('Side panel tests', function() {
             cy.get('[data-cy=side-panel-toggle]').click()
             cy.get('[data-cy=side-panel-tree]').should('exist')
         })
-    // })
 })

commit 599aa352ade599966cf2a4606a1e6a1776a0738d
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Mon Nov 6 11:14:50 2023 -0500

    19302: wrote collapse spec Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js
index 92181150..2bab55e8 100644
--- a/cypress/integration/side-panel.spec.js
+++ b/cypress/integration/side-panel.spec.js
@@ -135,4 +135,16 @@ describe('Side panel tests', function() {
             });
         });
     });
+
+    it.only('collapses and un-collapses', () => {
+
+            cy.loginAs(activeUser)
+            
+            cy.get('[data-cy=side-panel-tree]').should('exist')
+            cy.get('[data-cy=side-panel-toggle]').click()
+            cy.get('[data-cy=side-panel-tree]').should('not.exist')
+            cy.get('[data-cy=side-panel-toggle]').click()
+            cy.get('[data-cy=side-panel-tree]').should('exist')
+        })
+    // })
 })
diff --git a/src/views-components/side-panel-toggle/side-panel-toggle.tsx b/src/views-components/side-panel-toggle/side-panel-toggle.tsx
index dada57d8..5c3069cd 100644
--- a/src/views-components/side-panel-toggle/side-panel-toggle.tsx
+++ b/src/views-components/side-panel-toggle/side-panel-toggle.tsx
@@ -29,7 +29,7 @@ const SidePanelToggle = (props: collapseButtonProps) => {
     }
 
     return <Tooltip disableFocusListener title="Toggle Side Panel">
-        <IconButton style={collapseButtonIconStyles.root} onClick={() => { props.toggleSidePanel(props.isCollapsed) }}>
+        <IconButton data-cy="side-panel-toggle" style={collapseButtonIconStyles.root} onClick={() => { props.toggleSidePanel(props.isCollapsed) }}>
             <div>
                 {props.isCollapsed ?
                     <img style={collapseButtonIconStyles.icon} src='/mui-start-icon.svg' alt='an arrow pointing right'/>
diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index 338d9b3e..747966ac 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -87,10 +87,10 @@ const sidePanelCollapsedCategories: TCollapsedCategory[] = [
     },
 ]
 
-const mapStateToProps = (state: RootState) => {
+const mapStateToProps = ({auth, properties }: RootState) => {
     return {
-        user: state.auth.user,
-        selectedPath: state.properties.breadcrumbs[0].label,
+        user: auth.user,
+        selectedPath: properties.breadcrumbs ? properties.breadcrumbs[0].label : SidePanelCollapsedCategory.PROJECTS,
     }
 }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list