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-22121: Improve the registration experience #3633

Merged
merged 2 commits into from
Nov 8, 2024

Conversation

Sereza7
Copy link
Contributor

@Sereza7 Sereza7 commented Nov 8, 2024

Jira URL

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

Changes

Description

  • Removed an escaping that wasn't needed and caused a test to not pass.
  • Updated the test to work with the updated Registration template
  • Fixed a XPath on AbstractRegistrationPage.java to be more permissive and work with the latest changes.## Clarifications
  • RegisterIT was broken on master. Those fixes allow the test to pass.

Screenshots & Video

None, mostly test changes

Executed Tests

Successfully passed mvn clean install -f xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker -Dit.test=RegisterIT. Before the changes proposed in this PR I could reproduce locally the fails found on CI with this command.

Expected merging strategy

* Removed an escaping that wasn't needed and caused a test to not pass.
* Updated the test to work with the updated Registration template
* Fixed a XPath on AbstractRegistrationPage.java to be more permissive and work with the latest changes.
@Sereza7 Sereza7 marked this pull request as ready for review November 8, 2024 13:16
@Sereza7 Sereza7 requested a review from surli November 8, 2024 13:16
AbstractRegistrationPage.JOHN_SMITH_USERNAME),
assertEquals(String.format("%s%s %s (%s)%s", messagePrefix, firstName, lastName,
AbstractRegistrationPage.JOHN_SMITH_USERNAME,
!closedWiki&&withRegistrationConfig ? "" : ": Registration successful."),
Copy link
Member

Choose a reason for hiding this comment

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

That feels weird, you're sure it's expected to not have "Registration successful" in close wiki?

Copy link
Contributor Author

@Sereza7 Sereza7 Nov 8, 2024

Choose a reason for hiding this comment

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

@surli
Tbh this is more or less hardcoded to fit the results.

This set of conditions is the only one where the template defined in Registration.xml is used. I did update this template in the rework, the Registration successful string is in a separate element. I did not update the other templates, so for the moment the templates are not consistent with one another.


My guess is that if the wiki is closed the guest does not have access to this template and we rely on a public template somewhere else. This template is the default value when we set the registrationConfig, so I guess it's not used if the withRegistrationConfig is false.

@surli surli merged commit b7b65fa into xwiki:master Nov 8, 2024
1 check passed
@Sereza7
Copy link
Contributor Author

Sereza7 commented Nov 8, 2024

For reference, I created the ticket https://jira.xwiki.org/browse/XWIKI-22648 on jira for this TODO and improvements of this test.

@surli
Copy link
Member

surli commented Nov 8, 2024

thanks

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.

2 participants