-
Notifications
You must be signed in to change notification settings - Fork 765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: update to Phoenix HTML 4.1, bump dependencies #4277
Conversation
✅ Deploy Preview for teslamate ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thanks @sdwalker for your changes! |
Tests failing? |
Yeah, I assume this is the cause:
|
The mix files need cleaned to only have the phoenix changes and not include the rest of the unrelated package updates The gettext warnings are simple fixes when updating gettext The dependencies that aren't keeping up with package releases (websockex, timex) are another source of warnings |
I fixed it with the help of https://www.yellowduck.be/posts/fixing-the-gettext-warning-in-phoenix |
It looks like this function call teslamate/test/teslamate/vault_test.exs Line 11 in 30a947a
This puzzles me though, I don't see any changes here. Oh, I think this change upgraded Clock, so we got this breaking change: danielberkompas/cloak@267077e. Which is typical fashion wasn't documented as a breaking change :-( https://github.com/danielberkompas/cloak/blob/master/CHANGELOG.md |
If I am reading the stack trace correctly, this is returning an error tuple: teslamate/lib/teslamate/locations.ex Line 58 in 30a947a
Which seems to indicate we are getting here somehow: teslamate/test/support/mocks/geocoder.ex Line 150 in 2fc749c
|
They match the local changes I've been using |
Wow, nice catch. Ty! |
2 Test failures which needs to be fixed for the upcoming release (this is the blocker): 1) test language shows error (TeslaMateWeb.SettingsLiveTest)
Error: test/teslamate_web/live/settings_test.exs:189
** (FunctionClauseError) no function clause matching in Floki.find/2
The following arguments were given to Floki.find/2:
# 1
nil
# 2
"p.help"
Attempted function clauses (showing 2 out of 2):
def find(html, selector) when -is_binary(html)-
def find(html_tree_as_tuple, selector) when -is_list(html_tree_as_tuple)- or -is_binary(html_tree_as_tuple)- or -tuple_size(html_tree_as_tuple) == 3- or -tuple_size(html_tree_as_tuple) == 2- and (-elem(html_tree_as_tuple, 0) === :pi- or -elem(html_tree_as_tuple, 0) === :comment-) or -tuple_size(html_tree_as_tuple) == 4- and -elem(html_tree_as_tuple, 0) == :doctype-
code: TestHelper.eventually(fn ->
stacktrace:
(floki 0.36.2) lib/floki.ex:277: Floki.find/2
test/teslamate_web/live/settings_test.exs:231: anonymous fn/2 in TeslaMateWeb.SettingsLiveTest."test language shows error"/1
(teslamate 1.30.2-dev) test/support/test_helper.ex:7: TestHelper.eventually/3
test/teslamate_web/live/settings_test.exs:210: (test)
................................
2) test Edit validates changes when editing of a geo-fence (TeslaMateWeb.GeoFenceLiveTest)
Error: test/teslamate_web/live/geofence_live_test.exs:112
Assertion with == failed
code: assert error_html ==
"<span class=\"help is-danger pl-15\" phx-feedback-for=\"geo_fence_#{kind}\">can't be blank</span>"
left: "<span class=\"help is-danger pl-15\" phx-feedback-for=\"geo_fence[name]\">can't be blank</span>"
right: "<span class=\"help is-danger pl-15\" phx-feedback-for=\"geo_fence_name\">can't be blank</span>"
stacktrace:
(elixir 1.17.2) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
test/teslamate_web/live/geofence_live_test.exs:150: (test) |
first is related to:
second is related to:
|
I think there have been some minor changes in how field names are generated: <div class="field is-expanded">
<div class="control">
<input class="input" id="geo_fence_name" name="geo_fence[name]" placeholder="Name" type="text" value="">
</div>
<p class="help is-danger"><span class="help is-danger pl-15" phx-feedback-for="geo_fence[name]">can't be blank</span></p>
</div> What confused me for a while is that the
https://hexdocs.pm/phoenix_live_view/form-bindings.html That explains the 2nd error at least. |
Breaks upgrading floki 0.35.2 => 0.35.3 |
0.19.0 (2023-05-29)
|
We love it, when there are breaking changes in patch releases... Even if it's not mentioned in the changelog: https://hexdocs.pm/floki/changelog.html#0-35-3-2024-01-25 |
Downgrading floki is not an option, as |
I got rid of the second error, but quite sure this can be handled better. Pushes are welcome Imo only the test was wrong, as we set
|
Test passes if the div match is removed teslamate/test/teslamate_web/live/settings_test.exs Lines 217 to 230 in c7fd300
|
This reverts commit 6192026.
No description provided.