code: def test_handles_callback_on_change_correctly(app: Page):
      """Test that it correctly calls the callback on change."""
      # Check initial state:
      expect(app.get_by_test_id("stMarkdown").nth(5)).to_have_text(
          "Value 6: 08:45:00", use_inner_text=True
      )
      expect(app.get_by_test_id("stMarkdown").nth(6)).to_have_text(
          "time input changed: False", use_inner_text=True
      )
  
      app.get_by_test_id("stTimeInput").nth(5).locator("input").click()
  
      # Select last option:
      time_dropdown = app.locator('[data-baseweb="popover"]').first
      time_dropdown.locator("li").first.click()
  
      # Check that selection worked:
      expect(app.get_by_test_id("stMarkdown").nth(5)).to_have_text(
          "Value 6: 00:00:00", use_inner_text=True
      )
      expect(app.get_by_test_id("stMarkdown").nth(6)).to_have_text(
          "time input changed: True", use_inner_text=True
      )
  
      # Change different input to trigger delta path change
      empty_time_input_field = (
          app.get_by_test_id("stTimeInput").locator("input").first
      )
  
      # Type an option:
      empty_time_input_field.type("00:15")
      empty_time_input_field.press("Enter")
  
      expect(app.get_by_test_id("stMarkdown").first).to_have_text(
          "Value 1: 00:15:00", use_inner_text=True
      )
      expect(app.get_by_test_id("stMarkdown").nth(5)).to_have_text(
          "Value 6: 00:00:00", use_inner_text=True
      )
      # The flag should be reset to False:
      expect(app.get_by_test_id("stMarkdown").nth(6)).to_have_text(
          "time input changed: False", use_inner_text=True
      )
  
file_path: streamlit/e2e_playwright/st_time_input_test.py
imports: from playwright.sync_api import Page, expect
  from e2e_playwright.conftest import ImageCompareFunction
label_desc: Use image node_id 8 for calling a global function with example usage: test_handles_callback_on_change_correctly(app) without return types