17595: Added new workflow
authorDaniel Kutyła <daniel.kutyla@contractors.roche.com>
Wed, 12 May 2021 21:48:42 +0000 (23:48 +0200)
committerDaniel Kutyła <daniel.kutyla@contractors.roche.com>
Wed, 12 May 2021 21:48:42 +0000 (23:48 +0200)
Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla@contractors.roche.com>

cypress/fixtures/workflow_with_array_fields.yaml
cypress/integration/favorites.spec.js

index c5d5f66fd8789e2a5e76fa5cd54c70ca69649b22..fc71cf8691c19617e87580237084a132071e988c 100644 (file)
 
 ---
 "$graph":
-- "$namespaces":
-    arv: http://arvados.org/cwl#
-  class: ExpressionTool
-  doc: get the gct and vcf files, add other files
-  expression: |
-    $\{
-      var fileArray = [];
-
-      // get files from collection
-      for (var j = 0; j < inputs.collectionArray.length; j++) {
-        for (var i = 0; i < inputs.collectionArray[j].listing.length; i++) {
-          var matchedName = inputs.collectionArray[j].listing[i].basename.match(/^(.+)(.gct|.vcf|.vcf.gz|.gct.tsv|.vcf.tsv)$/);
-          if (matchedName) {
-            var nameString = inputs.collectionArray[j].listing[i].basename.split(".")[0]
-            fileArray.push(inputs.collectionArray[j].listing[i])
-          }
-        }
-      }
-
-      // get any other files from the input file array
-      for (var i = 0; i < inputs.additionalFileArray.length; i++) {
-        fileArray.push(inputs.additionalFileArray[i])
-      }
-
-
-      return {
-        "collectedArray": fileArray,
-        "nameString": nameString
-      }
-
-    }
-  id: "#collectFiles.cwl"
-  inputs:
-  - id: "#collectFiles.cwl/additionalFileArray"
-    type:
-      items: File
-      type: array
-  - id: "#collectFiles.cwl/collectionArray"
-    type:
-      items: Directory
-      type: array
-  outputs:
-  - id: "#collectFiles.cwl/collectedArray"
-    type:
-      items: File
-      type: array
-  - id: "#collectFiles.cwl/nameString"
-    type: string
-  requirements:
-  - class: InlineJavascriptRequirement
 - class: Workflow
-  doc: A workflow to collect .gct and .vcf files files and store them together with
-    specified metainformation files. Mostly used to create a collection for genestack
-    upload. Can only be run on the WB2.
+  cwlVersion: v1.2
   hints:
-  - class: ResourceRequirement
-    coresMin: 1
-    ramMin: 85000
+  - acrContainerImage: 7009415fdc959d0c2819ee2e9db96561+261
+    class: http://arvados.org/cwl#WorkflowRunnerResources
   id: "#main"
   inputs:
-  - default:
-    - basename: metainfo.txt
-      class: File
-      location: keep:1cd1dbc27dc10fa8aaaf8fa19efd3bb8+237/metainfo.txt
-      nameext: ".txt"
-      nameroot: metainfo
-      size: 0
-    - basename: test11.txt
-      class: File
-      location: keep:1cd1dbc27dc10fa8aaaf8fa19efd3bb8+237/test11.txt
-      nameext: ".txt"
-      nameroot: test11
-      size: 0
-    doc: This input allows you to add any number of additional files to be integrated
-      in the output collection.
-    id: "#main/additionalFileArray"
-    label: Files
-    type:
-      items: File
-      type: array
-  - default:
-    - basename: collection1
-      class: Directory
-      location: keep:1cd1dbc27dc10fa8aaaf8fa19efd3bb8+237/collection1
-    - basename: collection2
-      class: Directory
-      location: keep:1cd1dbc27dc10fa8aaaf8fa19efd3bb8+237/collection2
-    doc: This input allows you to specify collections to integrate. From these collections,
-      all files that end with .gct or .vcf will be extracted.
-    id: "#main/collectionArray"
-    label: Collections
+  - default: []
+    id: "#main/bar"
     type:
       items: Directory
       type: array
-  outputs:
-  - id: "#main/genestackArray"
-    outputSource: "#main/collectFiles/collectedArray"
+  - default: []
+    id: "#main/foo"
     type:
       items: File
       type: array
-  requirements:
-  - class: SubworkflowFeatureRequirement
-  - class: ScatterFeatureRequirement
-  - class: StepInputExpressionRequirement
-  - class: InlineJavascriptRequirement
-  steps:
-  - id: "#main/collectFiles"
-    in:
-    - id: "#main/collectFiles/additionalFileArray"
-      source: "#main/additionalFileArray"
-    - id: "#main/collectFiles/collectionArray"
-      source: "#main/collectionArray"
-    out:
-    - "#main/collectFiles/collectedArray"
-    run: "#collectFiles.cwl"
-cwlVersion: v1.0
\ No newline at end of file
+  outputs: []
+  steps: []
+cwlVersion: v1.2
index e48adebfe69a259959f82e49b9a577a3e6652b10..e49d8b30af06decf54fa336e46bdadc77f93ce5d 100644 (file)
@@ -205,7 +205,7 @@ describe('Favorites tests', function () {
             });
     });
 
-    it.only('can select multi files when creating workflow', () => {
+    it('can select multi files when creating workflow', () => {
         cy.createProject({
             owningUser: activeUser,
             projectName: 'myProject1',
@@ -250,7 +250,7 @@ describe('Favorites tests', function () {
                         cy.get('main').contains(testWorkflow.name).click();
                         cy.get('[data-cy=run-process-next-button]').click();
 
-                        cy.get('label').contains('Files').parent('div').find('input').click();
+                        cy.get('label').contains('#main/foo').parent('div').find('input').click();
                         cy.get('div[role=dialog]')
                             .within(() => {
                                 cy.get('p').contains('Projects').closest('div[role=button]')
@@ -269,7 +269,7 @@ describe('Favorites tests', function () {
                                 cy.get('[data-cy=ok-button]').click();
                             });
 
-                        cy.get('label').contains('Collections').parent('div').find('input').click();
+                        cy.get('label').contains('#main/bar').parent('div').find('input').click();
                         cy.get('div[role=dialog]')
                             .within(() => {
                                 cy.get('p').contains('Projects').closest('div[role=button]')