Skip to content

Commit 66647c2

Browse files
committed
fix(e2e): Make sure that ui test case is in elixirc paths only when doign UI tests
1 parent b70d101 commit 66647c2

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

e2e/mix.exs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,24 @@ defmodule E2E.MixProject do
1919
]
2020
end
2121

22-
defp elixirc_paths(:test), do: ["lib", "test/support"]
22+
defp elixirc_paths(:test) do
23+
base = ["lib", "test/support"]
24+
if System.get_env("START_WALLABY") do
25+
base
26+
else
27+
# Exclude ui_test_case.ex if Wallaby is not available
28+
["lib", "test/support"]
29+
|> Enum.flat_map(fn path ->
30+
if path == "test/support" do
31+
Path.wildcard("test/support/*.ex")
32+
|> Enum.reject(&(&1 =~ "ui_test_case.ex"))
33+
else
34+
[path]
35+
end
36+
end)
37+
end
38+
end
39+
2340
defp elixirc_paths(:dev), do: ["lib", "test/support"]
2441
defp elixirc_paths(_), do: ["lib"]
2542

0 commit comments

Comments
 (0)