19302: wrote collapse spec Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox@curii...
[arvados-workbench2.git] / cypress / integration / side-panel.spec.js
index fc2052cc13afb11311512589185c9ac60f5eed45..2bab55e861ce641c40b73b1bf39a0ee98e3312dc 100644 (file)
@@ -62,11 +62,10 @@ describe('Side panel tests', function() {
             {url: '/shared-with-me', label: 'Shared with me'},
             {url: '/public-favorites', label: 'Public Favorites'},
             {url: '/favorites', label: 'My Favorites'},
-            // {url: '/workflows', label: 'Workflows'},
             {url: '/all_processes', label: 'All Processes'},
             {url: '/trash', label: 'Trash'},
         ].map(function(section) {
-            cy.goToPath(section.url);
+            cy.waitForDom().goToPath(section.url);
             cy.get('[data-cy=breadcrumb-first]')
                 .should('contain', section.label);
             cy.get('[data-cy=side-panel-button]')
@@ -136,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')
+        })
+    // })
 })