15557: Fix group manage tests
authorStephen Smith <stephen@curii.com>
Mon, 9 Jan 2023 22:33:01 +0000 (17:33 -0500)
committerStephen Smith <stephen@curii.com>
Mon, 9 Jan 2023 22:33:01 +0000 (17:33 -0500)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

cypress/integration/group-manage.spec.js

index ffe2c8c4dfd27ac892007213c2209b0afff4686c..38301dd46aa09a293acdb4b9a476231c5b095cc7 100644 (file)
@@ -70,6 +70,13 @@ describe('Group manage tests', function() {
                 cy.get('[data-cy=invite-people-field] input').type("other");
             });
         cy.get('[role=tooltip]').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').contains('Save').click();
         cy.get('.sharing-dialog').contains('Close').click();
 
@@ -109,6 +116,27 @@ describe('Group manage tests', function() {
             .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() {