3338: fix the integration test so that it checks the on-screen collection count
authorPhil Hodgson <bitbucket@philhodgson.net>
Tue, 16 Sep 2014 23:05:45 +0000 (19:05 -0400)
committerPhil Hodgson <bitbucket@philhodgson.net>
Tue, 16 Sep 2014 23:05:45 +0000 (19:05 -0400)
rather than trying to use the fixtures which doesn't work anyway

apps/workbench/test/integration/projects_test.rb

index d36e75b5cf30fc1bf5ef306490b49c074a9c4334..e061b5f6c4435374ce651611d7ea3c47305cb3fb 100644 (file)
@@ -9,9 +9,9 @@ class ProjectsTest < ActionDispatch::IntegrationTest
 
   test 'Check collection count for A Project in the tab pane titles' do
     project_uuid = api_fixture('groups')['aproject']['uuid']
-    collection_fixture_count = api_fixture('collections').select{|k,v| v['owner_uuid'] == project_uuid}.count
     visit page_with_token 'active', '/projects/' + project_uuid
-    assert_selector '#Data_collections-tab span', text: "(#{collection_fixture_count})"
+    collection_count = page.all("[data-pk*='collection']").count
+    assert_selector '#Data_collections-tab span', text: "(#{collection_count})"
   end
 
   test 'Find a project and edit its description' do