code: def test_keeps_value_on_selection_close(app: Page):
      """Test that the selection is kept when the dropdown is closed."""
      app.get_by_test_id("stTimeInput").first.locator("input").click()
  
      # Take a snapshot of the selection dropdown:
      expect(
          app.locator('[data-baseweb="popover"]').first
      ).to_be_visible()
  
      # Click outside to close the dropdown:
      app.get_by_test_id("stMarkdown").first.click()
  
      # Check if value is still initial value:
      expect(app.get_by_test_id("stMarkdown").first).to_have_text(
          "Value 1: 08:45:00", 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 7 for calling a global function with example usage: test_keeps_value_on_selection_close(app) without return types