15557: Add cypress test for copy process 15557-rerun-workflow
authorStephen Smith <stephen@curii.com>
Tue, 7 Feb 2023 21:17:22 +0000 (16:17 -0500)
committerStephen Smith <stephen@curii.com>
Tue, 7 Feb 2023 21:17:22 +0000 (16:17 -0500)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

cypress/integration/process.spec.js

index f4461b75d1231f6f557e6dbc6827a95ac052f201..02657b3959971583f4d5aa3ad2580903ca860fc9 100644 (file)
@@ -1144,4 +1144,33 @@ describe('Process tests', function() {
         });
     });
 
+
+    it('allows copying processes', function() {
+        const crName = 'first_container_request';
+        const copiedCrName = 'copied_container_request';
+        createContainerRequest(
+            activeUser,
+            crName,
+            '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', crName);
+
+            cy.get('[data-cy=process-details]').find('button[title="More options"]').click();
+            cy.get('ul[data-cy=context-menu]').contains("Copy and re-run process").click();
+        });
+
+        cy.get('[data-cy=form-dialog]').within(() => {
+            cy.get('input[name=name]').clear().type(copiedCrName);
+            cy.get('[data-cy=projects-tree-home-tree-picker]').click();
+            cy.get('[data-cy=form-submit-btn]').click();
+        });
+
+        cy.get('[data-cy=process-details]').should('contain', copiedCrName);
+        cy.get('[data-cy=process-details]').find('button').contains('Run Process');
+    });
+
 });