- properties: {someKey: 'someValue'},
- manifest_text: `. 37b51d194a7513e45b56f6524f2d51f2+3 0:3:${fileName}\n`})
- .as('testCollection').then(function() {
- // Share the group with active user.
- cy.createLink(adminUser.token, {
- name: isWritable ? 'can_write' : 'can_read',
- link_class: 'permission',
- head_uuid: this.sharedGroup.uuid,
- tail_uuid: activeUser.user.uuid
- })
- cy.doSearch(`${this.testCollection.uuid}`);
-
- // Check that name & uuid are correct.
- cy.get('[data-cy=collection-info-panel]')
- .should('contain', this.testCollection.name)
- .and('contain', this.testCollection.uuid)
- .and('not.contain', 'This is an old version');
- // Check for the read-only icon
- cy.get('[data-cy=read-only-icon]').should(`${isWritable ? 'not.' : ''}exist`);
- // Check that both read and write operations are available on
- // the 'More options' menu.
- cy.get('[data-cy=collection-panel-options-btn]')
- .click()
- cy.get('[data-cy=context-menu]')
- .should('contain', 'Add to favorites')
- .and(`${isWritable ? '' : 'not.'}contain`, 'Edit collection');
- cy.get('body').click(); // Collapse the menu avoiding details panel expansion
- cy.get('[data-cy=collection-properties-panel]')
- .should('contain', 'someKey')
- .and('contain', 'someValue')
- .and('not.contain', 'anotherKey')
- .and('not.contain', 'anotherValue')
- if (isWritable === true) {
- // Check that properties can be added.
- cy.get('[data-cy=resource-properties-form]').within(() => {
- cy.get('[data-cy=property-field-key]').within(() => {
- cy.get('input').type('anotherKey');
- });
- cy.get('[data-cy=property-field-value]').within(() => {
- cy.get('input').type('anotherValue');
- });
- cy.root().submit();
+ properties: { someKey: 'someValue' },
+ manifest_text: `. 37b51d194a7513e45b56f6524f2d51f2+3 0:3:${fileName}\n`
+ })
+ .as('testCollection').then(function () {
+ // Share the group with active user.
+ cy.createLink(adminUser.token, {
+ name: isWritable ? 'can_write' : 'can_read',
+ link_class: 'permission',
+ head_uuid: this.sharedGroup.uuid,
+ tail_uuid: activeUser.user.uuid