cy.get('[data-cy=invite-people-field] input').type("other");
});
cy.get('[role=tooltip]').click();
- cy.get('.sharing-dialog').contains('Save').click();
+ // Add admin to the group
+ cy.get('.sharing-dialog')
+ .should('contain', 'Sharing settings')
+ .within(() => {
+ cy.get('[data-cy=invite-people-field] input').type("admin");
+ });
+ cy.get('[role=tooltip]').click();
+ cy.get('.sharing-dialog').get('[data-cy=add-invited-people]').click();
cy.get('.sharing-dialog').contains('Close').click();
// Check that both users are present with appropriate permissions
.within(() => {
cy.contains('Write');
});
+
+ // Change admin to manage
+ cy.get('[data-cy=group-members-data-explorer]')
+ .contains(adminUser.user.full_name)
+ .parents('tr')
+ .within(() => {
+ cy.contains('Read')
+ .parents('td')
+ .within(() => {
+ cy.get('button').click();
+ });
+ });
+ cy.get('[data-cy=context-menu]')
+ .contains('Manage')
+ .click();
+ cy.get('[data-cy=group-members-data-explorer]')
+ .contains(adminUser.user.full_name)
+ .parents('tr')
+ .within(() => {
+ cy.contains('Manage');
+ });
});
it('can unhide and re-hide users', function() {
});
it('renames the group', function() {
+ cy.loginAs(adminUser);
// Navigate to Groups
cy.get('[data-cy=side-panel-tree]').contains('Groups').click();
.should('not.contain', groupName + ' (renamed)');
});
- it.only('disables group-related controls for built-in groups', function() {
+ it('disables group-related controls for built-in groups', function() {
cy.loginAs(adminUser);
['All users', 'Anonymous users', 'System group'].forEach((builtInGroup) => {
cy.get('[data-cy=groups-panel-data-explorer]').contains(builtInGroup).click();
// Check group member actions
- // cy.get('[data-cy=group-members-data-explorer]')
- // .within(() => {
+ cy.get('[data-cy=group-members-data-explorer]')
+ .within(() => {
cy.get('[data-cy=group-member-add]').should('not.exist');
cy.get('[data-cy=user-visible-checkbox] input').should('be.disabled');
cy.get('[data-cy=resource-delete-button]').should('be.disabled');
- // cy.get('[data-cy=edit-permission-button]').should('not.exist');
- // });
+ cy.get('[data-cy=edit-permission-button]').should('not.exist');
+ });
// Check permissions actions
cy.get('[data-cy=group-details-permissions-tab]').click();
- // cy.get('[data-cy=group-permissions-data-explorer]').within(() => {
+ cy.get('[data-cy=group-permissions-data-explorer]').within(() => {
cy.get('[data-cy=resource-delete-button]').should('be.disabled');
cy.get('[data-cy=edit-permission-button]').should('not.exist');
- // });
+ });
});
});