-
Notifications
You must be signed in to change notification settings - Fork 0
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
Sort nil dates last in both directions #278
Conversation
Container Scanning Status: ✅ Success
|
69467ec
to
755e697
Compare
@@ -114,6 +114,48 @@ defmodule DpulCollectionsWeb.SearchLiveTest do | |||
|> Enum.empty?() | |||
end | |||
|
|||
test "when sorting by date, a nil date always sorts last", %{conn: conn} do | |||
# {"id": "nildate", "title_txtm": "Document Nil Date"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these comments still useful to have?
{:ok, view, html} = live(conn, "/search?sort_by=date_desc&page=11") | ||
{:ok, document} = Floki.parse_document(html) | ||
|
||
assert document |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Can we use has_element?
instead of Floki parsing the HTML? https://hexdocs.pm/phoenix_live_view/Phoenix.LiveViewTest.html#has_element?/3
755e697
to
52532f9
Compare
@tpendragon thanks for the suggestions, it's updated |
companion PR: pulibrary/pul_solr#445
This will probably require a reindex (via
DpulCollections.IndexingPipeline.Figgy.IndexingConsumer.start_over!(n)
)advances #272