X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/7edd5a7c86af0814f8a2282aa266a9d1a604a45f..65ad44ac98393e9e7a7f3da8732b536fc051cf51:/cypress/integration/side-panel.spec.js diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js index 912e68eb..4c824d32 100644 --- a/cypress/integration/side-panel.spec.js +++ b/cypress/integration/side-panel.spec.js @@ -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,7 +103,7 @@ 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}`; @@ -114,4 +113,27 @@ describe('Side panel tests', function() { }); }); + 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'); + }); + }); + }); })