code: def test_pala001_layout(dash_duo, clear_pages_state):
      app = get_app()
      dash_duo.start_server(app)
  
      # test layout and title for each page in `page_registry` with link navigation
      for page in dash.page_registry.values():
          dash_duo.find_element("#" + page["id"]).click()
          dash_duo.wait_for_text_to_equal(
              "#text_" + page["id"], "text for " + page["id"]
          )
          assert (
              dash_duo.driver.title == page["title"]
          ), "check that page title updates"
  
      # test redirects
      dash_duo.wait_for_page(url=f"{dash_duo.server_url}/v2")
      dash_duo.wait_for_text_to_equal(
          "#text_redirect", "text for redirect"
      )
      dash_duo.wait_for_page(url=f"{dash_duo.server_url}/old-home-page")
      dash_duo.wait_for_text_to_equal(
          "#text_redirect", "text for redirect"
      )
      assert (
          dash_duo.driver.current_url
          == f"{dash_duo.server_url}/redirect"
      )
  
      # test redirect with button and user defined dcc.Location
      # note:  dcc.Location must be defined in app.py
      dash_duo.wait_for_page(url=f"{dash_duo.server_url}/page1")
      dash_duo.find_element("#btn1").click()
      dash_duo.wait_for_text_to_equal("#text_page2", "text for page2")
  
      # test query strings
      dash_duo.wait_for_page(
          url=f"{dash_duo.server_url}/query-string?velocity=10"
      )
      assert (
          dash_duo.find_element("#velocity").get_attribute("value")
          == "10"
      ), "query string passed to layout"
  
      # test path variables
      dash_duo.wait_for_page(url=f"{dash_duo.server_url}/a/none/b/none")
      dash_duo.wait_for_text_to_equal(
          "#path_vars", "variables from pathname:none none"
      )
  
      dash_duo.wait_for_page(url=f"{dash_duo.server_url}/a/var1/b/var2")
      dash_duo.wait_for_text_to_equal(
          "#path_vars", "variables from pathname:var1 var2"
      )
  
      # test page not found
      dash_duo.wait_for_page(url=f"{dash_duo.server_url}/find_me")
      dash_duo.wait_for_text_to_equal(
          "#text_not_found_404", "text for not_found_404"
      )
  
      # test `validation_layout` exists when suppress_callback_exceptions=False`
      assert app.validation_layout is not None
  
      assert (
          dash_duo.get_logs() == []
      ), "browser console should contain no error"
  
file_path: dash/tests/integration/multi_page/test_pages_layout.py
imports: import pytest
  import dash
  from dash import Dash, Input, State, dcc, html
  from dash.dash import _ID_LOCATION
  from dash.exceptions import NoLayoutException
label_desc: Use image node_id 2 for calling a global function with example usage: test_pala001_layout(dash_duo, clear_pages_state) without return types