Merge branch '16647-Responsible-person'
authorDaniel Kutyła <daniel.kutyla@contractors.roche.com>
Fri, 21 May 2021 22:06:39 +0000 (00:06 +0200)
committerDaniel Kutyła <daniel.kutyla@contractors.roche.com>
Fri, 21 May 2021 22:06:51 +0000 (00:06 +0200)
closes #16647

Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla@contractors.roche.com>

1  2 
cypress/integration/collection.spec.js

index c6d29b2c06c8183a651380dc20168e739b940826,75be94f9ad2102d9ba1aa92e6573fe1ad09cbb88..797a9d49fedf4838a8dfdc2619600a644dcbbe40
@@@ -103,8 -103,7 +103,7 @@@ describe('Collection panel tests', func
                  cy.doRequest('GET', `/arvados/v1/collections/${this.testCollection.uuid}`)
                      .its('body').as('collection')
                      .then(function () {
-                         expect(this.collection.properties).to.deep.equal(
-                             { IDTAGCOLORS: 'IDVALCOLORS3' });
+                         expect(this.collection.properties.IDTAGCOLORS).to.equal('IDVALCOLORS3');
                      });
              });
      });
                      cy.get('[data-cy=form-dialog]')
                          .should('contain', 'Rename')
                          .within(() => {
 -                            cy.get('input').type(`{selectall}{backspace}${to}`);
 +                            cy.get('input')
 +                                .type('{selectall}{backspace}')
 +                                .type(to, { parseSpecialCharSequences: false });
                          });
                      cy.get('[data-cy=form-submit-btn]').click();
                      cy.get('[data-cy=collection-files-panel]')
          // Create new collection
          cy.get('[data-cy=side-panel-button]').click();
          cy.get('[data-cy=side-panel-new-collection]').click();
 -        const collName = `Test collection (${Math.floor(999999 * Math.random())})`;
 +        // Name between brackets tests bugfix #17582
 +        const collName = `[Test collection (${Math.floor(999999 * Math.random())})]`;
          cy.get('[data-cy=form-dialog]')
              .should('contain', 'New collection')
              .within(() => {
          cy.get('[data-cy=breadcrumb-first]').should('contain', 'Projects');
          cy.get('[data-cy=breadcrumb-last]').should('contain', collName);
      });
+     it.only('shows responsible person for collection if available', () => {
+         cy.createCollection(adminUser.token, {
+             name: `Test collection ${Math.floor(Math.random() * 999999)}`,
+             owner_uuid: activeUser.user.uuid,
+             manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
+         })
+             .as('testCollection1');
+         cy.createCollection(adminUser.token, {
+             name: `Test collection ${Math.floor(Math.random() * 999999)}`,
+             owner_uuid: adminUser.user.uuid,
+             manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
+         })
+             .as('testCollection2').then(function (testCollection2) {
+                 cy.shareWith(adminUser.token, activeUser.user.uuid, testCollection2.uuid, 'can_write');
+             });
+         cy.getAll('@testCollection1', '@testCollection2')
+             .then(function ([testCollection1, testCollection2]) {
+                 cy.loginAs(activeUser);
+                 cy.goToPath(`/collections/${testCollection1.uuid}`);
+                 cy.get('[data-cy=responsible-person-wrapper]')
+                     .contains(activeUser.user.uuid);
+                 cy.goToPath(`/collections/${testCollection2.uuid}`);
+                 cy.get('[data-cy=responsible-person-wrapper]')
+                     .contains(adminUser.user.uuid);
+             });
+     });
  })