Skip to content

Commit

Permalink
Make the TigerData logo clickable (#607)
Browse files Browse the repository at this point in the history
* Make TigerData logo clickable to take user home

* Make the logo clickable

Co-authored-by: Bess Sadler <bess@users.noreply.github.com>

---------

Co-authored-by: Bess Sadler <bess@users.noreply.github.com>
  • Loading branch information
leefaisonr and bess authored Mar 26, 2024
1 parent 88dc53f commit 794e023
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/shared/_header.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<header>
<div id="header">
<nav>
<%= image_tag("TigerData-LOGO-KO_wide2.svg", alt: "TigerData logo", size: "150x100") %>
<a href="/">
<%= image_tag("TigerData-LOGO-KO_wide2.svg", alt: "TigerData logo", size: "150x100", id: "logo") %>
</a>
<div class="body">
<%= link_to "Home", root_path, class: "navbar-brand"%>
<% if current_user %>
Expand Down
7 changes: 7 additions & 0 deletions spec/system/welcome_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@
# The current user has no access to this project so we don't expect to see it
expect(page).not_to have_content "project 444"
end
it "allows for navigation back to user dashboard when clicking logo" do
sign_in current_user
visit "/projects"
expect(page).to have_content "project 111"
page.find(:css, "#logo").click
expect(page).to have_content("Welcome, #{current_user.given_name}!")
end
end

context "for a user without any projects" do
Expand Down

0 comments on commit 794e023

Please sign in to comment.