From b23240bded4d76bf953a4f8c499f58d9066c34dc Mon Sep 17 00:00:00 2001 From: Radhika Chippada Date: Tue, 3 Feb 2015 00:14:17 -0500 Subject: [PATCH] 2659: add a "you are not logged in" warning in 404 page. --- apps/workbench/app/views/application/404.html.erb | 4 ++++ apps/workbench/test/integration/errors_test.rb | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/apps/workbench/app/views/application/404.html.erb b/apps/workbench/app/views/application/404.html.erb index 8a0482274a..4c8fa7635e 100644 --- a/apps/workbench/app/views/application/404.html.erb +++ b/apps/workbench/app/views/application/404.html.erb @@ -13,6 +13,10 @@

Not Found

+<% if !current_user %> +

You are not logged into Arvados. Please retry after log in.


+<% end %> +

The <%= req_item %> was not found. <% if class_name %> diff --git a/apps/workbench/test/integration/errors_test.rb b/apps/workbench/test/integration/errors_test.rb index 03c359e089..23e8c012af 100644 --- a/apps/workbench/test/integration/errors_test.rb +++ b/apps/workbench/test/integration/errors_test.rb @@ -126,4 +126,10 @@ class ErrorsTest < ActionDispatch::IntegrationTest end end + test "404 page checks if user not logged in and makes suggestion" do + visit "/collections/#{BAD_UUID}" + assert_text 'You are not logged into Arvados', + 'Not found: You are not logged into Arvados' + end + end -- 2.30.2