Closed stevegrossi closed 7 years ago
So, the problem I'm trying to solve now is that all of my acceptance tests pass when run individually, but when I run mix test test/acceptance
they throw JS errors (like Possible Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'this.state.habits.filter')
) and fail. Clearly, these tests are stepping on each others' toes, but
async: true
Ecto.Adapters.SQL.Sandbox.mode(Habits.Repo, {:shared, self()})
, maybe that doesn't run in a transaction (or get reset) between tests? Update: SQL.Sandbox
definitely runs in a transaction, but I don't know if I have to (and if so how) to roll back that transaction between tests.I've asked for help in the Elixir Forum: https://elixirforum.com/t/wallaby-acceptance-tests-pass-individually-fail-when-run-together/6713 🤞
I believe the persistence of the token in localstorage across PhantomJS sessions may be a bug in Wallaby. I was able to reproduce it in a sample application and I opened an issue in the Wallaby repo: https://github.com/keathley/wallaby/issues/274
Array.prototype.find
since phantomjs' version of webkit doesn't yet support it