Use a button to erase an account in the management area
As mentioned in commit 5311daadf, there are several reasons to use
buttons in these situations. And, as mentioned in the previous commit,
using buttons instead of links for actions requiring confirmation will
help us test for accessibility issues.
This commit is contained in:
@@ -5,5 +5,5 @@
|
||||
<%= t("management.users.erase_warning") %>
|
||||
</div>
|
||||
|
||||
<%= link_to t("management.users.erase_submit"), erase_management_users_path, method: :delete, class: "button hollow alert", data: { confirm: t("management.users.erase_account_confirm") } %>
|
||||
<%= button_to t("management.users.erase_submit"), erase_management_users_path, method: :delete, class: "button hollow alert", data: { confirm: t("management.users.erase_account_confirm") } %>
|
||||
</div>
|
||||
|
||||
@@ -82,7 +82,7 @@ describe "Users" do
|
||||
expect(page).to have_content "This user can participate in the website with the following permissions"
|
||||
|
||||
click_link "Delete user"
|
||||
accept_confirm { click_link "Delete account" }
|
||||
accept_confirm { click_button "Delete account" }
|
||||
|
||||
expect(page).to have_content "User account deleted."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user