Skip to content
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

XWIKI-20632: Page searched by its exact name is not found in a page picker for a macro parameter when its subtree is larger than 10 pages #2945

Merged
merged 3 commits into from
Mar 21, 2024

Conversation

michitux
Copy link
Contributor

Jira URL

https://jira.xwiki.org/browse/XWIKI-20632

Changes

Description

  • Search only in the actual page name, not in the space hierarchy.

Clarifications

  • As explained in the comments on the issue, the search was never supposed to take the space hierarchy into account. This changes the code to follow the specification.

Screenshots & Video

No UI change except that the search results are different now.

Executed Tests

Manually tested the change, still need to see if we have any existing tests.

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • stable-15.10.x

…icker for a macro parameter when its subtree is larger than 10 pages

* Search only in the actual page name, not in the space hierarchy.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small note but there's no unit test for this class?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, there do not seem to be any unit tests for this class.

Copy link
Contributor

@manuelleduc manuelleduc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm modulo missing tests. No sure exactly what best to test. Testing the well-formedness of the queries is an easy first step. Then, I wonder if a functional test covering this case is interesting.

…icker for a macro parameter when its subtree is larger than 10 pages

* Add tests.
@michitux
Copy link
Contributor Author

michitux commented Mar 1, 2024

I have added two integration tests now: one on the level of the REST API, and another for the page picker.

I ran

  • mvn clean install -Pintegration-tests,docker,legacy,standalone -pl :xwiki-platform-flamingo-skin-test-docker,:xwiki-platform-rest-server -Dit.test=PagePickerIT
  • mvn clean install -Pintegration-tests,docker,legacy,standalone,quality -pl :xwiki-platform-rest-server,:xwiki-platform-rest-test-tests

Both passed.

…icker for a macro parameter when its subtree is larger than 10 pages

* Reduce the number of pages created in the test.
@michitux michitux merged commit d9e3fad into xwiki:master Mar 21, 2024
1 check passed
github-actions bot pushed a commit that referenced this pull request Mar 21, 2024
…icker for a macro parameter when its subtree is larger than 10 pages (#2945)

* Search only in the actual page name, not in the space hierarchy.
* Add tests.

(cherry picked from commit d9e3fad)
michitux added a commit that referenced this pull request Mar 21, 2024
…icker for a macro parameter when its subtree is larger than 10 pages (#2945)

* Search only in the actual page name, not in the space hierarchy.
* Add tests.

(cherry picked from commit d9e3fad)
@michitux michitux deleted the XWIKI-20632 branch November 6, 2024 14:44
michitux added a commit that referenced this pull request Nov 6, 2024
…icker for a macro parameter when its subtree is larger than 10 pages (#2945)

* Search only in the actual page name, not in the space hierarchy.
* Add tests.

(cherry picked from commit d9e3fad)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants