In our project it’s quite common that we’re doing assertions on certain attributes while testing components:
html = render_component(&MyComponent.render/1, %{})
assert html =~ ~s(<form phx-change="change" phx-submit="submit" phx-target="1">)
Since upgrading to OTP26 where map keys for smaller maps are no longer ordered the same way they were before we’ve started seeing very flaky tests. It’s quite often a test fails because the order of the custom attributes falling under changes order between runs
attr :rest, :global
I understand that it’s somewhat expected behaviour since the change but what would be the best way to remedy the the situation (we’ve ruled out using floki
and removing the assertions at the moment)?