From 74089d1febe3c00703564e1683740c31ce30d0e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 31 Mar 2021 19:51:57 +0200 Subject: [PATCH] Add "Go back" link in admin verifications It isn't very intuitive that this link points to the stats page, but since it's the only page linking to it and there's no link pointing to it in the admin navigation, I guess it's better than offering no clue at all of the current whereabouts. --- app/views/admin/verifications/index.html.erb | 2 ++ spec/system/admin/verifications_spec.rb | 1 + 2 files changed, 3 insertions(+) diff --git a/app/views/admin/verifications/index.html.erb b/app/views/admin/verifications/index.html.erb index 2d9a0f737..f44c1ed87 100644 --- a/app/views/admin/verifications/index.html.erb +++ b/app/views/admin/verifications/index.html.erb @@ -1,3 +1,5 @@ +<%= back_link_to admin_stats_path %> +

<%= t("admin.verifications.index.title") %>

<%= render "admin/shared/user_search", url: search_admin_verifications_path %> diff --git a/spec/system/admin/verifications_spec.rb b/spec/system/admin/verifications_spec.rb index 98961a571..4700ad4c7 100644 --- a/spec/system/admin/verifications_spec.rb +++ b/spec/system/admin/verifications_spec.rb @@ -9,6 +9,7 @@ describe "Incomplete verifications", :admin do visit admin_verifications_path + expect(page).to have_link "Go back", href: admin_stats_path expect(page).to have_content(incompletely_verified_user1.username) expect(page).to have_content(incompletely_verified_user2.username) expect(page).not_to have_content(never_tried_to_verify_user.username)