21898: fixed e2e tests 21898-info-button-behavior
authorLisa Knox <lisa.knox@curii.com>
Wed, 14 Aug 2024 15:37:46 +0000 (11:37 -0400)
committerLisa Knox <lisa.knox@curii.com>
Wed, 14 Aug 2024 15:37:46 +0000 (11:37 -0400)
* removed "shows details panel when clicking on the info icon" test entirely

Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox@curii.com>

services/workbench2/cypress/e2e/collection.cy.js
services/workbench2/cypress/e2e/project.cy.js
services/workbench2/src/views-components/details-panel/details-panel.tsx

index 20ecf11c09f5a57e27615b7aabfe73105c9a88a4..a53a67792da21e8f7bd718ac94e0e387cd35ddd8 100644 (file)
@@ -218,7 +218,8 @@ describe("Collection panel tests", function () {
                     .should("contain", this.testCollection.name)
                     .and("not.contain", "Color: Magenta")
                     .and("not.contain", "Size: S");
-                cy.get("[data-cy=additional-info-icon]").click();
+                cy.get("[data-cy=collection-panel-options-btn]").click();
+                cy.get("[data-cy=context-menu]").contains("View details").click();
 
                 cy.get("[data-cy=details-panel]").within(() => {
                     cy.get("[data-cy=details-panel-edit-btn]").click();
index 3b2237bbceefb2b5733ac92ffe3324a1a482a247..6092233008f96938a627fb795dcd0ff3c7bf7303 100644 (file)
@@ -195,6 +195,7 @@ describe("Project tests", function () {
         cy.get("[data-cy=form-submit-btn]").click();
         cy.get("[data-cy=form-dialog]").should("not.exist");
         cy.go('back')
+        cy.waitForDom();
 
         // Create subproject from context menu
         cy.get("[data-cy=project-panel] tbody tr").contains(parentProjName).rightclick({ force: true });
@@ -207,13 +208,17 @@ describe("Project tests", function () {
                 });
             });
         cy.get("[data-cy=form-submit-btn]").click();
+        cy.waitForDom();
         cy.get("[data-cy=form-dialog]").should("not.exist");
 
         // open details panel and check 'owner' field
-        cy.get("[data-cy=additional-info-icon]").click();
+        cy.get('[data-cy=multiselect-button]').eq(0).trigger('mouseover');
+        cy.get('body').contains('View details').should('exist')
+        cy.get('[data-cy=multiselect-button]').eq(0).click();
         cy.waitForDom();
+
         cy.get("[data-cy=details-panel-owner]").contains(parentProjName).should("be.visible")
-        cy.get("[data-cy=additional-info-icon]").click();
+        cy.get("[data-cy=close-details-btn]").click();
     });
 
     it('shows the appropriate buttons in the multiselect toolbar', () => {
@@ -434,23 +439,6 @@ describe("Project tests", function () {
         });
     });
 
-    it("shows details panel when clicking on the info icon", () => {
-        cy.createGroup(activeUser.token, {
-            name: `Test root project ${Math.floor(Math.random() * 999999)}`,
-            group_class: "project",
-        })
-            .as("testRootProject")
-            .then(function (testRootProject) {
-                cy.loginAs(activeUser);
-
-                cy.get("[data-cy=side-panel-tree]").contains(testRootProject.name).click();
-
-                cy.get("[data-cy=additional-info-icon]").click();
-
-                cy.contains(testRootProject.uuid).should("exist");
-            });
-    });
-
     it("clears search input when changing project", () => {
         cy.createGroup(activeUser.token, {
             name: `Test root project ${Math.floor(Math.random() * 999999)}`,
index eb6e65d64579f2b8b6df59dab853029db83c4016..64af28e815431804cbc3b598d1d1bd306bc64a7c 100644 (file)
@@ -204,7 +204,7 @@ export const DetailsPanel = withStyles(styles)(
                             </Tooltip>
                         </Grid>
                         <Grid item>
-                            <IconButton color="inherit" onClick={()=>onCloseDrawer(CLOSE_DRAWER)}>
+                            <IconButton data-cy="close-details-btn" color="inherit" onClick={()=>onCloseDrawer(CLOSE_DRAWER)}>
                                 <CloseIcon />
                             </IconButton>
                         </Grid>