Remove sign in/up link from navlinks (#15922)

* Remove sign in/up link from navlinks

* Remove translations

* Update spec
This commit is contained in:
Michael Kohl 2022-01-03 22:20:29 +07:00 committed by GitHub
parent fbd733d8e0
commit 466f111712
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 13 deletions

View file

@ -9,14 +9,6 @@
<%= t("views.main.home") %>
</a>
</li>
<li>
<% unless user_signed_in? %>
<a href="<%= sign_up_path %>" class="c-link c-link--block c-link--icon-left fw-bold">
<%= inline_svg_tag("twemoji/handshake.svg", class: "crayons-icon crayons-icon--default c-link__icon", aria_hidden: true) %>
<%= t("views.main.signup") %>
</a>
<% end %>
</li>
<% default_nav_links.each do |link| %>
<%= render "layouts/sidebar_nav_link", link: link %>
<% end %>

View file

@ -69,4 +69,3 @@ en:
home: Home
create_post: Create Post
signout: Sign Out
signup: Sign In/Up

View file

@ -69,4 +69,3 @@ fr:
home: Page D'Accueil
create_post: Créer une publication
signout: Se déconnecter
signup: Sign In/Up

View file

@ -97,8 +97,8 @@ RSpec.describe "User visits a homepage", type: :system do
visit "/"
within("#main-navigation", match: :first) do
expect(page).to have_selector(".default-navigation-links li:nth-child(3)", text: "Shop")
expect(page).to have_selector(".default-navigation-links li:nth-child(4)", text: "Mock")
expect(page).to have_selector(".default-navigation-links li:nth-child(2)", text: "Shop")
expect(page).to have_selector(".default-navigation-links li:nth-child(3)", text: "Mock")
end
end
end
@ -220,7 +220,7 @@ RSpec.describe "User visits a homepage", type: :system do
it "shows link when display_only_when_signed_in is true" do
within("#main-navigation", match: :first) do
expect(page).to have_selector(".default-navigation-links li:nth-child(4)", text: "Beauty")
expect(page).to have_selector(".default-navigation-links li:nth-child(3)", text: "Beauty")
end
end
end