User LiveViews: row_id and data-testid for actions
Table row_id for scoped selectors; data-testid on New/Edit/Delete.
This commit is contained in:
parent
a4b13cef49
commit
ee6bfbacbb
2 changed files with 16 additions and 4 deletions
|
|
@ -42,7 +42,11 @@ defmodule MvWeb.UserLive.Show do
|
|||
<span class="sr-only">{gettext("Back to users list")}</span>
|
||||
</.button>
|
||||
<%= if can?(@current_user, :update, @user) do %>
|
||||
<.button variant="primary" navigate={~p"/users/#{@user}/edit?return_to=show"}>
|
||||
<.button
|
||||
variant="primary"
|
||||
navigate={~p"/users/#{@user}/edit?return_to=show"}
|
||||
data-testid="user-edit"
|
||||
>
|
||||
<.icon name="hero-pencil-square" /> {gettext("Edit User")}
|
||||
</.button>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue