formatting and refactoring
This commit is contained in:
parent
bf7e47ce5c
commit
0fe4a55e80
2 changed files with 93 additions and 104 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