X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/17048236a8bd8e53680d9632ff3eafa8cdf21b01..a51d9df296fa297f2b21201d497ed48b4639c8e9:/cypress/integration/side-panel.spec.js diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js index 59e143ee..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}`; @@ -115,36 +114,26 @@ describe('Side panel tests', function() { }); it('side panel react to refresh when project data changes', () => { - const project1 = 'writableProject1'; - const project2 = 'writableProject2'; - - cy.createProject({ - owningUser: activeUser, - targetUser: activeUser, - projectName: project1, - canWrite: true, - addToFavorites: false - }); + const project = 'writableProject'; cy.createProject({ owningUser: activeUser, targetUser: activeUser, - projectName: project2, + projectName: project, canWrite: true, addToFavorites: false }); - cy.getAll('@writableProject1', '@writableProject2') - .then(function ([writableProject1, writableProject2]) { - cy.loginAs(activeUser); - - cy.get('[data-cy=side-panel-tree]').contains('Projects').click(); - - cy.trashGroup(activeUser.token, writableProject2.uuid); - + 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(writableProject2.name).should('not.exist'); + cy.contains(writableProject.name).should('not.exist'); }); + }); }); })