code: def test_resets_selection_when_tab_names_change(
      app: Page, assert_snapshot: ImageCompareFunction
  ):
      """Test when tabs names change, reset selected tab if no matching label exists."""
      control_buttons = app.locator(".stButton")
      # Reset Tabs
      control_buttons.nth(5).click()
      wait_for_app_run(app)
      # Select Tab 2
      tab_buttons = app.locator(".stTabs button[role=tab]")
      tab_buttons.nth(1).click()
      # Change All Tab Names
      control_buttons.nth(4).click()
      # Wait for tabs to properly load
      wait_for_app_run(app)
      app.wait_for_timeout(1000)
      assert_snapshot(
          app.locator(".stTabs"), name="tabs-change-all-names"
      )
  
file_path: streamlit/e2e_playwright/st_tabs_selection_test.py
imports: from playwright.sync_api import Page, expect
  from e2e_playwright.conftest import ImageCompareFunction, wait_for_app_run
label_desc: Use image node_id 6 for calling a global function with example usage: test_resets_selection_when_tab_names_change(app, assert_snapshot) without return types