From: Tom Clegg Date: Fri, 13 Sep 2019 18:48:37 +0000 (-0400) Subject: 15014: Update tests. X-Git-Tag: 2.0.0~180^2~2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/7d2f01a15a9e0ecf7bce74e1d271b6fb2993bbc3?ds=sidebyside;hp=4a919918a4ce37b5290793f02fa959db1c073590 15014: Update tests. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- diff --git a/apps/workbench/test/controllers/projects_controller_test.rb b/apps/workbench/test/controllers/projects_controller_test.rb index 0f79168901..dd828952be 100644 --- a/apps/workbench/test/controllers/projects_controller_test.rb +++ b/apps/workbench/test/controllers/projects_controller_test.rb @@ -396,10 +396,7 @@ EOT end end - [ - [:admin, true], - [:active, false], - ].each do |user, expect_all_nodes| + [:admin, :active].each do |user| test "in dashboard other index page links as #{user}" do get :index, params: {}, session: session_for(user) @@ -409,14 +406,6 @@ EOT assert_includes @response.body, "href=\"#{path}\"" assert_includes @response.body, "All #{target}" end - - if expect_all_nodes - assert_includes @response.body, "href=\"/nodes\"" - assert_includes @response.body, "All nodes" - else - assert_not_includes @response.body, "href=\"/nodes\"" - assert_not_includes @response.body, "All nodes" - end end end diff --git a/apps/workbench/test/integration/application_layout_test.rb b/apps/workbench/test/integration/application_layout_test.rb index dc958d3b5e..ac5b529708 100644 --- a/apps/workbench/test/integration/application_layout_test.rb +++ b/apps/workbench/test/integration/application_layout_test.rb @@ -214,7 +214,7 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest first('button', text: 'x').click end - assert_text 'Recent pipelines and processes' # seeing dashboard now + assert_text 'Recent processes' # seeing dashboard now end end @@ -285,7 +285,7 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest test "visit dashboard as #{token}" do visit page_with_token(token) - assert_text 'Recent pipelines and processes' # seeing dashboard now + assert_text 'Recent processes' # seeing dashboard now within('.recent-processes-actions') do assert page.has_link?('Run a process') assert page.has_link?('All processes') diff --git a/apps/workbench/test/integration/logins_test.rb b/apps/workbench/test/integration/logins_test.rb index 7f2774ce2f..f079fbb8f1 100644 --- a/apps/workbench/test/integration/logins_test.rb +++ b/apps/workbench/test/integration/logins_test.rb @@ -11,7 +11,7 @@ class LoginsTest < ActionDispatch::IntegrationTest test "login with api_token works after redirect" do visit page_with_token('active_trustedclient') - assert page.has_text?('Recent pipelines and processes'), "Missing 'Recent pipelines and processes' from page" + assert page.has_text?('Recent processes'), "Missing 'Recent processes' from page" assert_no_match(/\bapi_token=/, current_path) end diff --git a/apps/workbench/test/integration/user_profile_test.rb b/apps/workbench/test/integration/user_profile_test.rb index 547ef06a68..30d4943c62 100644 --- a/apps/workbench/test/integration/user_profile_test.rb +++ b/apps/workbench/test/integration/user_profile_test.rb @@ -24,7 +24,7 @@ class UserProfileTest < ActionDispatch::IntegrationTest assert_text('Save profile') add_profile user else - assert_text('Recent pipelines and processes') + assert_text('Recent processes') assert_no_text('Save profile') end elsif invited @@ -126,7 +126,7 @@ class UserProfileTest < ActionDispatch::IntegrationTest end # profile saved and in home page now - assert_text('Recent pipelines and processes') + assert_text('Recent processes') end [ diff --git a/apps/workbench/test/integration/work_units_test.rb b/apps/workbench/test/integration/work_units_test.rb index fe73f2734f..9d4f590555 100644 --- a/apps/workbench/test/integration/work_units_test.rb +++ b/apps/workbench/test/integration/work_units_test.rb @@ -145,7 +145,7 @@ class WorkUnitsTest < ActionDispatch::IntegrationTest ].each do |template_name, preview_txt, process_txt| test "run a process using template #{template_name} from dashboard" do visit page_with_token('admin') - assert_text 'Recent pipelines and processes' # seeing dashboard now + assert_text 'Recent processes' # seeing dashboard now within('.recent-processes-actions') do assert page.has_link?('All processes')