[xwiki/xwiki-platform] f17633: XWIKI-23771: AWM: Numeric field accepts invalid ch...
Branch: refs/heads/master Home: https://github.com/xwiki/xwiki-platform Commit: f176331f38ae1aac968ccf8f485c1155528164b9 https://github.com/xwiki/xwiki-platform/commit/f176331f38ae1aac968ccf8f485c1... Author: LucasC <[email protected]> Date: 2026-08-28 (Fri, 28 Aug 2026) Changed paths: M xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test/xwiki-platform-appwithinminutes-test-docker/src/test/it/org/xwiki/appwithinminutes/test/ui/NumberClassFieldIT.java M xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/NumberClass.java M xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/ApplicationResources.properties M xwiki-platform-core/xwiki-platform-oldcore/src/test/java/com/xpn/xwiki/objects/classes/NumberClassTest.java Log Message: ----------- XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit (#6231) * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Lowered the long type's min/max clamp from 2^53 to 2^52 * Removed the setSize() call from displayEdit() * Renamed browserRejectsOutOfRangeInput() to browserRejectsOutOfRangeAndDecimalInput() and extended it to also cover decimal input on the default long type * Updated NumberClassTest's expected safe integer limit * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Removed the min/max attributes and the SAFE_INTEGER_LIMIT constant for the long type * Renamed browserRejectsOutOfRangeAndDecimalInput() to browserRejectsDecimalInput() and made it cover both signs * Added saveShowsFriendlyErrorForOutOfRangeValue() covering the out-of-range long message * Updated NumberClassTest to expect no range on the long type * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Fixed the stale javadoc on browserRejectsDecimalInput() referencing the removed min attribute * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Merged browserRejectsDecimalInput() and saveShowsFriendlyErrorForOutOfRangeValue() into one scenario sharing a single fixture * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Merged browserRejectsInvalidInput() and browserRejectsDecimalAndServerRejectsOutOfRangeValue() into a single numberFieldValidation() scenario, so the AWM application, its class and its template entry are built once instead of twice. Functional tests are scenarios: what costs is the fixture, not the assertions, and both methods asserted properties of the same number input. * Documented why a valid in-range value is saved in the middle of the scenario: it covers the happy path now that the long range is no longer expressed as min and max attributes. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Passed the space reference to goToEditor() so the class is created on a terminal page * Restored the @BeforeEach logging in as superadmin and deleting the test space * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Restored the original reason for the mid-scenario save in the comment * XWIKI-23771: AWM: Numeric field accepts invalid characters, causing server error on edit * Added a dedicated message for the step mismatch asking for a whole number * Set the step mismatch attribute only on the integer and long types * Updated NumberClassTest for the new step mismatch expectations --------- Co-authored-by: Vincent Massol <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications