Widget: Number Input
Description
This feature contains the widget for the number input
Related Issue(s)
Checklist
- Dashboard widget ✅
- Tests ✅
- Docs of the widget (including tryout button) ✅
- Interactive dashboard docs - Will be created and published once the widget published 🚀
- [x] I have read the contribution guidelines
- [x] Suitable unit/system level tests have been added and they pass
- [x] Documentation has been updated
- [ ] Upgrade instructions
- [ ] Configuration details
- [ ] Concepts
- [ ] Changes
flowforge.yml?- [ ] Issue/PR raised on
FlowFuse/helmto update ConfigMap Template - [ ] Issue/PR raised on
FlowFuse/CloudProjectto update values for Staging/Production
- [ ] Issue/PR raised on
Labels
- [ ] Includes a DB migration? -> add the
area:migrationlabel
Your 2 x E2E tests are failing, and have you 4 being skipped?
Your 2 x E2E tests are failing, and have you 4 being skipped?
![]()
This is my bad. I saw couple of time out issues so I thought it's because of the existing issue https://github.com/FlowFuse/node-red-dashboard/issues/882
I will update them
Checkout the other PR I've opened up for the E2E docs which will help get your local environment uo and running
Checkout the other PR I've opened up for the E2E docs which will help get your local environment uo and running
Thank you so much. I will check it for sure
Checkout the other PR I've opened up for the E2E docs which will help get your local environment uo and running
This is ready for to review
If I type a double-digit number into the widget, then a message is sent halfway through typing the number - this isn't desirable.
I'd expect the event to be sent when either the up/down arrows are selected, or after I've move focus out of the number input, or set a 300ms timeout (or something similar) that waits to make sure no other input follows, before sending the message
either
I'll work on that
If I type a double-digit number into the widget, then a message is sent halfway through typing the number - this isn't desirable.
I'd expect the event to be sent when either the up/down arrows are selected, or after I've move focus out of the
number input, or set a 300ms timeout (or something similar) that waits to make sure no other input follows, before sending the message
@joepavitt Ihis is handled by setting the delay to 300ms by default, as this widget emits its value immediately after each update. Therefore, the user can change the delay as desired.
Updated the tests as well ✅
Be careful. when you're pushing, you force pushed and overrode changes I had previously committed to your branch
Be careful. when you're pushing, you force pushed and overrode changes I had previously committed to your branch
I apologize for that! I didn't realize I was overriding your changes. I'll be more cautious with force pushes in the future. Thanks for letting me know.
I'll be more cautious with force pushes in the future.
If git has prompted you to do a force push, then that means you're likely doing something wrong, e.g. changes on the remote branch you haven't pulled/merged. You shouldn't ever have to force push except in exceptional circumstances
@gayanSandamal you have many failing tests again, I checked locally and they're all failing there too - once again, please make sure your tests are passing locally before requesting review
@gayanSandamal you have many failing tests again, I checked locally and they're all failing there too - once again, please make sure your tests are passing locally before requesting review
I ran the tests locally before pushing them and all the tests got passed as below and in the github actions also as below.
Regarding the other test widget failures I thought it's because this random test failure reported https://github.com/FlowFuse/node-red-dashboard/issues/882
Make sure you're running npm run cy:run not just the tests in isolation, as there may be unintended consequences across other tests.
#882 normally causes one or two failures in the control.spec and sometimes one or two form failures, but nothing else.
Running tests locally, all the number-input tests fail.
You are right i that there do appear to be some other rogue E2E's that have snuck in though as seeing failures in https://github.com/FlowFuse/node-red-dashboard/actions/runs/10384786458/job/28752541405?pr=1206 too
@joepavitt I'm marking this as ready to review as the tests are passing locally
Still getting a failure in GH - can you remove any tests that rely on a timeout please, and just keep tests where click interaction trigger the payload being sent, e.g. click of up/down arrows
No point us having the tests in there if they're inconsistently reporting as it'll be a distraction on every PR we open
Still getting a failure in GH - can you remove any tests that rely on a timeout please, and just keep tests where click interaction trigger the payload being sent, e.g. click of up/down arrows
No point us having the tests in there if they're inconsistently reporting as it'll be a distraction on every PR we open
Removed the unstable tests of the number input as discussed. There's random test failure happens on other tests as well. I've tried by re-running the GH job