[ARVADOS-WORKBENCH2] updated: 2.3.0-145-g5b88c131

Git user git at public.arvados.org
Thu Jan 27 05:02:32 UTC 2022


Summary of changes:
 cypress/integration/virtual-machine-admin.spec.js  | 37 ++++++++++++----------
 .../virtual-machine-user-panel.tsx                 |  2 +-
 2 files changed, 22 insertions(+), 17 deletions(-)

       via  5b88c131a4bbff645ab7791ce9d6c2e3dcca49a9 (commit)
      from  39f2ecd2cfa22d7dd6e1dc94f9952bd5c5c13ef2 (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 5b88c131a4bbff645ab7791ce9d6c2e3dcca49a9
Author: Stephen Smith <stephen at curii.com>
Date:   Thu Jan 27 00:02:05 2022 -0500

    18284: Try to fix cypress tests
    
    Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>

diff --git a/cypress/integration/virtual-machine-admin.spec.js b/cypress/integration/virtual-machine-admin.spec.js
index 534e7a9e..ea39d460 100644
--- a/cypress/integration/virtual-machine-admin.spec.js
+++ b/cypress/integration/virtual-machine-admin.spec.js
@@ -131,29 +131,34 @@ describe('Virtual machine login manage tests', function() {
         cy.loginAs(adminUser);
         cy.get('header button[title="Admin Panel"]').click();
         cy.get('#admin-menu').contains('Virtual Machines').click();
+
         cy.get('[data-cy=vm-admin-table]')
-            .contains(vmHost)
-            .parents('tr')
-            .within(() => {
-                // Remove user login
-                cy.get('div[role=button]').contains('user').parents('[role=button]').within(() => {
-                    cy.get('svg').click();
-                });
-            });
-        cy.get('[data-cy=confirmation-dialog-ok-btn]').click();
+            .contains('user'); // Wait for page to finish
 
         cy.get('[data-cy=vm-admin-table]')
             .contains(vmHost)
             .parents('tr')
+            .as('vmRow')
+            .contains('user')
+            .parents('[role=button]')
+            .find('svg')
+            .as('removeButton');
+        cy.get('@removeButton').click();
+        cy.get('[data-cy=confirmation-dialog-ok-btn]').click();
+
+        cy.get('@vmRow')
             .within(() => {
                 cy.get('div[role=button]').should('not.contain', 'user');
                 cy.get('div[role=button]').should('have.length', 1)
-
-                // Remove admin login
-                cy.get('div[role=button]').contains('admin').parents('[role=button]').within(() => {
-                    cy.get('svg').click();
-                });
             });
+
+            cy.get('@vmRow')
+            .find('div[role=button]')
+            .contains('admin')
+            .parents('[role=button]')
+            .find('svg')
+            .as('removeButton');
+        cy.get('@removeButton').click();
         cy.get('[data-cy=confirmation-dialog-ok-btn]').click();
 
         cy.get('[data-cy=vm-admin-table]')
@@ -167,7 +172,7 @@ describe('Virtual machine login manage tests', function() {
         cy.get('header button[title="Account Management"]').click();
         cy.get('#account-menu').contains('Virtual Machines').click();
 
-        cy.get('[data-cy=vm-user-table]')
+        cy.get('[data-cy=vm-user-panel]')
             .should('not.contain', vmHost);
 
         // Check activeUser's vm page for login
@@ -175,7 +180,7 @@ describe('Virtual machine login manage tests', function() {
         cy.get('header button[title="Account Management"]').click();
         cy.get('#account-menu').contains('Virtual Machines').click();
 
-        cy.get('[data-cy=vm-user-table]')
+        cy.get('[data-cy=vm-user-panel]')
             .should('not.contain', vmHost);
     });
 });
diff --git a/src/views/virtual-machine-panel/virtual-machine-user-panel.tsx b/src/views/virtual-machine-panel/virtual-machine-user-panel.tsx
index d0ee5634..66ea017e 100644
--- a/src/views/virtual-machine-panel/virtual-machine-user-panel.tsx
+++ b/src/views/virtual-machine-panel/virtual-machine-user-panel.tsx
@@ -112,7 +112,7 @@ export const VirtualMachineUserPanel = compose(
             render() {
                 const { virtualMachines, links } = this.props;
                 return (
-                    <Grid container spacing={16}>
+                    <Grid container spacing={16} data-cy="vm-user-panel">
                         {virtualMachines.itemsAvailable === 0 && <CardContentWithoutVirtualMachines {...this.props} />}
                         {virtualMachines.itemsAvailable > 0 && links.itemsAvailable > 0 && <CardContentWithVirtualMachines {...this.props} />}
                         {<CardSSHSection {...this.props} />}

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list