Open
Conversation
List of changes: - add Elixir 1.18 to CI build matrix - bump GitHub actions - migrate Mix.Config to Config - resolve test error with overriden field_constructor env value - use shorter version in build matrix
kianmeng
commented
Jan 3, 2025
Comment on lines
+65
to
+70
| original_field_constructor = Application.get_env(:absinthe_error_payload, :field_constructor) | ||
| Application.put_env(:absinthe_error_payload, :field_constructor, CustomFieldConstructor) | ||
|
|
||
| on_exit(fn -> | ||
| Application.put_env(:absinthe_error_payload, :field_constructor, original_field_constructor) | ||
| end) |
Contributor
Author
There was a problem hiding this comment.
Running ExUnit with seed: 554479, max_cases: 16
..........................
1) test multiples multiple fields with errors (AbsintheErrorPayload.ChangesetParserTest)
test/changeset_parser_test.exs:88
match (=) failed
code: assert %ValidationMessage{field: "author.name", key: :name} = first
left: %AbsintheErrorPayload.ValidationMessage{field: "author.name", key: :name}
right: %AbsintheErrorPayload.ValidationMessage{
field: "author›name",
key: :name,
code: :required,
options: [],
template: "can't be blank",
message: "can't be blank"
}
stacktrace:
test/changeset_parser_test.exs:104: (test)
..
2) test nested nested fields with errors on replaced embeds_many (AbsintheErrorPayload.ChangesetParserTest)
test/changeset_parser_test.exs:154
match (=) failed
code: assert %ValidationMessage{
message: "can't be blank",
code: :required,
field: "embedded_tags.0.name",
key: :name
} = first
left: %AbsintheErrorPayload.ValidationMessage{
message: "can't be blank",
code: :required,
field: "embedded_tags.0.name",
key: :name
}
right: %AbsintheErrorPayload.ValidationMessage{
field: "embedded_tags@0›name",
key: :name,
code: :required,
options: [],
template: "can't be blank",
message: "can't be blank"
}
stacktrace:
test/changeset_parser_test.exs:168: (test)
...
3) test nested nested has many fields with errors (AbsintheErrorPayload.ChangesetParserTest)
test/changeset_parser_test.exs:172
match (=) failed
code: assert %ValidationMessage{code: :required, field: "tags.0.name", key: :name} = first
left: %AbsintheErrorPayload.ValidationMessage{code: :required, field: "tags.0.name", key: :name}
right: %AbsintheErrorPayload.ValidationMessage{
field: "tags@0›name",
key: :name,
code: :required,
options: [],
template: "can't be blank",
message: "can't be blank"
}
stacktrace:
test/changeset_parser_test.exs:186: (test)
....
4) test nested nested fields with errors (AbsintheErrorPayload.ChangesetParserTest)
test/changeset_parser_test.exs:137
match (=) failed
code: assert %ValidationMessage{code: :required, field: "author.name", key: :name} = first
left: %AbsintheErrorPayload.ValidationMessage{code: :required, field: "author.name", key: :name}
right: %AbsintheErrorPayload.ValidationMessage{
field: "author›name",
key: :name,
code: :required,
options: [],
template: "can't be blank",
message: "can't be blank"
}
stacktrace:
test/changeset_parser_test.exs:151: (test)
..
5) test construct_message/2 creates expected struct (AbsintheErrorPayload.ChangesetParserTest)
test/changeset_parser_test.exs:192
Assertion with == failed
code: assert message.field == :title
left: "@root›title"
right: :title
stacktrace:
test/changeset_parser_test.exs:201: (test)
........
Finished in 0.6 seconds (0.00s async, 0.6s sync)
1 doctest, 49 tests, 5 failures
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📖 Description and reason
Support and resolves issues related to Elixir 1.18.
👷 Work done
Tasks
List of changes:
Additional notes
🎉 Result
🦀 Dispatch
#dispatch/elixir