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-12629: Page Right is shown when administering inexistent WebHome page #3603

Merged
merged 3 commits into from
Oct 28, 2024

Conversation

Sereza7
Copy link
Contributor

@Sereza7 Sereza7 commented Oct 25, 2024

Jira URL

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

Changes

Description

  • Fixed test that relied on an uncreated page's administration section

Clarifications

Screenshots & Video

None, test only change

Executed Tests

Successfully ran mvn clean install -f xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker -Pdocker

Expected merging strategy

…e page

* Fixed test that relied on an uncreated page's administration section
@Sereza7 Sereza7 added backport stable-15.10.x Used for automatic backport to 15.10.x branch. backport stable-16.4.x labels Oct 25, 2024
page = new AdministrablePage();
AdministrationPage pageAdministrationPage = page.clickAdministerPage();

assertEquals("Page Administration: NonExistentSpace", pageAdministrationPage.getDocumentTitle());
assertEquals("Page Administration: AdministrationIT.verifyAdministrationSections", pageAdministrationPage.getDocumentTitle());
Copy link
Member

Choose a reason for hiding this comment

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

This won't work if you execute the whole test suite as the test class will be NestedAdministrationIT. You need to use a serialization of the testReference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 61c2675 . I tested with the singular test already, but I'm currently running the whole test suite. I'll update this if the whole test suite does not pass somehow.

page = new AdministrablePage();
AdministrationPage pageAdministrationPage = page.clickAdministerPage();

assertEquals("Page Administration: NonExistentSpace", pageAdministrationPage.getDocumentTitle());
String fullName = setup.serializeReference(testReference.getParent()).split(":")[1];
Copy link
Member

@tmortagne tmortagne Oct 28, 2024

Choose a reason for hiding this comment

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

I think what you were searching for is TestUtils#serializeLocalReference (which does not contain the wiki part).

Copy link
Member

Choose a reason for hiding this comment

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

Hmmm I didn't paid enough attention: that one is not available in 15.10.x / 16.4.x. Backporting it.

@surli surli merged commit f3cfb75 into xwiki:master Oct 28, 2024
1 check passed
github-actions bot pushed a commit that referenced this pull request Oct 28, 2024
…e page (#3603)

* Fixed test that relied on an uncreated page's administration section
* Serialized the reference
  * Serialize the local reference

---------

Co-authored-by: Simon Urli <[email protected]>
(cherry picked from commit f3cfb75)
github-actions bot pushed a commit that referenced this pull request Oct 28, 2024
…e page (#3603)

* Fixed test that relied on an uncreated page's administration section
* Serialized the reference
  * Serialize the local reference

---------

Co-authored-by: Simon Urli <[email protected]>
(cherry picked from commit f3cfb75)
surli pushed a commit that referenced this pull request Oct 28, 2024
…e page (#3603)

* Fixed test that relied on an uncreated page's administration section
* Serialized the reference
  * Serialize the local reference

---------

Co-authored-by: Simon Urli <[email protected]>
(cherry picked from commit f3cfb75)
surli pushed a commit that referenced this pull request Oct 28, 2024
…e page (#3603)

* Fixed test that relied on an uncreated page's administration section
* Serialized the reference
  * Serialize the local reference

---------

Co-authored-by: Simon Urli <[email protected]>
(cherry picked from commit f3cfb75)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport stable-15.10.x Used for automatic backport to 15.10.x branch. backport stable-16.4.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants