Commit 98a6eca
Restore the CLARIN-only discovery facet tests to dtq-dev-9-base (#1427)
Source: origin/dtq-dev (a3627a6), ClarinDiscoveryRestControllerIT.java
Nothing on this branch covered the two CLARIN customisations of the hierarchical
subject facet, and one of them turned out to be broken.
On DSpace 7 the fork kept a 6088-line copy of DiscoveryRestControllerIT, because
that class hard-coded the vanilla facet list, failed under the CLARIN
discovery.xml and was @ignore'd at class level. DSpace 9 builds the expected
facets and filters from the live configuration instead
(FacetEntryMatcher.defaultFacetMatchers, SearchFilterMatcher.searchFilterMatchers),
so DiscoveryRestControllerIT runs here, unignored, against the CLARIN
configuration -- 71 of the copy's 74 tests exist there by the same name and are
green, and four tests the copy had to @ignore are active. Restoring the copy
verbatim is impossible anyway: every FacetEntryMatcher call it makes carries a
hasNext argument that v9 deleted, its four clarin*/dcType facet matchers and all
seven clarin* search-filter matchers no longer exist, and v9 renamed the type
facet to "itemtype". So this restores only what has no counterpart:
- showFacetValuesWithSplitterInSearchPage (subject facet, "::" splitter)
- doNotShowFacetValuesWithSplitterInHomePage (subjectFirstValue, homepage config)
Both test bodies are the dtq-dev originals, unchanged; no assertion was dropped.
The third test without a counterpart, discoverSearchSelfLinkKeepsScopeAndConfiguration
Test, belongs to card BE-02 and lands there in DiscoveryRestControllerIT.
Two configuration restores were needed to make them pass:
- discovery.xml, searchFilterSubject: restore skipFirstNodeLevel=false, added by
the fork in 46afa35 ("Show all values for the Subject facet in the search
page", #569) and lost in the v9 squash -- the bean is byte-identical with
vanilla 9.3 here, and HierarchicalSidebarFacetConfiguration defaults the flag
to true. Without it the search-page subject facet indexes and lists only the
leaf of an "A::B" value ("Jane" instead of "People" and "People::Jane"). This
is a live regression, not only a test one. The flag is applied at index time
(ItemIndexFactoryImpl), so a deployed instance needs `dspace index-discovery -b`
before the facet changes.
- test-discovery.xml: add the missing `homepage` entry. This file replaces the
whole DiscoveryConfigurationService bean, so its map -- not the one in
discovery.xml -- decides which ?configuration= names exist in ITs. The
homepageConfiguration and searchFilterSubjectFirstValue beans already exist on
this branch, so only the one map entry had to be merged.
Card: X-01 (split off the test-parity branch, which carries the other three
restored classes).
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 382360c commit 98a6eca
3 files changed
Lines changed: 153 additions & 0 deletions
File tree
- dspace-server-webapp/src/test
- data/dspaceFolder/config/spring/api
- java/org/dspace/app/rest
- dspace/config/spring/api
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
Lines changed: 148 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2682 | 2682 | | |
2683 | 2683 | | |
2684 | 2684 | | |
| 2685 | + | |
| 2686 | + | |
2685 | 2687 | | |
2686 | 2688 | | |
2687 | 2689 | | |
| |||
0 commit comments