[arvados] updated: 2.7.0-6036-ga60e439fc8

git repository hosting git at public.arvados.org
Mon Feb 12 16:53:20 UTC 2024


Summary of changes:
 .../cypress/integration/details-card.spec.js       | 137 ++++++++++++++-------
 .../resource-properties-form.tsx                   |   6 +-
 2 files changed, 97 insertions(+), 46 deletions(-)

       via  a60e439fc82ee7e866b3d15c62fe5b3760894ff4 (commit)
      from  67434b45485a5660431f0be0b9c55533d3dad729 (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 a60e439fc82ee7e866b3d15c62fe5b3760894ff4
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Mon Feb 12 11:53:13 2024 -0500

    21224: project tag tests up Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/services/workbench2/cypress/integration/details-card.spec.js b/services/workbench2/cypress/integration/details-card.spec.js
index 6290b4c740..3fbfd97e22 100644
--- a/services/workbench2/cypress/integration/details-card.spec.js
+++ b/services/workbench2/cypress/integration/details-card.spec.js
@@ -64,7 +64,7 @@ describe('User Details Card tests', function () {
     });
 });
 
-describe.only('Project Details Card tests', function () {
+describe('Project Details Card tests', function () {
     let activeUser;
     let adminUser;
 
@@ -114,7 +114,22 @@ describe.only('Project Details Card tests', function () {
         cy.get('[data-cy=project-details-card]').contains(projName).should('be.visible');
     });
 
-    it ('should contain a context menu with the correct options', () => {
+    it('should contain a context menu with the correct options', () => {
+        const adminProjName = `Test project (${Math.floor(999999 * Math.random())})`;
+        cy.loginAs(adminUser);
+
+        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.get('[data-cy=kebab-icon]').should('be.visible').click();
 
         //admin options
@@ -148,7 +163,7 @@ describe.only('Project Details Card tests', function () {
             });
         cy.get('[data-cy=form-submit-btn]').click();
 
-        cy.waitForDom()
+        cy.waitForDom();
         cy.get('[data-cy=kebab-icon]').should('be.visible').click({ force: true });
 
         //active user options
@@ -165,48 +180,82 @@ describe.only('Project Details Card tests', function () {
         cy.get('[data-cy=context-menu]').contains('Freeze project').should('be.visible');
         cy.get('[data-cy=context-menu]').contains('Move to trash').should('be.visible');
         cy.get('[data-cy=context-menu]').contains('View details').should('be.visible');
+    });
+
+    it('should toggle description display', () => {
+        const projName = `Test project (${Math.floor(999999 * Math.random())})`;
+        const projDescription = 'Lorem ipsum dolor sit amet, consectetur adipiscing vultures, whose wings are dull realities.';
+        cy.loginAs(adminUser);
+
+        // Create project
+        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();
 
+        //check for no description
+        cy.get('[data-cy=no-description').should('be.visible');
+
+        //add description
+        cy.get('[data-cy=side-panel-tree]').contains('Home Projects').click();
+        cy.get('[data-cy=project-panel] tbody tr').contains(projName).rightclick({ force: true });
+        cy.get('[data-cy=context-menu]').contains('Edit').click();
+        cy.get('[data-cy=form-dialog]').within(() => {
+            cy.get('div[contenteditable=true]').click().type(projDescription);
+            cy.get('[data-cy=form-submit-btn]').click();
+        });
+        cy.get('[data-cy=project-panel] tbody tr').contains(projName).click({ force: true });
+        cy.get('[data-cy=project-details-card]').contains(projName).should('be.visible');
+
+        //toggle description
+        cy.get('[data-cy=toggle-description').click();
+        cy.waitForDom();
+        cy.get('[data-cy=project-description]').should('be.visible');
+        cy.get('[data-cy=project-details-card]').contains(projDescription).should('be.visible');
+        cy.get('[data-cy=toggle-description').click();
+        cy.waitForDom();
+        cy.get('[data-cy=project-description]').should('be.hidden');
     });
 
-    it.only('should toggle description display', () => {
-
-      const projName = `Test project (${Math.floor(999999 * Math.random())})`;
-      const projDescription = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, whose wings are dull realities.';
-      cy.loginAs(adminUser);
-
-      // Create project
-      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();
-
-      //check for no description
-      cy.get("[data-cy=no-description").should('be.visible');
-
-      //add description
-      cy.get("[data-cy=side-panel-tree]").contains("Home Projects").click();
-      cy.get("[data-cy=project-panel] tbody tr").contains(projName).rightclick({ force: true });
-      cy.get("[data-cy=context-menu]").contains("Edit").click();
-      cy.get("[data-cy=form-dialog]").within(() => {
-          cy.get("div[contenteditable=true]").click().type(projDescription);
-          cy.get("[data-cy=form-submit-btn]").click();
-      });
-      cy.get("[data-cy=project-panel] tbody tr").contains(projName).click({ force: true });
-      cy.get('[data-cy=project-details-card]').contains(projName).should('be.visible');
-
-      //toggle description
-      cy.get("[data-cy=toggle-description").click();
-      cy.waitForDom();
-      cy.get("[data-cy=project-description]").should('be.visible');
-      cy.get("[data-cy=project-details-card]").contains(projDescription).should('be.visible');
-      cy.get("[data-cy=toggle-description").click();
-      cy.waitForDom();
-      cy.get("[data-cy=project-description]").should('be.hidden');
+    it('should display key/value pairs', () => {
+        const projName = `Test project (${Math.floor(999999 * Math.random())})`;
+        cy.loginAs(adminUser);
+
+        // Create project wih key/value pairs
+        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=key-input]').should('be.visible').click().type('Animal');
+        cy.get('[data-cy=value-input]').should('be.visible').click().type('Dog');
+        cy.get('[data-cy=property-add-btn]').should('be.visible').click();
+
+        cy.get('[data-cy=key-input]').should('be.visible').click().type('Importance');
+        cy.get('[data-cy=value-input]').should('be.visible').click().type('Critical');
+        cy.get('[data-cy=property-add-btn]').should('be.visible').click();
+
+        cy.get('[data-cy=form-submit-btn]').click();
+
+        //check for key/value pairs in project details card
+        cy.get('[data-cy=project-details-card]').contains('Animal').should('be.visible');
+        cy.get('[data-cy=project-details-card]').contains('Importance').should('be.visible').click();
+        cy.waitForDom();
+        cy.window().then((win) =>
+            win.navigator.clipboard.readText().then((text) => {
+                expect(text).to.match(new RegExp(`Importance: Critical`));
+            })
+        );
     });
-});
\ No newline at end of file
+});
diff --git a/services/workbench2/src/views-components/resource-properties-form/resource-properties-form.tsx b/services/workbench2/src/views-components/resource-properties-form/resource-properties-form.tsx
index 0147312912..df23aeeb89 100644
--- a/services/workbench2/src/views-components/resource-properties-form/resource-properties-form.tsx
+++ b/services/workbench2/src/views-components/resource-properties-form/resource-properties-form.tsx
@@ -42,10 +42,12 @@ export const ResourcePropertiesForm = connect(mapStateToProps)(({ handleSubmit,
     const propertyValue = applySelector(formValueSelector(props.form));
     return <form data-cy='resource-properties-form' onSubmit={handleSubmit}>
         <Grid container spacing={16} classes={classes}>
-            <Grid item xs>
+            <Grid item xs 
+            data-cy='key-input'>
                 <PropertyKeyField clearPropertyKeyOnSelect />
             </Grid>
-            <Grid item xs>
+            <Grid item xs
+            data-cy='value-input'>
                 <PropertyValueField />
             </Grid>
             <Grid item>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list