LearnNewsExamplesServices
Frontmatter
titletest(Number): Add Playwright tests for number input #7444
authorerbierc
stateMerged
createdAtOct 21, 2025, 10:00 PM
updatedAtNov 11, 2025, 12:20 PM
closedAtOct 25, 2025, 2:50 PM
mergedAtOct 25, 2025, 2:50 PM
branchesdevtest-form-field-number-playwright
urlhttps://github.com/neomjs/neo/pull/7597
Merged
erbierc
erbierc commented on Oct 21, 2025, 10:00 PM

Please make sure to read the Contributing Guidelines:

https://github.com/neomjs/neo/blob/dev/CONTRIBUTING.md

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe: Test (not a refactor, since Number was not tested before)

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the dev branch, not the main branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information: Solves #7444

tobiu
tobiu commented on Oct 24, 2025, 10:42 AM

Input from Gemini:

✦ This is a fantastic start, thank you for taking the initiative to add Playwright tests for the Number field! It's a complex component, and getting the first set of tests in place is a valuable contribution.

The tests for creation and basic spinning are great. To make this initial PR a bit more complete before we merge it, could you please add two small things to the "wrap around" test?

  1. Also test the opposite direction: decrementing from minValue to ensure it wraps around to maxValue.
  2. Use { force: true } for the click() calls in this test to ensure consistency and prevent potential flakiness.

This PR is a great foundation. It doesn't need to be exhaustive, but adding the downward wrap test would make this initial set more robust. We can create follow-up tickets to tackle the many other configs like stepSize, triggerPosition, and inputEditable in the future.

Again, great work on this!


erbierc
erbierc commented on Oct 24, 2025, 9:26 PM

Added!


tobiu
tobiu commented on Oct 25, 2025, 2:47 PM

Input from Gemini 2.5 pro:

✦ Review: Approved

This PR is approved. The changes address the feedback provided in the previous review comments.

Key points:

  • A new test case should wrap around when falling below minValue has been added, ensuring comprehensive coverage for the wrap-around functionality.
  • All click() calls in the spin button and wrap-around tests now correctly utilize { force: true }, enhancing test stability and preventing flakiness.

The tests are well-structured and effectively validate the Number field's behavior. Great work!