[ARVADOS] updated: c28604e8acf4385686c0284d9100263829fed02b

git at public.curoverse.com git at public.curoverse.com
Mon Aug 25 10:41:30 EDT 2014


Summary of changes:
 apps/workbench/test/integration/projects_test.rb | 71 ++++++++++++++++++++++++
 1 file changed, 71 insertions(+)

       via  c28604e8acf4385686c0284d9100263829fed02b (commit)
      from  59b7bfcd04229f48447c5afc939be19a14833cc6 (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 c28604e8acf4385686c0284d9100263829fed02b
Author: radhika <radhika at curoverse.com>
Date:   Mon Aug 25 10:40:27 2014 -0400

    3354: add integration tests verify textile descriptions for projects

diff --git a/apps/workbench/test/integration/projects_test.rb b/apps/workbench/test/integration/projects_test.rb
index b2c9d77..b420260 100644
--- a/apps/workbench/test/integration/projects_test.rb
+++ b/apps/workbench/test/integration/projects_test.rb
@@ -25,6 +25,77 @@ class ProjectsTest < ActionDispatch::IntegrationTest
            "Description update did not survive page refresh")
   end
 
+  test 'Find a project and edit description to textile description' do
+    visit page_with_token 'active', '/'
+    find('.arv-project-list a,button', text: 'A Project').
+      click
+    within('.container-fluid', text: api_fixture('groups')['aproject']['name']) do
+      find('span', text: api_fixture('groups')['aproject']['name']).click
+      within('.arv-description-as-subtitle') do
+        find('.fa-pencil').click
+        find('.editable-input textarea').set('*Textile description for A project* - "take me home":/')
+        find('.editable-submit').click
+      end
+      wait_for_ajax
+    end
+    visit current_path
+    assert(find?('.container-fluid', text: 'Textile description for A project'),
+           "Description update did not survive page refresh")
+    assert(!find?('.container-fluid', text: '*Textile description for A project*'),
+           "Textile description is displayed with uninterpreted formatting characters")
+    assert(page.has_link?("take me home"), "link not found in description")
+    click_link 'take me home'
+    assert page.has_text?('My projects')
+    assert page.has_text?('Projects shared with me')
+  end
+
+  test 'Find a project and edit description to html description' do
+    visit page_with_token 'active', '/'
+    find('.arv-project-list a,button', text: 'A Project').
+      click
+    within('.container-fluid', text: api_fixture('groups')['aproject']['name']) do
+      find('span', text: api_fixture('groups')['aproject']['name']).click
+      within('.arv-description-as-subtitle') do
+        find('.fa-pencil').click
+        find('.editable-input textarea').set('<br>Textile description for A project</br> - <a href="/">take me home</a>')
+        find('.editable-submit').click
+      end
+      wait_for_ajax
+    end
+    visit current_path
+    assert(find?('.container-fluid', text: 'Textile description for A project'),
+           "Description update did not survive page refresh")
+    assert(!find?('.container-fluid', text: '<br>Textile description for A project</br>'),
+           "Textile description is displayed with uninterpreted formatting characters")
+    assert(page.has_link?("take me home"),"link not found in description")
+    click_link 'take me home'
+    assert page.has_text?('My projects')
+    assert page.has_text?('Projects shared with me')
+  end
+
+  test 'Find a project and edit description to textile description with link to object' do
+    visit page_with_token 'active', '/'
+    find('.arv-project-list a,button', text: 'A Project').
+      click
+    within('.container-fluid', text: api_fixture('groups')['aproject']['name']) do
+      find('span', text: api_fixture('groups')['aproject']['name']).click
+      within('.arv-description-as-subtitle') do
+        find('.fa-pencil').click
+        find('.editable-input textarea').set('*Textile description for A project* - "go to sub-project":' + api_fixture('groups')['asubproject']['uuid'] + "'")
+        find('.editable-submit').click
+      end
+      wait_for_ajax
+    end
+    visit current_path
+    assert(find?('.container-fluid', text: 'Textile description for A project'),
+           "Description update did not survive page refresh")
+    assert(!find?('.container-fluid', text: '*Textile description for A project*'),
+           "Textile description is displayed with uninterpreted formatting characters")
+    assert(page.has_link?("go to sub-project"), "link not found in description")
+    click_link 'go to sub-project'
+    assert(page.has_text?(api_fixture('groups')['asubproject']['name']), 'sub-project name not found after clicking link')
+  end
+
   test 'Add a new name, then edit it, without creating a duplicate' do
     project_uuid = api_fixture('groups')['aproject']['uuid']
     specimen_uuid = api_fixture('specimens')['owned_by_aproject_with_no_name_link']['uuid']

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list