21128: added toolbar test to process spec Arvados-DCO-1.1-Signed-off-by: Lisa Knox...
authorLisa Knox <lisaknox83@gmail.com>
Tue, 12 Dec 2023 16:22:07 +0000 (11:22 -0500)
committerLisa Knox <lisaknox83@gmail.com>
Tue, 12 Dec 2023 16:22:07 +0000 (11:22 -0500)
cypress/integration/multiselect-toolbar.spec.js
cypress/integration/process.spec.js

index 4a37921520800464f5389c72d66db1d35713f954..ef503f7ef628874af301821f23a1ffc1385e39e0 100644 (file)
@@ -28,10 +28,9 @@ describe('Multiselect Toolbar Tests', () => {
         cy.clearLocalStorage();
     });
 
-    it('exists in DOM', () => {
+    it('exists in DOM in neutral state', () => {
         cy.loginAs(activeUser);
         cy.get('[data-cy=multiselect-toolbar]').should('exist');
         cy.get('[data-cy=multiselect-button]').should('not.exist');
-        cy.get('[data-cy=multiselect-alt-button]').should('not.exist');
     });
 });
index 438acbf14dca2608ddf23b9dc3822d4aedbf3dd2..3eba1200867055b0e92b06bb60493f5c78ea59aa 100644 (file)
@@ -90,6 +90,49 @@ describe("Process tests", function () {
         });
     }
 
+    describe('Multiselect Toolbar', () => {
+        it('shows the appropriate buttons for process resource', () => {
+
+            const msButtonTooltips = [
+                'API Details',
+                'Add to Favorites',
+                'CANCEL',
+                'Copy and re-run process',
+                'Edit process',
+                'Move to',
+                'Open in new tab',
+                'Outputs',
+                'Remove',
+                'Share',
+                'View details',
+            ];
+    
+            createContainerRequest(
+                activeUser,
+                `test_container_request ${Math.floor(Math.random() * 999999)}`,
+                "arvados/jobs",
+                ["echo", "hello world"],
+                false,
+                "Committed"
+            ).then(function (containerRequest) {
+                cy.loginAs(activeUser);
+                cy.goToPath(`/processes/${containerRequest.uuid}`);
+                cy.get("[data-cy=process-details]").should("contain", containerRequest.name);
+                cy.get("[data-cy=process-details-attributes-modifiedby-user]").contains(`Active User (${activeUser.user.uuid})`);
+                cy.get("[data-cy=process-details-attributes-runtime-user]").should("not.exist");
+                cy.get("[data-cy=side-panel-tree]").contains("Home Projects").click();
+                cy.waitForDom()
+                cy.get('[data-cy=data-table-row]').contains(containerRequest.name).should('exist').parent().parent().parent().parent().click()
+                cy.get('[data-cy=multiselect-button]').should('have.length', 11).eq(3)
+                for (let i = 0; i < 11; 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');
+                }
+            });
+        })
+    })
+
     describe("Details panel", function () {
         it("shows process details", function () {
             createContainerRequest(