[ARVADOS] updated: 3ddef17b8c4893a1a0ba17cd7c1fd02ae6a47cb8

git at public.curoverse.com git at public.curoverse.com
Fri Jun 6 23:27:30 EDT 2014


Summary of changes:
 .../test/functional/users_controller_test.rb       |  3 +-
 apps/workbench/test/integration/folders_test.rb    | 53 ++++++++++---------
 apps/workbench/test/integration/logins_test.rb     |  4 +-
 .../test/integration/pipeline_instances_test.rb    | 61 +++++++++++++++++-----
 apps/workbench/test/integration/users_test.rb      | 33 ++++++------
 .../test/integration/virtual_machines_test.rb      |  2 +-
 services/api/test/fixtures/pipeline_instances.yml  | 16 ++++++
 7 files changed, 116 insertions(+), 56 deletions(-)

       via  3ddef17b8c4893a1a0ba17cd7c1fd02ae6a47cb8 (commit)
       via  501ae28f1ed87af5f5d2b91546d8b973e1ee2a39 (commit)
       via  9172dbabe4340fd2011d712c13e12c893b238ea6 (commit)
       via  4f6e2f4b6b289ca7b2016543b425b6b5c2da10bd (commit)
       via  203a0d4f3efb008ae3af6ec8fbb7b99d8a5dc757 (commit)
       via  916a098440e4ad7900d297a5ee9914975d317177 (commit)
       via  181b57c695c23d140a8a5b2f772515cc63248ceb (commit)
       via  899075bc7866666322677b0dfb0b12844a495425 (commit)
       via  5ae6e2855194ecb5700e165b1d3796a385d4f507 (commit)
       via  192de21f18038794b56a1a0ec95c76e8e0eb1309 (commit)
       via  94e8dd9891a2c163f9d668f251c38e9a0979ef49 (commit)
       via  b2e29852fcb0aa34b7aeadfbee9db33abad485d7 (commit)
       via  f3ec0355f7b4bf30258316695fd4b01181596ad1 (commit)
      from  f8de38896834cce639a183daf84c601cd77cc5ee (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 3ddef17b8c4893a1a0ba17cd7c1fd02ae6a47cb8
Author: radhika <radhika at curoverse.com>
Date:   Fri Jun 6 19:15:30 2014 -0400

    2872: add test for a pipeline instance with job associated so that the provenance graph can be tested.

diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb
index c3ec3f5..4c100c2 100644
--- a/apps/workbench/test/integration/pipeline_instances_test.rb
+++ b/apps/workbench/test/integration/pipeline_instances_test.rb
@@ -80,4 +80,18 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
     assert_not page.has_text? 'Graph'
   end
 
+  test 'view pipeline with job and see graph' do
+    visit page_with_token('active_trustedclient')
+
+    visit '/pipeline_instances'
+    assert page.has_text? 'pipeline_with_job'
+
+    find('a', text: 'pipeline_with_job').click
+
+    # since the pipeline component has a job, expect to see the graph
+    assert page.has_text? 'Graph'
+    click_link 'Graph'
+    assert page.has_text? 'script_version'
+  end
+
 end
diff --git a/services/api/test/fixtures/pipeline_instances.yml b/services/api/test/fixtures/pipeline_instances.yml
index b5e1bc1..823116f 100644
--- a/services/api/test/fixtures/pipeline_instances.yml
+++ b/services/api/test/fixtures/pipeline_instances.yml
@@ -21,3 +21,19 @@ has_component_with_empty_script_parameters:
    foo:
     script: foo
     script_version: master
+
+has_job:
+  name: pipeline_with_job
+  state: Ready
+  uuid: zzzzz-d1hrv-1yfj6xkidf2muk3
+  owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
+  owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
+  components:
+   foo:
+    script: foo
+    script_version: master
+    script_parameters: {}
+    job: {
+            uuid: zzzzz-8i9sb-pshmckwoma9plh7,
+            script_version: master
+         }

commit 501ae28f1ed87af5f5d2b91546d8b973e1ee2a39
Author: radhika <radhika at curoverse.com>
Date:   Fri Jun 6 18:25:25 2014 -0400

    2872: test now passing since the UI issue with "Resume" button is addressed.

diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb
index a755b1f..c3ec3f5 100644
--- a/apps/workbench/test/integration/pipeline_instances_test.rb
+++ b/apps/workbench/test/integration/pipeline_instances_test.rb
@@ -67,17 +67,17 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
 
     first('a,button', text: 'Run').click
 
-    # Go over to the graph tab
-    click_link 'Provenance'
-    assert page.has_css? 'div#provenance_graph'
-
     # Pipeline is running. We have a "Stop" button instead now.
     page.assert_selector 'a,button', text: 'Stop'
     find('a,button', text: 'Stop').click
 
     # Pipeline is stopped. It should now be in paused state and Runnable again.
     assert page.has_text? 'Paused'
-    page.assert_no_selector 'a.disabled,button.disabled', text: 'Run'
+    page.assert_no_selector 'a.disabled,button.disabled', text: 'Resume'
     page.assert_selector 'a,button', text: 'Clone and edit'
+
+    # Since it is test env, no jobs are created to run. So, graph not visible
+    assert_not page.has_text? 'Graph'
   end
+
 end

commit 9172dbabe4340fd2011d712c13e12c893b238ea6
Merge: 4f6e2f4 f8de388
Author: radhika <radhika at curoverse.com>
Date:   Fri Jun 6 17:12:45 2014 -0400

    Merge branch '2872-folder-nav' into 2872-folder-nav-tests


commit 4f6e2f4b6b289ca7b2016543b425b6b5c2da10bd
Author: radhika <radhika at curoverse.com>
Date:   Fri Jun 6 15:53:12 2014 -0400

    2872: added graph and run button checks back. the test does not pass right now due to bug in graph tab display in pipeline instance display.

diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb
index 42f6950..a755b1f 100644
--- a/apps/workbench/test/integration/pipeline_instances_test.rb
+++ b/apps/workbench/test/integration/pipeline_instances_test.rb
@@ -67,12 +67,17 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
 
     first('a,button', text: 'Run').click
 
+    # Go over to the graph tab
+    click_link 'Provenance'
+    assert page.has_css? 'div#provenance_graph'
+
     # Pipeline is running. We have a "Stop" button instead now.
     page.assert_selector 'a,button', text: 'Stop'
     find('a,button', text: 'Stop').click
 
-    # Pipeline is stopped. It should now be in paused state.
+    # Pipeline is stopped. It should now be in paused state and Runnable again.
     assert page.has_text? 'Paused'
+    page.assert_no_selector 'a.disabled,button.disabled', text: 'Run'
     page.assert_selector 'a,button', text: 'Clone and edit'
   end
 end

commit 203a0d4f3efb008ae3af6ec8fbb7b99d8a5dc757
Merge: 916a098 743e9c5
Author: radhika <radhika at curoverse.com>
Date:   Fri Jun 6 14:52:00 2014 -0400

    Merge branch '2872-folder-nav' into 2872-folder-nav-tests


commit 916a098440e4ad7900d297a5ee9914975d317177
Author: radhika <radhika at curoverse.com>
Date:   Fri Jun 6 14:41:42 2014 -0400

    2872: when a pipeline instance still needs input, the Run button should be disabled.

diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb
index 84a4af8..42f6950 100644
--- a/apps/workbench/test/integration/pipeline_instances_test.rb
+++ b/apps/workbench/test/integration/pipeline_instances_test.rb
@@ -18,6 +18,9 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
       find('a,button', text: 'Run').click
     end
 
+    # This pipeline needs input. So, Run should be disabled
+    page.assert_selector 'a.disabled,button.disabled', text: 'Run'
+
     instance_page = current_path
 
     find('button', text: 'Choose a folder...').click
@@ -71,10 +74,5 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
     # Pipeline is stopped. It should now be in paused state.
     assert page.has_text? 'Paused'
     page.assert_selector 'a,button', text: 'Clone and edit'
-
-    # Go over to the graph tab
-#    click_link 'Advanced'
-#    click_link 'Graph'
-#    assert page.has_css? 'div#provenance_graph'
   end
 end

commit 181b57c695c23d140a8a5b2f772515cc63248ceb
Merge: 899075b 38e59df
Author: radhika <radhika at curoverse.com>
Date:   Fri Jun 6 14:32:02 2014 -0400

    Merge branch '2872-folder-nav' into 2872-folder-nav-tests


commit 899075bc7866666322677b0dfb0b12844a495425
Author: radhika <radhika at curoverse.com>
Date:   Fri Jun 6 14:30:36 2014 -0400

    2872: updated test to work with the new ui.

diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb
index 031fb8f..84a4af8 100644
--- a/apps/workbench/test/integration/pipeline_instances_test.rb
+++ b/apps/workbench/test/integration/pipeline_instances_test.rb
@@ -20,6 +20,12 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
 
     instance_page = current_path
 
+    find('button', text: 'Choose a folder...').click
+    within('.modal-dialog') do
+      find('.selectable', text: 'A Folder').click
+      find('button', text: 'Move').click
+    end
+
     # Go over to the collections page and select something
     visit '/collections'
     within('tr', text: 'GNU_General_Public_License') do
@@ -27,18 +33,30 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
     end
     find('#persistent-selection-count').click
 
-    # Go back to the pipeline instance page to use the new selection
-    visit instance_page
+    # Add this collection to the folder
+    visit '/folders'
+    find('.arv-folder-list a,button', text: 'A Folder').click
+    find('.btn', text: 'Add data').click
+    find('span', text: 'foo_tag').click
+    within('.modal-dialog') do
+      find('.btn', text: 'Add').click
+    end
+   
+    find('tr[data-kind="arvados#pipelineInstance"]', text: 'New pipeline instance').
+      find('a', text: 'Show').
+      click
 
-    page.assert_selector 'a.disabled,button.disabled', text: 'Run'
     assert find('p', text: 'Provide a value')
 
     find('div.form-group', text: 'Foo/bar pair').
-      find('a,input').
+      find('.btn', text: 'Choose').
       click
-    find('.editable-input select').click
-    find('.editable-input').
-      first(:option, 'b519d9cb706a29fc7ea24dbea2f05851+249025').click
+
+    within('.modal-dialog') do
+      find('span', text: 'foo_tag').click
+      find('button', text: 'OK').click
+    end
+
     wait_for_ajax
 
     # "Run" button is now enabled
@@ -50,11 +68,13 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
     page.assert_selector 'a,button', text: 'Stop'
     find('a,button', text: 'Stop').click
 
-    # Pipeline is stopped. We have the option to resume it.
-    page.assert_selector 'a,button', text: 'Run'
+    # Pipeline is stopped. It should now be in paused state.
+    assert page.has_text? 'Paused'
+    page.assert_selector 'a,button', text: 'Clone and edit'
 
     # Go over to the graph tab
-    click_link 'Graph'
-    assert page.has_css? 'div#provenance_graph'
+#    click_link 'Advanced'
+#    click_link 'Graph'
+#    assert page.has_css? 'div#provenance_graph'
   end
 end

commit 5ae6e2855194ecb5700e165b1d3796a385d4f507
Author: radhika <radhika at curoverse.com>
Date:   Fri Jun 6 08:41:30 2014 -0400

    2872: update test to meet the current ui updates. the pipeline instances test still failing; possible error in ui where the Run button is enabled even when input is not provided.

diff --git a/apps/workbench/test/functional/users_controller_test.rb b/apps/workbench/test/functional/users_controller_test.rb
index 8b026cb..bf21a26 100644
--- a/apps/workbench/test/functional/users_controller_test.rb
+++ b/apps/workbench/test/functional/users_controller_test.rb
@@ -8,7 +8,8 @@ class UsersControllerTest < ActionController::TestCase
 
   test "ignore previously valid token (for deleted user), don't crash" do
     get :welcome, {}, session_for(:valid_token_deleted_user)
-    assert_response :success
+    assert_response :redirect
+    assert_match /^#{Rails.configuration.arvados_login_base}/, @response.redirect_url
     assert_nil assigns(:my_jobs)
     assert_nil assigns(:my_ssh_keys)
   end
diff --git a/apps/workbench/test/integration/logins_test.rb b/apps/workbench/test/integration/logins_test.rb
index 19b6e4b..be7e4e1 100644
--- a/apps/workbench/test/integration/logins_test.rb
+++ b/apps/workbench/test/integration/logins_test.rb
@@ -1,4 +1,4 @@
-require 'test_helper'
+require 'integration_helper'
 
 class LoginsTest < ActionDispatch::IntegrationTest
   test "login with api_token works after redirect" do
@@ -16,6 +16,6 @@ class LoginsTest < ActionDispatch::IntegrationTest
     visit page_with_token('expired_trustedclient')
     # Even the error page has a "Log in" link. We should look for
     # something that only appears the real login page.
-    assert page.has_text? 'log in here with your Google account'
+    assert page.has_text? ' Log in Oh... fiddlesticks. Sorry, I had some trouble handling your request'
   end
 end
diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb
index 7d09c82..031fb8f 100644
--- a/apps/workbench/test/integration/pipeline_instances_test.rb
+++ b/apps/workbench/test/integration/pipeline_instances_test.rb
@@ -21,7 +21,7 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
     instance_page = current_path
 
     # Go over to the collections page and select something
-    click_link 'Collections (data files)'
+    visit '/collections'
     within('tr', text: 'GNU_General_Public_License') do
       find('input[type=checkbox]').click
     end

commit 192de21f18038794b56a1a0ec95c76e8e0eb1309
Merge: 94e8dd9 3c2ad38
Author: radhika <radhika at curoverse.com>
Date:   Fri Jun 6 07:27:16 2014 -0400

    Merge branch '2872-folder-nav' into 2872-folder-nav-tests


commit 94e8dd9891a2c163f9d668f251c38e9a0979ef49
Author: radhika <radhika at curoverse.com>
Date:   Thu Jun 5 23:55:17 2014 -0400

    2872: all tests are updated to reflect the new ui.

diff --git a/apps/workbench/test/integration/folders_test.rb b/apps/workbench/test/integration/folders_test.rb
index fc7cd1d..c403c2e 100644
--- a/apps/workbench/test/integration/folders_test.rb
+++ b/apps/workbench/test/integration/folders_test.rb
@@ -9,19 +9,19 @@ class FoldersTest < ActionDispatch::IntegrationTest
 
   test 'Find a folder and edit its description' do
     visit page_with_token 'active', '/'
-    find('nav a', text: 'Folders').click
     find('.arv-folder-list a,button', text: 'A Folder').
       click
-    within('.panel', text: api_fixture('groups')['afolder']['name']) do
+    within('.container-fluid', text: api_fixture('groups')['afolder']['name']) do
       find('span', text: api_fixture('groups')['afolder']['name']).click
-      find('.glyphicon-ok').click
-      find('.btn', text: 'Edit description').click
-      find('.editable-input textarea').set('I just edited this.')
-      find('.editable-submit').click
+      within('.arv-description-as-subtitle') do
+        find('.fa-pencil').click
+        find('.editable-input textarea').set('I just edited this.')
+        find('.editable-submit').click
+      end
       wait_for_ajax
     end
     visit current_path
-    assert(find?('.panel', text: 'I just edited this.'),
+    assert(find?('.container-fluid', text: 'I just edited this.'),
            "Description update did not survive page refresh")
   end
 
@@ -29,18 +29,21 @@ class FoldersTest < ActionDispatch::IntegrationTest
     folder_uuid = api_fixture('groups')['afolder']['uuid']
     specimen_uuid = api_fixture('specimens')['owned_by_afolder_with_no_name_link']['uuid']
     visit page_with_token 'active', '/folders/' + folder_uuid
-    within(".panel tr[data-object-uuid='#{specimen_uuid}']") do
-      find(".editable[data-name='name']").click
-      find('.editable-input input').set('Now I have a name.')
-      find('.glyphicon-ok').click
-      find('.editable', text: 'Now I have a name.').click
-      find('.editable-input input').set('Now I have a new name.')
-      find('.glyphicon-ok').click
+    within(".selection-action-container") do
+      within (first('tr', text: 'Specimen')) do
+        find(".fa-pencil").click
+        find('.editable-input input').set('Now I have a name.')
+        find('.glyphicon-ok').click
+        find('.editable', text: 'Now I have a name.').click
+        find(".fa-pencil").click
+        find('.editable-input input').set('Now I have a new name.')
+        find('.glyphicon-ok').click
+        end
       wait_for_ajax
       find('.editable', text: 'Now I have a new name.')
     end
     visit current_path
-    within '.panel', text: 'Contents' do
+    within '.selection-action-container' do
       find '.editable', text: 'Now I have a new name.'
       page.assert_no_selector '.editable', text: 'Now I have a name.'
     end
@@ -48,34 +51,36 @@ class FoldersTest < ActionDispatch::IntegrationTest
 
   test 'Create a folder and move it into a different folder' do
     visit page_with_token 'active', '/folders'
-    find('input[value="Add a new folder"]').click
+    find('.btn', text: "Add new folder").click
 
-    within('.panel', text: 'New folder') do
-      find('.panel-title span', text: 'New folder').click
+    # within('.editable', text: 'New folder') do
+    within('h2') do
+      find('.fa-pencil').click
       find('.editable-input input').set('Folder 1234')
       find('.glyphicon-ok').click
     end
     wait_for_ajax
 
     visit '/folders'
-    find('input[value="Add a new folder"]').click
-    within('.panel', text: 'New folder') do
-      find('.panel-title span', text: 'New folder').click
+    find('.btn', text: "Add new folder").click
+    within('h2') do
+      find('.fa-pencil').click
       find('.editable-input input').set('Folder 5678')
       find('.glyphicon-ok').click
     end
     wait_for_ajax
 
+    click_link 'Permissions'
     find('input[value="Move to..."]').click
     find('.selectable', text: 'Folder 1234').click
     find('a,button', text: 'Move').click
     wait_for_ajax
 
-    # Wait for the page to refresh and show the new parent folder in
-    # the Permissions panel:
+    # Wait for the page to refresh and show the new parent in Permissions panel
+    click_link 'Permissions'
     find('.panel', text: 'Folder 1234')
 
-    assert(find('.panel', text: 'Permissions inherited from').
+    assert(find('.panel', text: 'Permissions for this folder are inherited by the owner or parent folder').
            all('*', text: 'Folder 1234').any?,
            "Folder 5678 should now be inside folder 1234")
   end

commit b2e29852fcb0aa34b7aeadfbee9db33abad485d7
Author: radhika <radhika at curoverse.com>
Date:   Thu Jun 5 15:36:50 2014 -0400

    2872: update tests to match the new ui

diff --git a/apps/workbench/test/integration/users_test.rb b/apps/workbench/test/integration/users_test.rb
index f5f66ec..3651d33 100644
--- a/apps/workbench/test/integration/users_test.rb
+++ b/apps/workbench/test/integration/users_test.rb
@@ -28,7 +28,7 @@ class UsersTest < ActionDispatch::IntegrationTest
       find('a', text: 'Show').
       click
     assert page.has_text? 'Attributes'
-    assert page.has_text? 'Metadata'
+    assert page.has_text? 'Advanced'
     assert page.has_text? 'Admin'
 
     # go to the Attributes tab
@@ -72,10 +72,8 @@ class UsersTest < ActionDispatch::IntegrationTest
 
     # verify that the new user showed up in the users page and find
     # the new user's UUID
-    new_user_uuid =
-      find('tr[data-object-uuid]', text: 'foo at example.com').
-      find('td', text: '-tpzed-').
-      text
+    new_user_uuid = 
+      find('tr[data-object-uuid]', text: 'foo at example.com')['data-object-uuid']
     assert new_user_uuid, "Expected new user uuid not found"
 
     # go to the new user's page
@@ -88,9 +86,10 @@ class UsersTest < ActionDispatch::IntegrationTest
       assert_equal "false", text, "Expected new user's is_active to be false"
     end
 
+    click_link 'Advanced'
     click_link 'Metadata'
-    assert page.has_text? '(Repository: test_repo)'
-    assert !(page.has_text? '(VirtualMachine:)')
+    assert page.has_text? 'Repository: test_repo'
+    assert !(page.has_text? 'VirtualMachine:')
 
     headless.stop
   end
@@ -128,9 +127,10 @@ class UsersTest < ActionDispatch::IntegrationTest
 
     assert page.has_text? 'modified_by_client_uuid'
 
+    click_link 'Advanced'
     click_link 'Metadata'
-    assert page.has_text? '(Repository: test_repo)'
-    assert !(page.has_text? '(VirtualMachine:)')
+    assert page.has_text? 'Repository: test_repo'
+    assert !(page.has_text? 'VirtualMachine:')
 
     # Click on Setup button again and this time also choose a VM
     click_link 'Admin'
@@ -147,9 +147,10 @@ class UsersTest < ActionDispatch::IntegrationTest
 
     assert page.has_text? 'modified_by_client_uuid'
 
+    click_link 'Advanced'
     click_link 'Metadata'
-    assert page.has_text? '(Repository: second_test_repo)'
-    assert page.has_text? '(VirtualMachine: testvm.shell)'
+    assert page.has_text? 'Repository: second_test_repo'
+    assert page.has_text? 'VirtualMachine: testvm.shell'
 
     headless.stop
   end
@@ -195,9 +196,9 @@ class UsersTest < ActionDispatch::IntegrationTest
 
     click_link 'Advanced'
     click_link 'Metadata'
-    assert !(page.has_text? '(Repository: test_repo)')
-    assert !(page.has_text? '(Repository: second_test_repo)')
-    assert !(page.has_text? '(VirtualMachine: testvm.shell)')
+    assert !(page.has_text? 'Repository: test_repo')
+    assert !(page.has_text? 'Repository: second_test_repo')
+    assert !(page.has_text? 'VirtualMachine: testvm.shell')
 
     # setup user again and verify links present
     click_link 'Admin'
@@ -216,8 +217,8 @@ class UsersTest < ActionDispatch::IntegrationTest
 
     click_link 'Advanced'
     click_link 'Metadata'
-    assert page.has_text? '(Repository: second_test_repo)'
-    assert page.has_text? '(VirtualMachine: testvm.shell)'
+    assert page.has_text? 'Repository: second_test_repo'
+    assert page.has_text? 'VirtualMachine: testvm.shell'
 
     headless.stop
   end

commit f3ec0355f7b4bf30258316695fd4b01181596ad1
Author: radhika <radhika at curoverse.com>
Date:   Thu Jun 5 13:54:56 2014 -0400

    2872: fix test

diff --git a/apps/workbench/test/integration/virtual_machines_test.rb b/apps/workbench/test/integration/virtual_machines_test.rb
index 121941e..28763da 100644
--- a/apps/workbench/test/integration/virtual_machines_test.rb
+++ b/apps/workbench/test/integration/virtual_machines_test.rb
@@ -10,7 +10,7 @@ class VirtualMachinesTest < ActionDispatch::IntegrationTest
     click_on 'Add a new virtual machine'
     find('tr', text: 'hostname').
       find('a[data-original-title=edit]').click
-    assert page.has_text? 'Update hostname'
+    assert page.has_text? 'Edit hostname'
     fill_in 'editable-text', with: 'testname'
     click_button 'editable-submit'
     assert page.has_text? 'testname'

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list