Open ftes opened 3 weeks ago
In my eyes this is the most promising approach of the three so far (#136 , #74 #145).
The amount of code required to interface with playwright via a Port
is fairly small.
And this gives us the flexibility to tailor the exact behaviour to PhoenixTest
.
@germsvel If you have time I'd appreciate hearing your thoughts.
New Idea: Performant assertions + helpful and consistent error messages in case of failure:
Happy path (test succeeds): Assert using playwright
primitives.
Test fails: Generate error by calling PhoenixTest.Assertions
or PhoenixTest.Element.*.find*
function.
Replaced also_test_js
macro with ExUnit 1.18 parameterized
tests.
As a side effect, playwright tests only run for the CI test matrix elixir=main1.18
(1.18) entry. And not for the older versions.
Given this would be a driver in "beta" state anyway, I think that's fine.
Add
Playwright
test driver. It communicates with the playwrightnode.js
server via aPort
. No additional dependencies.Details
1.18
to use parameterized ExUnit tests (run live/static tests also with playwright)Port
)PhoenixTest.Case
to allow easily switching drivers via@tag :playwright
ecto
+postgres
to test sandboxing of concurrent browser testsOut of scope (just document how to)