X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/40ad26356794ff381c4cecb35141417dad0807ea..3c3126fed9f0d045644402b8ad4f6bc35a05db80:/cypress/integration/side-panel.spec.js diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js index 2e31ec66..fc2052cc 100644 --- a/cypress/integration/side-panel.spec.js +++ b/cypress/integration/side-panel.spec.js @@ -62,7 +62,7 @@ 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: '/workflows', label: 'Workflows'}, {url: '/all_processes', label: 'All Processes'}, {url: '/trash', label: 'Trash'}, ].map(function(section) { @@ -82,7 +82,6 @@ describe('Side panel tests', function() { 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'); @@ -104,14 +103,37 @@ describe('Side panel tests', function() { cy.getAll('@mySharedWritableProject') .then(function ([mySharedWritableProject]) { cy.loginAs(activeUser); - + cy.get('[data-cy=side-panel-tree]').contains('Projects').click(); const newProjectName = `New project name ${mySharedWritableProject.name}`; const newProjectDescription = `New project description ${mySharedWritableProject.name}`; - cy.editProjectOrCollection('[data-cy=side-panel-tree]', mySharedWritableProject.name, newProjectName, newProjectDescription); + cy.testEditProjectOrCollection('[data-cy=side-panel-tree]', mySharedWritableProject.name, newProjectName, newProjectDescription); }); }); + it('side panel react to refresh when project data changes', () => { + const project = 'writableProject'; + + cy.createProject({ + owningUser: activeUser, + targetUser: activeUser, + projectName: project, + canWrite: true, + addToFavorites: false + }); + + cy.getAll('@writableProject').then(function ([writableProject]) { + cy.loginAs(activeUser); + cy.get('[data-cy=side-panel-tree]') + .contains('Projects').click(); + cy.get('[data-cy=side-panel-tree]') + .contains(writableProject.name).should('exist'); + cy.trashGroup(activeUser.token, writableProject.uuid).then(() => { + cy.contains('Refresh').click(); + cy.contains(writableProject.name).should('not.exist'); + }); + }); + }); })