From 466f1117122c386d5eb9681fe1876e96d00cf613 Mon Sep 17 00:00:00 2001 From: Michael Kohl Date: Mon, 3 Jan 2022 22:20:29 +0700 Subject: [PATCH] Remove sign in/up link from navlinks (#15922) * Remove sign in/up link from navlinks * Remove translations * Update spec --- app/views/layouts/_main_nav.html.erb | 8 -------- config/locales/views/main/en.yml | 1 - config/locales/views/main/fr.yml | 1 - spec/system/homepage/user_visits_homepage_spec.rb | 6 +++--- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/app/views/layouts/_main_nav.html.erb b/app/views/layouts/_main_nav.html.erb index 70c796480..b1d87c764 100644 --- a/app/views/layouts/_main_nav.html.erb +++ b/app/views/layouts/_main_nav.html.erb @@ -9,14 +9,6 @@ <%= t("views.main.home") %> -
  • - <% unless user_signed_in? %> - - <%= inline_svg_tag("twemoji/handshake.svg", class: "crayons-icon crayons-icon--default c-link__icon", aria_hidden: true) %> - <%= t("views.main.signup") %> - - <% end %> -
  • <% default_nav_links.each do |link| %> <%= render "layouts/sidebar_nav_link", link: link %> <% end %> diff --git a/config/locales/views/main/en.yml b/config/locales/views/main/en.yml index cbe7bd9a4..e9804a8f3 100644 --- a/config/locales/views/main/en.yml +++ b/config/locales/views/main/en.yml @@ -69,4 +69,3 @@ en: home: Home create_post: Create Post signout: Sign Out - signup: Sign In/Up diff --git a/config/locales/views/main/fr.yml b/config/locales/views/main/fr.yml index 5a740d9f4..ab16e3495 100644 --- a/config/locales/views/main/fr.yml +++ b/config/locales/views/main/fr.yml @@ -69,4 +69,3 @@ fr: home: Page D'Accueil create_post: Créer une publication signout: Se déconnecter - signup: Sign In/Up diff --git a/spec/system/homepage/user_visits_homepage_spec.rb b/spec/system/homepage/user_visits_homepage_spec.rb index 937efbc54..aa05d0200 100644 --- a/spec/system/homepage/user_visits_homepage_spec.rb +++ b/spec/system/homepage/user_visits_homepage_spec.rb @@ -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