From 893f659712cd9b742829b17e2cedc822901608ec Mon Sep 17 00:00:00 2001 From: Phil Hodgson Date: Thu, 11 Sep 2014 18:18:39 -0400 Subject: [PATCH] 3338: Tests that the fixture collection count for a project matches what is displayed in the tab --- apps/workbench/app/views/projects/tab_counts.js.erb | 2 +- apps/workbench/test/integration/projects_test.rb | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/workbench/app/views/projects/tab_counts.js.erb b/apps/workbench/app/views/projects/tab_counts.js.erb index bf64378536..6502e2efc0 100644 --- a/apps/workbench/app/views/projects/tab_counts.js.erb +++ b/apps/workbench/app/views/projects/tab_counts.js.erb @@ -1,3 +1,3 @@ <% @tab_counts.each do |pane_name, tab_count| %> - $('span#<%= pane_name %>-count').html(' (<%= tab_count %>)'); + $('span#<%= pane_name %>-count').html('(<%= tab_count %>)'); <% end %> \ No newline at end of file diff --git a/apps/workbench/test/integration/projects_test.rb b/apps/workbench/test/integration/projects_test.rb index 100f3bbf2b..d36e75b5cf 100644 --- a/apps/workbench/test/integration/projects_test.rb +++ b/apps/workbench/test/integration/projects_test.rb @@ -7,6 +7,13 @@ class ProjectsTest < ActionDispatch::IntegrationTest Capybara.current_driver = Capybara.javascript_driver end + 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})" + end + test 'Find a project and edit its description' do visit page_with_token 'active', '/' find('.arv-project-list a,button', text: 'A Project'). -- 2.30.2