[ARVADOS-WORKBENCH2] updated: 2.3.0-49-g5ea93d2e

Git user git at public.arvados.org
Wed Dec 1 21:07:35 UTC 2021


Summary of changes:
 cypress/integration/group-manage.spec.js         | 25 ++++++++++++++++++++++++
 src/views-components/data-explorer/renderers.tsx |  2 +-
 2 files changed, 26 insertions(+), 1 deletion(-)

       via  5ea93d2e3c077f9cad78f8176a903ced7ceea62e (commit)
      from  2ec7fa451c0970c15c0b0d35fe70e473889f9ea3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 5ea93d2e3c077f9cad78f8176a903ced7ceea62e
Author: Stephen Smith <stephen at curii.com>
Date:   Wed Dec 1 16:07:16 2021 -0500

    18123: Add tests for disabling actions on built-in groups.
    
    Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>

diff --git a/cypress/integration/group-manage.spec.js b/cypress/integration/group-manage.spec.js
index c187320c..d17cefe9 100644
--- a/cypress/integration/group-manage.spec.js
+++ b/cypress/integration/group-manage.spec.js
@@ -236,4 +236,29 @@ describe('Group manage tests', function() {
             .should('not.contain', groupName + ' (renamed)');
     });
 
+    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=side-panel-tree]').contains('Groups').click();
+            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-member-add]').should('not.exist');
+                    cy.get('[data-cy=user-hidden-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');
+                });
+
+            // 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=resource-delete-button]').should('be.disabled');
+                cy.get('[data-cy=edit-permission-button]').should('not.exist');
+            });
+        });
+    });
+
 });
diff --git a/src/views-components/data-explorer/renderers.tsx b/src/views-components/data-explorer/renderers.tsx
index 5040746a..84d5c569 100644
--- a/src/views-components/data-explorer/renderers.tsx
+++ b/src/views-components/data-explorer/renderers.tsx
@@ -463,7 +463,7 @@ const renderPermissionLevel = (dispatch: Dispatch, link: LinkResource, canManage
     return <Typography noWrap>
         {formatPermissionLevel(link.name as PermissionLevel)}
         {canManage ?
-            <IconButton onClick={(event) => dispatch<any>(openPermissionEditContextMenu(event, link))}>
+            <IconButton data-cy="edit-permission-button" onClick={(event) => dispatch<any>(openPermissionEditContextMenu(event, link))}>
                 <RenameIcon />
             </IconButton> :
             ''

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list