This commit is contained in:
parent
d02f725d51
commit
ffe146716b
3 changed files with 102 additions and 106 deletions
|
|
@ -28,17 +28,21 @@ defmodule MvWeb.GlobalSettingsLiveTest do
|
|||
if has_element?(view, "[data-testid='import-results-panel']") do
|
||||
{:halt, html}
|
||||
else
|
||||
if attempt < max_attempts do
|
||||
# Process any pending messages
|
||||
:timer.sleep(50)
|
||||
{:cont, nil}
|
||||
else
|
||||
{:halt, html}
|
||||
end
|
||||
check_attempt_limit(attempt, max_attempts, html)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
# Checks if we should continue or halt based on attempt limit
|
||||
defp check_attempt_limit(attempt, max_attempts, html) do
|
||||
if attempt < max_attempts do
|
||||
:timer.sleep(50)
|
||||
{:cont, nil}
|
||||
else
|
||||
{:halt, html}
|
||||
end
|
||||
end
|
||||
|
||||
describe "Global Settings LiveView" do
|
||||
setup %{conn: conn} do
|
||||
user = create_test_user(%{email: "admin@example.com"})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue