code: def test_cbwc001_todo_app(content_callback, dash_duo):
      app = todo_app(content_callback)
      dash_duo.start_server(app)
  
      dash_duo.wait_for_text_to_equal(
          "#totals", "0 of 0 items completed"
      )
      assert app.list_calls.value == 1
      assert app.style_calls.value == 0
      assert app.preceding_calls.value == 0
      assert app.total_calls.value == 1
  
      new_item = dash_duo.find_element("#new-item")
      add_item = dash_duo.find_element("#add")
      clear_done = dash_duo.find_element("#clear-done")
  
      def assert_count(items):
          assert (
              len(dash_duo.find_elements("#list-container>div"))
              == items
          )
  
      def get_done_item(item):
          selector = css_escape(
              '#{"action":"done","item":%d} input' % item
          )
          return dash_duo.find_element(selector)
  
      def assert_item(item, text, done, prefix="", suffix=""):
          dash_duo.wait_for_text_to_equal(
              css_escape('#{"item":%d}' % item), text
          )
  
          expected_note = (
              ""
              if done
              else (prefix + " preceding items are done" + suffix)
          )
          dash_duo.wait_for_text_to_equal(
              css_escape('#{"item":%d,"preceding":true}' % item),
              expected_note,
          )
  
          assert (
              bool(get_done_item(item).get_attribute("checked")) == done
          )
  
      new_item.send_keys("apples")
      add_item.click()
      dash_duo.wait_for_text_to_equal(
          "#totals", "0 of 1 items completed - 0%"
      )
      assert_count(1)
  
      new_item.send_keys("bananas")
      add_item.click()
      dash_duo.wait_for_text_to_equal(
          "#totals", "0 of 2 items completed - 0%"
      )
      assert_count(2)
  
      new_item.send_keys("carrots")
      add_item.click()
      dash_duo.wait_for_text_to_equal(
          "#totals", "0 of 3 items completed - 0%"
      )
      assert_count(3)
  
      new_item.send_keys("dates")
      add_item.click()
      dash_duo.wait_for_text_to_equal(
          "#totals", "0 of 4 items completed - 0%"
      )
      assert_count(4)
      assert_item(0, "apples", False, "0 of 0", " DO THIS NEXT!")
      assert_item(1, "bananas", False, "0 of 1")
      assert_item(2, "carrots", False, "0 of 2")
      assert_item(3, "dates", False, "0 of 3")
  
      get_done_item(2).click()
      dash_duo.wait_for_text_to_equal(
          "#totals", "1 of 4 items completed - 25%"
      )
      assert_item(0, "apples", False, "0 of 0", " DO THIS NEXT!")
      assert_item(1, "bananas", False, "0 of 1")
      assert_item(2, "carrots", True)
      assert_item(3, "dates", False, "1 of 3")
  
      get_done_item(0).click()
      dash_duo.wait_for_text_to_equal(
          "#totals", "2 of 4 items completed - 50%"
      )
      assert_item(0, "apples", True)
      assert_item(1, "bananas", False, "1 of 1", " DO THIS NEXT!")
      assert_item(2, "carrots", True)
      assert_item(3, "dates", False, "2 of 3")
  
      clear_done.click()
      dash_duo.wait_for_text_to_equal(
          "#totals", "0 of 2 items completed - 0%"
      )
      assert_count(2)
      assert_item(0, "bananas", False, "0 of 0", " DO THIS NEXT!")
      assert_item(1, "dates", False, "0 of 1")
  
      get_done_item(0).click()
      dash_duo.wait_for_text_to_equal(
          "#totals", "1 of 2 items completed - 50%"
      )
      assert_item(0, "bananas", True)
      assert_item(1, "dates", False, "1 of 1", " DO THIS NEXT!")
  
      get_done_item(1).click()
      dash_duo.wait_for_text_to_equal(
          "#totals", "2 of 2 items completed - 100%"
      )
      assert_item(0, "bananas", True)
      assert_item(1, "dates", True)
  
      clear_done.click()
      # This was a tricky one - trigger based on deleted components
      dash_duo.wait_for_text_to_equal(
          "#totals", "0 of 0 items completed"
      )
      assert_count(0)
  
file_path: dash/tests/integration/callbacks/test_wildcards.py
imports: import pytest
  import re
  from selenium.webdriver.common.keys import Keys
  import json
  from dash.testing import wait
  import dash
  from dash import Dash, Input, Output, State, ALL, ALLSMALLER, MATCH, html, dcc
  from tests.assets.todo_app import todo_app
  from tests.assets.grouping_app import grouping_app
label_desc: Use image node_id 3 for calling a global function with example usage: test_cbwc001_todo_app(content_callback, dash_duo) and returns: dash_duo