fix facets not being persisted when applied from the URL #1429
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.
When sending facets in a search request, there is logic that first checks
whether FACET_FILTER_NODES exist. If none exist, we default to using whatever
was persisted in the URL. The issue was that this logic was not being duplicated
for persisting facets in the URL. If facets were applied from the URL on a search
run on page load, for example, we would try to persist facets using the FACET_FILTER_NODE
state on page load, which would be no filter nodes existing. Defaulting this to whatever
is persisted in the URL fixes the issue.
J=SLAP-1377
TEST=manual,auto
saw that I can double refresh the page with facets applied from the url, and also
that the back and forwards buttons work for facets
added a additional refresh and forward nav actions to the facetsonload acceptance test to
test double refreshing and forward naving with facets from the URL
saw that, without this fix updating the acceptance test this way would cause it to fail
added a new facetsonload.html for this test, with the only difference being
searchOnChange: true for facets (which is the default as well as more common config setting)