{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]')
group_class: 'filter',
properties: {filters: []},
}).as('myFavoriteFilterGroup').then(function (myFavoriteFilterGroup) {
- cy.contains('Refresh').click();
cy.goToPath(`/projects/${myFavoriteFilterGroup.uuid}`);
cy.get('[data-cy=breadcrumb-last]').should('contain', 'my-favorite-filter-group');
});
});
});
+
+ 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-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('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',
+ 'shell-access': '/virtual-machines-user',
+ '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])
+ }
+ })
})
+