[arvados-workbench2] updated: 2.7.0-253-gce2481a0

git repository hosting git at public.arvados.org
Tue Dec 12 15:26:00 UTC 2023


Summary of changes:
 cypress/integration/multiselect-toolbar.spec.js | 26 ----------------
 cypress/integration/project.spec.js             | 41 +++++++++++++++++++++++++
 src/components/data-table/data-table.tsx        |  2 ++
 3 files changed, 43 insertions(+), 26 deletions(-)

       via  ce2481a00cf013ad76ba9e0ca82519e9e82c3a1c (commit)
      from  6d2f10b6bd29751bf71c38a40d56f806bf894ad9 (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 ce2481a00cf013ad76ba9e0ca82519e9e82c3a1c
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Tue Dec 12 10:25:53 2023 -0500

    21128: moved toolbar test into project spec Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/cypress/integration/multiselect-toolbar.spec.js b/cypress/integration/multiselect-toolbar.spec.js
index 72df1e5d..4a379215 100644
--- a/cypress/integration/multiselect-toolbar.spec.js
+++ b/cypress/integration/multiselect-toolbar.spec.js
@@ -34,30 +34,4 @@ describe('Multiselect Toolbar Tests', () => {
         cy.get('[data-cy=multiselect-button]').should('not.exist');
         cy.get('[data-cy=multiselect-alt-button]').should('not.exist');
     });
-
-    it('can manipulate a project resource', () => {
-        cy.loginAs(activeUser);
-        const projName = `Test project (${Math.floor(999999 * Math.random())})`;
-        cy.get('[data-cy=side-panel-button]').click();
-        cy.get('[data-cy=side-panel-new-project]').click();
-        cy.get('[data-cy=form-dialog]')
-            .should('contain', 'New Project')
-            .within(() => {
-                cy.get('[data-cy=name-field]').within(() => {
-                    cy.get('input').type(projName);
-                });
-            })
-        cy.get("[data-cy=form-submit-btn]").click();
-        cy.waitForDom()
-        cy.go('back')
-
-        cy.get('[data-cy=data-table-row]').contains(projName).should('exist').parent().parent().parent().click()
-        cy.get('[data-cy=multiselect-button]').should('have.length', 12).eq(3).trigger('mouseover');
-        cy.get('body').contains('Edit project').should('exist')
-        cy.get('[data-cy=multiselect-button]').eq(3).click()
-        cy.get("[data-cy=form-dialog]").within(() => {
-            cy.get("div[contenteditable=true]").click().type('this is a test');
-            cy.get("[data-cy=form-submit-btn]").click();
-        });
-    });
 });
diff --git a/cypress/integration/project.spec.js b/cypress/integration/project.spec.js
index e4d7be87..4ad6142e 100644
--- a/cypress/integration/project.spec.js
+++ b/cypress/integration/project.spec.js
@@ -180,6 +180,47 @@ describe("Project tests", function () {
         verifyProjectDescription(projName, null);
     });
 
+    it('shows the appropriate buttons in the multiselect toolbar', () => {
+
+        const msButtonTooltips = [
+            'API Details',
+            'Add to Favorites',
+            'Copy to clipboard',
+            'Edit project',
+            'Freeze Project',
+            'Move to',
+            'Move to trash',
+            'New project',
+            'Open in new tab',
+            'Open with 3rd party client',
+            'Share',
+            'View details',
+        ];
+
+        cy.loginAs(activeUser);
+        const projName = `Test project (${Math.floor(999999 * Math.random())})`;
+        cy.get('[data-cy=side-panel-button]').click();
+        cy.get('[data-cy=side-panel-new-project]').click();
+        cy.get('[data-cy=form-dialog]')
+            .should('contain', 'New Project')
+            .within(() => {
+                cy.get('[data-cy=name-field]').within(() => {
+                    cy.get('input').type(projName);
+                });
+            })
+        cy.get("[data-cy=form-submit-btn]").click();
+        cy.waitForDom()
+        cy.go('back')
+
+        cy.get('[data-cy=data-table-row]').contains(projName).should('exist').parent().parent().parent().click()
+        cy.get('[data-cy=multiselect-button]').should('have.length', 12).eq(3)
+        for (let i = 0; i < 12; i++) {
+            cy.get('[data-cy=multiselect-button]').eq(i).trigger('mouseover');
+            cy.get('body').contains(msButtonTooltips[i]).should('exist')
+            cy.get('[data-cy=multiselect-button]').eq(i).trigger('mouseout');
+        }
+    })
+
     it("creates new project on home project and then a subproject inside it", function () {
         const createProject = function (name, parentName) {
             cy.get("[data-cy=side-panel-button]").click();
diff --git a/src/components/data-table/data-table.tsx b/src/components/data-table/data-table.tsx
index 84d377bb..97e1a3ac 100644
--- a/src/components/data-table/data-table.tsx
+++ b/src/components/data-table/data-table.tsx
@@ -173,6 +173,7 @@ export const DataTable = withStyles(styles)(
                 const { classes, checkedList } = this.props;
                 return (
                     <input
+                        data-cy={`multiselect-checkbox-${uuid}`}
                         type="checkbox"
                         name={uuid}
                         className={classes.checkBox}
@@ -374,6 +375,7 @@ export const DataTable = withStyles(styles)(
             const { onRowClick, onRowDoubleClick, extractKey, classes, currentItemUuid, currentRoute } = this.props;
             return (
                 <TableRow
+                    data-cy={'data-table-row'}
                     hover
                     key={extractKey ? extractKey(item) : index}
                     onClick={event => onRowClick && onRowClick(event, item)}

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list