2 changed files with 17 additions and 16 deletions
|
|
@ -92,6 +92,7 @@ defmodule MvWeb.ImportLive do
|
|||
<Layouts.app flash={@flash} current_user={@current_user} club_name={@club_name}>
|
||||
<%= if Authorization.can?(@current_user, :create, Mv.Membership.Member) do %>
|
||||
<%!-- CSV Import Section --%>
|
||||
<div data-testid="import-page">
|
||||
<.header>
|
||||
{gettext("Import Members")}
|
||||
<:subtitle>
|
||||
|
|
@ -106,6 +107,7 @@ defmodule MvWeb.ImportLive do
|
|||
<Components.import_progress {assigns} />
|
||||
<% end %>
|
||||
</.form_section>
|
||||
</div>
|
||||
<% else %>
|
||||
<div role="alert" class="alert alert-error">
|
||||
<.icon name="hero-exclamation-circle" class="size-5" aria-hidden="true" />
|
||||
|
|
|
|||
|
|
@ -235,11 +235,10 @@ defmodule MvWeb.ImportLiveTest do
|
|||
|
||||
test "page loads and shows import form", %{conn: conn} do
|
||||
{:ok, view, _html} = live(conn, ~p"/admin/import")
|
||||
assert has_element?(view, "[data-testid='import-page']")
|
||||
assert has_element?(view, "[data-testid='csv-upload-form']")
|
||||
assert has_element?(view, "[data-testid='start-import-button']")
|
||||
assert has_element?(view, "[data-testid='custom-fields-link']")
|
||||
html = render(view)
|
||||
assert html =~ "Import Members (CSV)"
|
||||
end
|
||||
|
||||
test "template links and file input are present", %{conn: conn} do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue