diff --git a/app/assets/stylesheets/layout/account_menu.scss b/app/assets/stylesheets/layout/account_menu.scss
index 2d4f23d81..1539bc425 100644
--- a/app/assets/stylesheets/layout/account_menu.scss
+++ b/app/assets/stylesheets/layout/account_menu.scss
@@ -32,8 +32,10 @@
width: auto;
}
- a {
+ a,
+ button {
color: inherit;
+ cursor: pointer;
line-height: inherit;
padding-left: 0;
@@ -41,6 +43,10 @@
font-size: $small-font-size;
padding: rem-calc(8) rem-calc(16);
}
+
+ &:hover {
+ text-decoration: underline;
+ }
}
.button {
diff --git a/app/components/layout/login_items_component.html.erb b/app/components/layout/login_items_component.html.erb
index 73220dffb..5758aaba2 100644
--- a/app/components/layout/login_items_component.html.erb
+++ b/app/components/layout/login_items_component.html.erb
@@ -18,8 +18,8 @@
t("layouts.header.my_account_link") %>
- <%= link_to t("devise_views.menu.login_items.logout"),
- destroy_user_session_path, rel: "nofollow", method: :delete %>
+ <%= button_to t("devise_views.menu.login_items.logout"),
+ destroy_user_session_path, rel: "nofollow", method: :delete %>
<% else %>
diff --git a/spec/components/layout/admin_header_component_spec.rb b/spec/components/layout/admin_header_component_spec.rb
index 61170b25e..9cf0c8a21 100644
--- a/spec/components/layout/admin_header_component_spec.rb
+++ b/spec/components/layout/admin_header_component_spec.rb
@@ -18,7 +18,7 @@ describe Layout::AdminHeaderComponent do
expect(page).to have_link "You don't have new notifications"
expect(page).to have_link "My content"
expect(page).to have_link "My account"
- expect(page).to have_link "Sign out"
+ expect(page).to have_button "Sign out"
expect(page).to have_css "[data-toggle]"
end
diff --git a/spec/system/moderation/users_spec.rb b/spec/system/moderation/users_spec.rb
index b9bd1ffa3..d1ba16bc6 100644
--- a/spec/system/moderation/users_spec.rb
+++ b/spec/system/moderation/users_spec.rb
@@ -39,7 +39,7 @@ describe "Moderate users" do
expect(page).to have_css "h1", exact_text: debate3.title
expect(page).not_to have_content(comment3.body)
- click_link "Sign out"
+ click_button "Sign out"
expect(page).to have_content "You have been signed out successfully"
diff --git a/spec/system/polls/polls_spec.rb b/spec/system/polls/polls_spec.rb
index 719572cb1..0030460c8 100644
--- a/spec/system/polls/polls_spec.rb
+++ b/spec/system/polls/polls_spec.rb
@@ -294,7 +294,7 @@ describe "Polls" do
expect(page).to have_content "Vote introduced!"
within("#notice") { click_button "Close" }
- click_link "Sign out"
+ click_button "Sign out"
expect(page).to have_content "You must sign in or register to continue."
diff --git a/spec/system/sessions_spec.rb b/spec/system/sessions_spec.rb
index 8f3a1803b..6a9eb8d8d 100644
--- a/spec/system/sessions_spec.rb
+++ b/spec/system/sessions_spec.rb
@@ -16,7 +16,7 @@ describe "Sessions" do
within("#notice") { click_button "Close" }
- click_link "Sign out"
+ click_button "Sign out"
expect(page).to have_content("You have been signed out successfully")
expect(page).to have_current_path(debate_path(debate))
@@ -63,7 +63,7 @@ describe "Sessions" do
expect(page).to have_content(/errors prevented the verification of your residence/)
- click_link "Sign out"
+ click_button "Sign out"
expect(page).to have_content "You must sign in or register to continue."
expect(page).to have_current_path new_user_session_path
diff --git a/spec/system/users_auth_spec.rb b/spec/system/users_auth_spec.rb
index bdea11eb3..970760354 100644
--- a/spec/system/users_auth_spec.rb
+++ b/spec/system/users_auth_spec.rb
@@ -85,7 +85,7 @@ describe "Users" do
expect(page).to have_link "My content", href: user_path(u1)
within("#notice") { click_button "Close" }
- click_link "Sign out"
+ click_button "Sign out"
expect(page).to have_content "You have been signed out successfully."
@@ -495,7 +495,7 @@ describe "Users" do
login_as(user)
visit "/"
- click_link "Sign out"
+ click_button "Sign out"
expect(page).to have_content "You have been signed out successfully."
end