alisha-1000 commented on issue #4176:
URL: https://github.com/apache/streampipes/issues/4176#issuecomment-3909774036

   
   Thanks for raising this — I agree that navigating month-by-month in the date 
picker is both slow and prone to flakiness in E2E tests.
   Instead of interacting with the calendar UI step-by-step, we could consider 
the following improvements:
   
   1. Direct Input Manipulation (Preferred)
   
      * Programmatically set the start/end date via the underlying input field.
      * Trigger the appropriate change events afterward.
      * This keeps the test focused on chart behavior rather than date-picker 
navigation.
   
   2. API-Level Time Injection
   
      * If possible, mock or override the time range at the request/interceptor 
level.
      * This avoids UI interaction entirely and reduces test runtime 
significantly.
   
   3. Test Utility for Time Selection
   
      * Introduce a helper like:
   
        ```ts
        selectTimeRange({ from: '2023-01-01', to: '2023-01-31' })
        ```
      * Internally this could:
   
        * Either manipulate the input directly, or
        * Jump to a target year/month instead of clicking “previous” repeatedly.
   
   4. Use Fixed Test Data Window
   
      * Ensure test datasets use recent timestamps so that the default calendar 
month already contains the target range.
      * This avoids historical navigation altogether.
   
   5. Stability Improvements
   
      * Wait explicitly for chart re-render or data fetch completion.
      * Avoid relying on arbitrary timeouts.
   
   This should:
   
   * Reduce test execution time
   * Improve reliability
   * Decouple chart validation from date-picker behavior
   
   If desired, I can also help draft a concrete Cypress/Playwright refactoring 
example tailored to the current test setup.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to