From 4fb8aef56f7c8077cefb049dbb1f92709a865f58 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Kuty=C5=82a?= Date: Sun, 14 Nov 2021 19:50:42 +0100 Subject: [PATCH] 18195: Added additional checks to the cypress test MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła --- cypress/integration/side-panel.spec.js | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js index 59e143ee69..f9d4dca340 100644 --- a/cypress/integration/side-panel.spec.js +++ b/cypress/integration/side-panel.spec.js @@ -115,36 +115,29 @@ describe('Side panel tests', function() { }); it('side panel react to refresh when project data changes', () => { - const project1 = 'writableProject1'; - const project2 = 'writableProject2'; + const project = 'writableProject'; cy.createProject({ owningUser: activeUser, targetUser: activeUser, - projectName: project1, + projectName: project, canWrite: true, addToFavorites: false }); - cy.createProject({ - owningUser: activeUser, - targetUser: activeUser, - projectName: project2, - canWrite: true, - addToFavorites: false - }); - - cy.getAll('@writableProject1', '@writableProject2') - .then(function ([writableProject1, writableProject2]) { + cy.getAll('@writableProject') + .then(function ([writableProject]) { cy.loginAs(activeUser); cy.get('[data-cy=side-panel-tree]').contains('Projects').click(); - cy.trashGroup(activeUser.token, writableProject2.uuid); + cy.get('[data-cy=side-panel-tree]').contains(writableProject.name).should('exist'); + + cy.trashGroup(activeUser.token, writableProject.uuid); cy.contains('Refresh').click(); - cy.contains(writableProject2.name).should('not.exist'); + cy.contains(writableProject.name).should('not.exist'); }); }); }) -- 2.30.2