[ARVADOS-WORKBENCH2] updated: 2.1.0-433-g49708fe5

Git user git at public.arvados.org
Tue Jul 6 20:36:32 UTC 2021


Summary of changes:
 cypress/integration/favorites.spec.js  | 22 ++++++++--------------
 cypress/integration/sharing.spec.js    |  2 +-
 cypress/integration/side-panel.spec.js |  2 +-
 cypress/support/commands.js            |  4 ++--
 4 files changed, 12 insertions(+), 18 deletions(-)

       via  49708fe59337193ec9d00034ccd765a90536f69e (commit)
      from  40ad26356794ff381c4cecb35141417dad0807ea (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 49708fe59337193ec9d00034ccd765a90536f69e
Author: Daniel Kutyła <daniel.kutyla at contractors.roche.com>
Date:   Tue Jul 6 22:35:39 2021 +0200

    16971: Fixed failing tests
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla at contractors.roche.com>

diff --git a/cypress/integration/favorites.spec.js b/cypress/integration/favorites.spec.js
index d81ad811..9f4e2b84 100644
--- a/cypress/integration/favorites.spec.js
+++ b/cypress/integration/favorites.spec.js
@@ -135,22 +135,21 @@ describe('Favorites tests', function () {
     it('can edit project and collections in favorites', () => {
         cy.createProject({
             owningUser: adminUser,
-            targetUser: activeUser,
             projectName: 'mySharedWritableProject',
             canWrite: true,
             addToFavorites: true
         });
 
         cy.createCollection(adminUser.token, {
-            owner_uuid: activeUser.user.uuid,
+            owner_uuid: adminUser.user.uuid,
             name: `Test target collection ${Math.floor(Math.random() * 999999)}`,
         }).as('testTargetCollection').then(function (testTargetCollection) {
-            cy.addToFavorites(activeUser.token, activeUser.user.uuid, testTargetCollection.uuid);
+            cy.addToFavorites(adminUser.token, adminUser.user.uuid, testTargetCollection.uuid);
         });
 
         cy.getAll('@mySharedWritableProject', '@testTargetCollection')
             .then(function ([mySharedWritableProject, testTargetCollection]) {
-                cy.loginAs(activeUser);
+                cy.loginAs(adminUser);
                 
                 cy.get('[data-cy=side-panel-tree]').contains('My Favorites').click();
 
@@ -159,14 +158,9 @@ describe('Favorites tests', function () {
                 const newCollectionName = `New collection name ${testTargetCollection.name}`;
                 const newCollectionDescription = `New collection description ${testTargetCollection.name}`;
 
-                cy.editProjectOrCollection('main', mySharedWritableProject.name, newProjectName, newProjectDescription);
-                cy.editProjectOrCollection('main', testTargetCollection.name, newCollectionName, newCollectionDescription, false);
-
-                cy.get('main').contains(newProjectName).rightclick();
-                cy.contains('Remove from favorites').click();
-                cy.get('main').contains(newCollectionName).rightclick();
-                cy.contains('Remove from favorites').click();
-
+                cy.testEditProjectOrCollection('main', mySharedWritableProject.name, newProjectName, newProjectDescription);
+                cy.testEditProjectOrCollection('main', testTargetCollection.name, newCollectionName, newCollectionDescription, false);
+                
                 cy.get('[data-cy=side-panel-tree]').contains('Projects').click();
 
                 cy.get('main').contains(newProjectName).rightclick();
@@ -176,8 +170,8 @@ describe('Favorites tests', function () {
 
                 cy.get('[data-cy=side-panel-tree]').contains('Public Favorites').click();
 
-                cy.editProjectOrCollection('main', newProjectName, mySharedWritableProject.name, 'newProjectDescription');
-                cy.editProjectOrCollection('main', newCollectionName, testTargetCollection.name, 'newCollectionDescription', false); 
+                cy.testEditProjectOrCollection('main', newProjectName, mySharedWritableProject.name, 'newProjectDescription');
+                cy.testEditProjectOrCollection('main', newCollectionName, testTargetCollection.name, 'newCollectionDescription', false); 
             });
     });
 
diff --git a/cypress/integration/sharing.spec.js b/cypress/integration/sharing.spec.js
index 4f4c2eb3..c5664e3b 100644
--- a/cypress/integration/sharing.spec.js
+++ b/cypress/integration/sharing.spec.js
@@ -97,7 +97,7 @@ describe('Sharing tests', function () {
                 const newProjectName = `New project name ${mySharedWritableProject.name}`;
                 const newProjectDescription = `New project description ${mySharedWritableProject.name}`;
 
-                cy.editProjectOrCollection('main', mySharedWritableProject.name, newProjectName, newProjectDescription);
+                cy.testEditProjectOrCollection('main', mySharedWritableProject.name, newProjectName, newProjectDescription);
             });
     });
 });
\ No newline at end of file
diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js
index 2e31ec66..912e68eb 100644
--- a/cypress/integration/side-panel.spec.js
+++ b/cypress/integration/side-panel.spec.js
@@ -110,7 +110,7 @@ describe('Side panel tests', function() {
                 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);
             });
     });
 
diff --git a/cypress/support/commands.js b/cypress/support/commands.js
index 97bb2450..069ed96d 100644
--- a/cypress/support/commands.js
+++ b/cypress/support/commands.js
@@ -193,12 +193,12 @@ Cypress.Commands.add(
 )
 
 Cypress.Commands.add(
-    "editProjectOrCollection", (container, oldName, newName, newDescription, isProject = true) => {
+    "testEditProjectOrCollection", (container, oldName, newName, newDescription, isProject = true) => {
         cy.get(container).contains(oldName).rightclick();
         cy.get('[data-cy=context-menu]').contains(isProject ? 'Edit project' : 'Edit collection').click();
         cy.get('[data-cy=form-dialog]').within(() => {
             cy.get('input[name=name]').clear().type(newName);
-            cy.get(isProject ? 'div[contenteditable=true]' : 'input[name=description]').type(newDescription);
+            cy.get(isProject ? 'div[contenteditable=true]' : 'input[name=description]').clear().type(newDescription);
             cy.get('[data-cy=form-submit-btn]').click();
         });
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list