Setup docs unclear when using Phoenix but not Ecto
Corkle opened this issue · 3 comments
Elixir and Erlang/OTP versions
Elixir 1.16.2
Erlang/OTP 26
Operating system
Debian 12
Browser
Chrome
Driver
ChromeDriver
Correct Configuration
- I confirm that I have Wallaby configured correctly.
Current behavior
I had some difficulty parsing the setup docs to understand what configuration is required for a Phoenix application without Ecto. Below are the sections that did not seem required when first reading the docs:
- Under the Installation section of the docs, the final statement reads like it is dependent on the previous statement. Because of the word "then" in the last statement, my initial understanding was that it was conditional on using Ecto.
Without this statement in my test helpers file, I would get a process not alive error. I deduce that this is a required configuration step for all applications regardless of using Ecto.
- The other configuration step that was unclear is under the Phoenix section. The first line of this section states that the following step only applies if using Phoenix with Ecto and sandbox supported database. Every statement that follows in this section has a reference to a database or sandbox except the final one which appears to be a required configuration step regardless of using Ecto or a database. The word "finally" made me think this statement was also dependent on the previous steps which did not apply in my case.
The error message thrown when running a test without this configuration in test helpers was very helpful in pointing out what was missing.
Expected behavior
If these two configuration steps are required to test Phoenix applications even without using Ecto, the documentation could be improved to make this more obvious. The fact that they are at the very end of their respective sections followed by conditional cases makes it easy to skim past them or misinterpret their importance.
I think removing the adverbs in these statements and/or moving the statements above the conditionals for Ecto could make this more clear that they need to be added to test_helpers.exs.
Test Code & HTML
N/A
Demonstration Project
No response
PR to clarify the docs would be appreciated!