);
});
- beforeEach(function() {
- cy.clearCookies();
- cy.clearLocalStorage();
- });
-
it('creates a new group', function() {
cy.loginAs(activeUser);
// Create new group
cy.get('[data-cy=groups-panel-new-group]').click();
cy.get('[data-cy=form-dialog]')
- .should('contain', 'Create Group')
+ .should('contain', 'New Group')
.within(() => {
cy.get('input[name=name]').type(groupName);
cy.get('[data-cy=users-field] input').type("three");
});
cy.get('[role=tooltip]').click();
- cy.get('[data-cy=form-dialog] button[type=submit]').click();
-
+ cy.get('[data-cy=form-dialog]').within(() => {
+ cy.get('[data-cy=form-submit-btn]').click();
+ })
+
// Check that the group was created
cy.get('[data-cy=groups-panel-data-explorer]').contains(groupName).click();
cy.get('[data-cy=group-members-data-explorer]').contains(activeUser.user.full_name);
});
cy.get('[role=tooltip]').click();
cy.get('.sharing-dialog').contains('Save').click();
+ cy.get('.sharing-dialog').contains('Close').click();
// Check that both users are present with appropriate permissions
cy.get('[data-cy=group-members-data-explorer]')
.should('contain', 'Edit Group')
.within(() => {
cy.get('input[name=name]').clear().type(groupName + ' (renamed)');
- cy.get('button[type=submit]').click();
+ cy.get('button').contains('Save').click();
});
// Check that the group was renamed