refactor
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing

This commit is contained in:
carla 2026-02-04 15:52:00 +01:00
parent e0f0ca369c
commit d34ff57531
6 changed files with 127 additions and 391 deletions

View file

@ -380,18 +380,14 @@ defmodule MvWeb.ImportExportLiveTest do
|> form("#csv-upload-form", %{})
|> render_submit()
# Wait a bit for processing to start
Process.sleep(200)
# In test mode chunks run synchronously, so we may already be :done when we check.
# Accept either progress container (if we caught :running) or results panel (if already :done).
_html = render(view)
# Check that import-progress-container exists (with aria-live for accessibility)
assert has_element?(view, "[data-testid='import-progress-container']")
assert has_element?(view, "[data-testid='import-progress-container']") or
has_element?(view, "[data-testid='import-results-panel']")
# Check that progress text is shown when running
html = render(view)
assert has_element?(view, "[data-testid='import-progress-text']") or
html =~ "Processing chunk"
# Final state should show import-results-panel
# Wait for final state and assert results panel is shown
Process.sleep(500)
assert has_element?(view, "[data-testid='import-results-panel']")
end
@ -552,9 +548,8 @@ defmodule MvWeb.ImportExportLiveTest do
assert html =~ "English Template" or html =~ "German Template" or
html =~ "English" or html =~ "German"
# Custom Fields section should have descriptive text (Data Field button)
# The component uses "New Data Field" button, not a link
assert html =~ "Data Field" or html =~ "New Data Field" or html =~ "Manage Memberdata"
# Import page has link "Manage Member Data" and info text about "data field"
assert html =~ "Manage Member Data" or html =~ "data field" or html =~ "Data field"
end
end