Merge branch '20031-collection-files-batch-operations' into main. Closes #20031
[arvados-workbench2.git] / cypress / integration / create-workflow.spec.js
index b1ea5dbf7e297d373911d728379869ed92ffff57..0fe7e34117a96a4d870f47961e67c96f6cfef846 100644 (file)
@@ -73,16 +73,16 @@ describe('Multi-file deletion tests', function () {
 
             cy.get('[data-cy=run-process-next-button]').click();
 
-            cy.get('[data-cy=new-process-panel]').contains('Run Process').should('be.disabled');
+            cy.get('[data-cy=new-process-panel]').contains('Run workflow').should('be.disabled');
 
             cy.get('[data-cy=new-process-panel]')
                 .within(() => {
                     cy.get('[name=name]').type(`Workflow name (${Math.floor(Math.random() * 999999)})`);
-                    cy.get('[readonly]').click();
+                    cy.contains('input').next().click();
                 });
 
             cy.get('[data-cy=choose-a-file-dialog]').as('chooseFileDialog');
-            cy.get('@chooseFileDialog').contains('Projects').closest('ul').find('i').click();
+            cy.get('@chooseFileDialog').contains('Home Projects').closest('ul').find('i').click();
 
             cy.get('@project1').then((project1) => {
                 cy.get('@chooseFileDialog').find(`[data-id=${project1.uuid}]`).find('i').click();
@@ -105,7 +105,7 @@ describe('Multi-file deletion tests', function () {
             cy.get('@chooseFileDialog').find('button').contains('Ok').click();
 
             cy.get('[data-cy=new-process-panel]')
-                .find('button').contains('Run Process').should('not.be.disabled');
+                .find('button').contains('Run workflow').should('not.be.disabled');
         });
     });
 
@@ -148,40 +148,38 @@ describe('Multi-file deletion tests', function () {
 
                 cy.get('[data-cy=side-panel-button]').click();
 
-                cy.get('#aside-menu-list').contains('Run a process').click();
+                cy.get('#aside-menu-list').contains('Run a workflow').click();
 
                 cy.get('@testWorkflow')
                     .then((testWorkflow) => {
                         cy.get('main').contains(testWorkflow.name).click();
                         cy.get('[data-cy=run-process-next-button]').click();
 
-                        cy.get('label').contains('#main/foo').parent('div').find('input').click();
+                        cy.get('label').contains('foo').parent('div').find('input').click();
                         cy.get('div[role=dialog]')
                             .within(() => {
-                                cy.get('p').contains('Projects').closest('div[role=button]')
-                                    .within(() => {
-                                        cy.get('svg[role=presentation]')
-                                            .click({ multiple: true });
-                                    });
+                                // must use .then to avoid selecting instead of expanding https://github.com/cypress-io/cypress/issues/5529
+                                cy.get('p').contains('Home Projects').closest('ul')
+                                    .find('i')
+                                    .then(el => el.click());
 
                                 cy.get(`[data-id=${testCollection.uuid}]`)
                                     .find('i').click();
 
+                                cy.wait(1000);
                                 cy.contains('bar').closest('[data-action=TOGGLE_ACTIVE]').parent().find('input[type=checkbox]').click();
-
                                 cy.contains('baz').closest('[data-action=TOGGLE_ACTIVE]').parent().find('input[type=checkbox]').click();
 
                                 cy.get('[data-cy=ok-button]').click();
                             });
 
-                        cy.get('label').contains('#main/bar').parent('div').find('input').click();
+                        cy.get('label').contains('bar').parent('div').find('input').click();
                         cy.get('div[role=dialog]')
                             .within(() => {
-                                cy.get('p').contains('Projects').closest('div[role=button]')
-                                    .within(() => {
-                                        cy.get('svg[role=presentation]')
-                                            .click({ multiple: true });
-                                    });
+                                // must use .then to avoid selecting instead of expanding https://github.com/cypress-io/cypress/issues/5529
+                                cy.get('p').contains('Home Projects').closest('ul')
+                                    .find('i')
+                                    .then(el => el.click());
 
                                 cy.get(`[data-id=${testCollection.uuid}]`)
                                     .find('input[type=checkbox]').click();
@@ -193,13 +191,13 @@ describe('Multi-file deletion tests', function () {
                             });
                     });
 
-                cy.get('label').contains('#main/foo').parent('div')
+                cy.get('label').contains('foo').parent('div')
                     .within(() => {
                         cy.contains('baz');
                         cy.contains('bar');
                     });
 
-                cy.get('label').contains('#main/bar').parent('div')
+                cy.get('label').contains('bar').parent('div')
                     .within(() => {
                         cy.contains(testCollection.name);
                         cy.contains(testCollection2.name);