{
  "format": 3,
  "id": "4.6",
  "title": "Test, fixture and action clocks spend separate remaining budgets",
  "layers": {
    "runner": {
      "label": "Runner"
    },
    "server": {
      "label": "Server"
    },
    "app": {
      "label": "App"
    }
  },
  "lanes": {
    "worker": {
      "label": "WORKER PROCESS · TEST / FIXTURE CLOCKS",
      "layer": "runner"
    },
    "server": {
      "label": "PLAYWRIGHT SERVER · ACTION LAYER",
      "layer": "server"
    }
  },
  "frames": {},
  "nodes": {
    "test": {
      "label": "Default test slot",
      "layer": "runner",
      "lane": "worker"
    },
    "setup": {
      "label": "Test fixture setup",
      "layer": "app",
      "lane": "worker"
    },
    "elapsed": {
      "label": "Elapsed budget",
      "layer": "runner",
      "lane": "worker"
    },
    "body": {
      "label": "Test body",
      "layer": "app",
      "lane": "worker"
    },
    "fixture": {
      "label": "Own fixture slot",
      "layer": "runner",
      "lane": "worker"
    },
    "ownSetup": {
      "label": "Own-clock setup",
      "layer": "app",
      "lane": "worker"
    },
    "after": {
      "label": "Fresh after-hooks slot",
      "layer": "runner",
      "lane": "worker"
    },
    "teardown": {
      "label": "Test fixture teardown",
      "layer": "app",
      "lane": "worker"
    },
    "action": {
      "label": "Action deadline",
      "layer": "server",
      "lane": "server"
    },
    "expired": {
      "label": "Action timeout",
      "layer": "server",
      "lane": "server"
    }
  },
  "edges": {
    "test_setup": {
      "from": "test",
      "to": "setup",
      "label": "shares"
    },
    "setup_body": {
      "from": "setup",
      "to": "body",
      "label": "then body"
    },
    "test_elapsed": {
      "from": "test",
      "to": "elapsed"
    },
    "elapsed_body": {
      "from": "elapsed",
      "to": "body",
      "label": "remaining budget"
    },
    "fixture_setup": {
      "from": "fixture",
      "to": "ownSetup",
      "label": "own slot"
    },
    "own_body": {
      "from": "ownSetup",
      "to": "body"
    },
    "body_after": {
      "from": "body",
      "to": "after",
      "label": "after body · fresh slot"
    },
    "fixture_teardown": {
      "from": "fixture",
      "to": "teardown",
      "label": "same fixture slot"
    },
    "after_teardown": {
      "from": "after",
      "to": "teardown",
      "label": "shared after-hooks budget"
    },
    "body_action": {
      "from": "body",
      "to": "action"
    },
    "action_expired": {
      "from": "action",
      "to": "expired",
      "label": "deadline expires"
    }
  },
  "scenarios": [
    {
      "id": "how",
      "label": "How the clocks work",
      "display": {
        "counterLabel": false,
        "edges": "progressive",
        "edgeBadges": true,
        "nodeBadges": false,
        "log": "incremental"
      },
      "steps": [
        {
          "id": "test-scoped-setup-can-share-the",
          "title": "Test-scoped setup can share the test slot",
          "text": "Without an explicit timeout, a test-scoped fixture has no separate slot. Setup selects the default test slot.",
          "show": [
            "test",
            "setup"
          ],
          "current": [
            "test",
            "setup"
          ],
          "edges": [
            "test_setup"
          ],
          "defs": [
            "test"
          ],
          "sources": [
            {
              "label": "fixtureRunner.ts:56-67",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L56-L67"
            },
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            },
            {
              "label": "fixtureRunner.ts:79-83",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L79-L83"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "elapsed-time-stays-spent",
          "title": "Elapsed time stays spent",
          "text": "Work accumulates elapsed time in the selected slot. The next deadline uses timeout minus elapsed.",
          "show": [
            "elapsed"
          ],
          "current": [
            "elapsed"
          ],
          "edges": [
            "test_elapsed"
          ],
          "defs": [
            "elapsed"
          ],
          "code": "deadline",
          "sources": [
            {
              "label": "timeoutManager.ts:108-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L108-L118"
            },
            {
              "label": "timeoutManager.ts:128-140",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L128-L140"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "the-body-uses-what-remains",
          "title": "The body uses what remains",
          "text": "Required fixtures resolve before the body enters its timed test runnable. The shared slot keeps the setup time already spent.",
          "show": [
            "body"
          ],
          "current": [
            "body"
          ],
          "edges": [
            "setup_body",
            "elapsed_body"
          ],
          "defs": [
            "body"
          ],
          "sources": [
            {
              "label": "workerMain.ts:398-413",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L398-L413"
            },
            {
              "label": "workerMain.ts:410-414",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L410-L414"
            },
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            },
            {
              "label": "timeoutManager.ts:108-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L108-L118"
            },
            {
              "label": "timeoutManager.ts:128-140",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L128-L140"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "an-explicit-fixture-timeout-sele",
          "title": "An explicit fixture timeout selects its own clock",
          "text": "The fixture slot takes precedence over the test slot. Its setup time accumulates there, leaving the test slot unspent during that setup.",
          "show": [
            "fixture",
            "ownSetup"
          ],
          "current": [
            "fixture",
            "ownSetup"
          ],
          "edges": [
            "fixture_setup"
          ],
          "defs": [],
          "code": "fixture",
          "sources": [
            {
              "label": "fixtureRunner.ts:56-67",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L56-L67"
            },
            {
              "label": "fixtureRunner.ts:79-83",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L79-L83"
            },
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            },
            {
              "label": "timeoutManager.ts:108-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L108-L118"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "setup-and-teardown-keep-the-same",
          "title": "Setup and teardown keep the same fixture slot",
          "text": "Teardown is a shallow copy of the setup description: its slot object is shared, so elapsed setup time remains spent.",
          "show": [
            "teardown"
          ],
          "current": [
            "teardown"
          ],
          "edges": [
            "fixture_teardown"
          ],
          "defs": [
            "fixture"
          ],
          "sources": [
            {
              "label": "fixtureRunner.ts:56-68",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L56-L68"
            },
            {
              "label": "timeoutManager.ts:108-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L108-L118"
            },
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "after-hooks-and-default-teardown",
          "title": "After hooks and default teardown share a fresh budget",
          "text": "After the body, one fresh after-hooks slot also serves test fixture teardown. An own fixture slot still takes precedence.",
          "show": [
            "after"
          ],
          "current": [
            "after"
          ],
          "edges": [
            "body_after",
            "after_teardown"
          ],
          "defs": [
            "after"
          ],
          "sources": [
            {
              "label": "workerMain.ts:423-431",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L423-L431"
            },
            {
              "label": "workerMain.ts:446-449",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L446-L449"
            },
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "the-action-has-an-independent-de",
          "title": "The action has an independent deadline",
          "text": "Click forwards its timeout to the server action controller. A nonzero value starts a deadline; zero removes only this action deadline. The test slot still bounds its own runnable.",
          "show": [
            "action",
            "expired"
          ],
          "current": [
            "action",
            "expired"
          ],
          "edges": [
            "body_action",
            "action_expired"
          ],
          "defs": [
            "action"
          ],
          "sources": [
            {
              "label": "frame.ts:321-323",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/frame.ts#L321-L323"
            },
            {
              "label": "timeoutSettings.ts:79-88",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/timeoutSettings.ts#L79-L88"
            },
            {
              "label": "dispatcher.ts:373-375",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dispatchers/dispatcher.ts#L373-L375"
            },
            {
              "label": "progress.ts:82-85",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/progress.ts#L82-L85"
            },
            {
              "label": "progress.ts:135-146",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/progress.ts#L135-L146"
            },
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            },
            {
              "label": "timeoutManager.ts:108-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L108-L118"
            },
            {
              "label": "timeoutManager.ts:128-140",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L128-L140"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "an-empty-fixture-clock-skips-tea",
          "title": "An empty fixture clock skips teardown",
          "text": "Playwright checks remaining time before starting fixture teardown. If the selected slot is already exhausted, its teardown body does not start.",
          "show": [
            "teardown"
          ],
          "current": [
            "teardown"
          ],
          "edges": [],
          "defs": [
            "guard"
          ],
          "sources": [
            {
              "label": "fixtureRunner.ts:138-149",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L138-L149"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        }
      ]
    },
    {
      "id": "shared",
      "label": "Shared setup",
      "display": {
        "counterLabel": true,
        "edges": "progressive",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "whole": {
        "title": "Setup spends the test budget",
        "text": "No fixture timeout: setup and body share elapsed time."
      },
      "steps": [
        {
          "id": "the-test-starts-with-its-full-bu",
          "title": "The test starts with its full budget.",
          "text": "The test starts with its full budget.",
          "show": [
            "test"
          ],
          "current": [
            "test"
          ],
          "edges": [],
          "defs": [
            "example-0-0"
          ],
          "log": [],
          "sources": [
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            },
            {
              "label": "workerMain.ts:410-414",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L410-L414"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "account-setup-spends-20000ms-of",
          "title": "Account setup spends 20000ms of the test budget.",
          "text": "Account setup spends 20000ms of the test budget.",
          "show": [
            "setup",
            "elapsed"
          ],
          "current": [
            "setup",
            "elapsed"
          ],
          "edges": [
            "test_setup",
            "test_elapsed"
          ],
          "defs": [
            "example-0-1"
          ],
          "code": "deadline",
          "log": [],
          "sources": [
            {
              "label": "fixtureRunner.ts:56-67",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L56-L67"
            },
            {
              "label": "fixtureRunner.ts:79-83",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L79-L83"
            },
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            },
            {
              "label": "timeoutManager.ts:108-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L108-L118"
            },
            {
              "label": "timeoutManager.ts:128-140",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L128-L140"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "the-body-has-10000ms-left-even-w",
          "title": "The body has 10000ms left, even with a longer click timer.",
          "text": "The body has 10000ms left, even with a longer click timer.",
          "show": [
            "body",
            "action"
          ],
          "current": [
            "body",
            "action"
          ],
          "edges": [
            "setup_body",
            "elapsed_body",
            "body_action"
          ],
          "defs": [
            "example-0-2"
          ],
          "code": "fixture",
          "log": [],
          "sources": [
            {
              "label": "workerMain.ts:398-413",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L398-L413"
            },
            {
              "label": "workerMain.ts:410-414",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L410-L414"
            },
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            },
            {
              "label": "timeoutManager.ts:108-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L108-L118"
            },
            {
              "label": "timeoutManager.ts:128-140",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L128-L140"
            },
            {
              "label": "frame.ts:321-323",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/frame.ts#L321-L323"
            },
            {
              "label": "timeoutSettings.ts:79-88",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/timeoutSettings.ts#L79-L88"
            },
            {
              "label": "dispatcher.ts:373-375",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dispatchers/dispatcher.ts#L373-L375"
            },
            {
              "label": "progress.ts:82-85",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/progress.ts#L82-L85"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "the-test-budget-expires-before-t",
          "title": "The test budget expires before the click timer.",
          "text": "The test budget expires before the click timer.",
          "show": [
            "elapsed"
          ],
          "current": [
            "elapsed"
          ],
          "edges": [],
          "defs": [
            "example-0-3"
          ],
          "log": [
            "Test timeout of 30000ms exceeded."
          ],
          "sources": [
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            },
            {
              "label": "timeoutManager.ts:108-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L108-L118"
            },
            {
              "label": "timeoutManager.ts:128-140",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L128-L140"
            },
            {
              "label": "timeoutManager.ts:174-185",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L174-L185"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "test",
          "step": "the-test-starts-with-its-full-bu",
          "log": []
        },
        {
          "node": "setup",
          "step": "account-setup-spends-20000ms-of",
          "log": [],
          "edge": "test_setup"
        },
        {
          "node": "body",
          "step": "the-body-has-10000ms-left-even-w",
          "log": [],
          "edge": "setup_body"
        },
        {
          "node": "action",
          "step": "the-body-has-10000ms-left-even-w",
          "log": [],
          "edge": "body_action"
        },
        {
          "node": "test",
          "step": "the-test-budget-expires-before-t",
          "log": [
            "Test timeout of 30000ms exceeded."
          ],
          "fail": true
        }
      ]
    },
    {
      "id": "fixture",
      "label": "Fixture clock",
      "display": {
        "counterLabel": true,
        "edges": "progressive",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "whole": {
        "title": "Setup and teardown share a fixture clock",
        "text": "A separate fixture slot retains its elapsed setup time."
      },
      "steps": [
        {
          "id": "setup-spends-40000ms-on-its-own",
          "title": "Setup spends 40000ms on its own fixture clock.",
          "text": "Setup spends 40000ms on its own fixture clock.",
          "show": [
            "fixture",
            "ownSetup"
          ],
          "current": [
            "fixture",
            "ownSetup"
          ],
          "edges": [
            "fixture_setup"
          ],
          "defs": [
            "example-1-0"
          ],
          "code": "fixture",
          "log": [],
          "sources": [
            {
              "label": "fixtureRunner.ts:56-67",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L56-L67"
            },
            {
              "label": "fixtureRunner.ts:79-83",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L79-L83"
            },
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            },
            {
              "label": "timeoutManager.ts:108-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L108-L118"
            },
            {
              "label": "timeoutManager.ts:128-140",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L128-L140"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "the-body-runs-fixture-elapsed-ti",
          "title": "The body runs; fixture elapsed time stays at 40000ms.",
          "text": "The body runs; fixture elapsed time stays at 40000ms.",
          "show": [
            "body"
          ],
          "current": [
            "body"
          ],
          "edges": [
            "own_body"
          ],
          "defs": [
            "example-1-1"
          ],
          "log": [],
          "sources": [
            {
              "label": "fixtureRunner.ts:56-68",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L56-L68"
            },
            {
              "label": "workerMain.ts:410-414",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L410-L414"
            },
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            },
            {
              "label": "timeoutManager.ts:108-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L108-L118"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "after-hooks-get-a-fresh-slot-thi",
          "title": "After hooks get a fresh slot. This fixture still selects its own slot.",
          "text": "After hooks get a fresh slot. This fixture still selects its own slot.",
          "show": [
            "after",
            "fixture"
          ],
          "current": [
            "after",
            "fixture"
          ],
          "edges": [
            "body_after"
          ],
          "defs": [
            "example-1-2"
          ],
          "log": [],
          "sources": [
            {
              "label": "workerMain.ts:423-431",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L423-L431"
            },
            {
              "label": "workerMain.ts:446-449",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L446-L449"
            },
            {
              "label": "fixtureRunner.ts:56-68",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L56-L68"
            },
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "teardown-spends-the-fixture-s-re",
          "title": "Teardown spends the fixture's remaining 20000ms.",
          "text": "Teardown spends the fixture's remaining 20000ms.",
          "show": [
            "teardown",
            "fixture"
          ],
          "current": [
            "teardown",
            "fixture"
          ],
          "edges": [
            "fixture_teardown"
          ],
          "defs": [
            "example-1-3"
          ],
          "log": [
            "Fixture \"account\" timeout of 60000ms exceeded during teardown."
          ],
          "sources": [
            {
              "label": "fixtureRunner.ts:56-68",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L56-L68"
            },
            {
              "label": "fixtureRunner.ts:138-149",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L138-L149"
            },
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            },
            {
              "label": "timeoutManager.ts:108-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L108-L118"
            },
            {
              "label": "timeoutManager.ts:128-140",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L128-L140"
            },
            {
              "label": "timeoutManager.ts:210-218",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L210-L218"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "fixture",
          "step": "setup-spends-40000ms-on-its-own",
          "log": []
        },
        {
          "node": "ownSetup",
          "step": "setup-spends-40000ms-on-its-own",
          "log": [],
          "edge": "fixture_setup"
        },
        {
          "node": "body",
          "step": "the-body-runs-fixture-elapsed-ti",
          "log": [],
          "edge": "own_body"
        },
        {
          "node": "after",
          "step": "after-hooks-get-a-fresh-slot-thi",
          "log": [],
          "edge": "body_after"
        },
        {
          "node": "fixture",
          "step": "after-hooks-get-a-fresh-slot-thi",
          "log": []
        },
        {
          "node": "teardown",
          "step": "teardown-spends-the-fixture-s-re",
          "log": [],
          "edge": "fixture_teardown"
        },
        {
          "node": "fixture",
          "step": "teardown-spends-the-fixture-s-re",
          "log": [
            "Fixture \"account\" timeout of 60000ms exceeded during teardown."
          ],
          "fail": true
        }
      ]
    },
    {
      "id": "action",
      "label": "Action timer",
      "display": {
        "counterLabel": true,
        "edges": "progressive",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "whole": {
        "title": "The action timer expires first",
        "text": "The click deadline runs alongside the runner budget."
      },
      "steps": [
        {
          "id": "with-timeout-0-the-click-has-no",
          "title": "With timeout: 0, the click has no deadline; the runner clock stays active.",
          "text": "With timeout: 0, the click has no deadline; the runner clock stays active.",
          "show": [
            "body",
            "action"
          ],
          "current": [
            "body",
            "action"
          ],
          "edges": [
            "body_action"
          ],
          "defs": [
            "example-2-0"
          ],
          "log": [],
          "sources": [
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            },
            {
              "label": "timeoutManager.ts:108-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L108-L118"
            },
            {
              "label": "timeoutManager.ts:128-140",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L128-L140"
            },
            {
              "label": "frame.ts:321-323",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/frame.ts#L321-L323"
            },
            {
              "label": "timeoutSettings.ts:79-88",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/timeoutSettings.ts#L79-L88"
            },
            {
              "label": "dispatcher.ts:373-375",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dispatchers/dispatcher.ts#L373-L375"
            },
            {
              "label": "progress.ts:82-85",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/progress.ts#L82-L85"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "instead-save-click-timeout-5000",
          "title": "Instead, save.click({ timeout: 5000 }) starts a five-second timer.",
          "text": "Instead, save.click({ timeout: 5000 }) starts a five-second timer.",
          "show": [
            "action"
          ],
          "current": [
            "action"
          ],
          "edges": [],
          "defs": [
            "example-2-1"
          ],
          "log": [],
          "sources": [
            {
              "label": "frame.ts:321-323",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/frame.ts#L321-L323"
            },
            {
              "label": "timeoutSettings.ts:79-88",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/timeoutSettings.ts#L79-L88"
            },
            {
              "label": "dispatcher.ts:373-375",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dispatchers/dispatcher.ts#L373-L375"
            },
            {
              "label": "progress.ts:82-85",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/progress.ts#L82-L85"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "both-active-clocks-advance-while",
          "title": "Both active clocks advance while the click is pending.",
          "text": "Both active clocks advance while the click is pending.",
          "show": [
            "action",
            "test"
          ],
          "current": [
            "test",
            "action"
          ],
          "edges": [],
          "defs": [
            "example-2-2"
          ],
          "log": [],
          "sources": [
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            },
            {
              "label": "timeoutManager.ts:108-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L108-L118"
            },
            {
              "label": "timeoutManager.ts:128-140",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L128-L140"
            },
            {
              "label": "progress.ts:82-85",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/progress.ts#L82-L85"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "the-click-expires-the-test-still",
          "title": "The click expires. The test still has 5000ms remaining.",
          "text": "The click expires. The test still has 5000ms remaining.",
          "show": [
            "expired"
          ],
          "current": [
            "expired"
          ],
          "edges": [
            "action_expired"
          ],
          "defs": [
            "example-2-3"
          ],
          "log": [
            "locator.click: Timeout 5000ms exceeded."
          ],
          "sources": [
            {
              "label": "progress.ts:82-85",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/progress.ts#L82-L85"
            },
            {
              "label": "progress.ts:135-146",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/progress.ts#L135-L146"
            },
            {
              "label": "channelOwner.ts:208-214",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/channelOwner.ts#L208-L214"
            },
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            },
            {
              "label": "timeoutManager.ts:108-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L108-L118"
            },
            {
              "label": "timeoutManager.ts:128-140",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L128-L140"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "body",
          "step": "with-timeout-0-the-click-has-no",
          "log": []
        },
        {
          "node": "action",
          "step": "with-timeout-0-the-click-has-no",
          "log": [],
          "edge": "body_action"
        },
        {
          "node": "action",
          "step": "instead-save-click-timeout-5000",
          "log": []
        },
        {
          "node": "action",
          "step": "both-active-clocks-advance-while",
          "log": []
        },
        {
          "node": "expired",
          "step": "the-click-expires-the-test-still",
          "log": [
            "locator.click: Timeout 5000ms exceeded."
          ],
          "edge": "action_expired",
          "fail": true
        }
      ]
    },
    {
      "id": "teardown",
      "label": "Teardown",
      "display": {
        "counterLabel": true,
        "edges": "progressive",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "whole": {
        "title": "Teardown gets a fresh test budget",
        "text": "No fixture timeout: teardown spends the after-hooks budget."
      },
      "steps": [
        {
          "id": "the-test-body-ends-with-time-to",
          "title": "The test body ends with time to spare.",
          "text": "The test body ends with time to spare.",
          "show": [
            "body"
          ],
          "current": [
            "body"
          ],
          "edges": [],
          "defs": [
            "example-3-0"
          ],
          "log": [],
          "sources": [
            {
              "label": "workerMain.ts:410-414",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L410-L414"
            },
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            },
            {
              "label": "timeoutManager.ts:108-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L108-L118"
            },
            {
              "label": "timeoutManager.ts:128-140",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L128-L140"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "after-hooks-and-teardown-start-w",
          "title": "After hooks and teardown start with a fresh 30000ms.",
          "text": "After hooks and teardown start with a fresh 30000ms.",
          "show": [
            "after"
          ],
          "current": [
            "after"
          ],
          "edges": [
            "body_after"
          ],
          "defs": [
            "example-3-1"
          ],
          "log": [],
          "sources": [
            {
              "label": "workerMain.ts:423-431",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L423-L431"
            },
            {
              "label": "workerMain.ts:446-449",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L446-L449"
            },
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        },
        {
          "id": "account-teardown-spends-all-of-i",
          "title": "Account teardown spends all of it.",
          "text": "Account teardown spends all of it.",
          "show": [
            "teardown",
            "after"
          ],
          "current": [
            "teardown",
            "after"
          ],
          "edges": [
            "after_teardown"
          ],
          "defs": [
            "example-3-2"
          ],
          "log": [
            "Tearing down \"account\" exceeded the test timeout of 30000ms."
          ],
          "sources": [
            {
              "label": "workerMain.ts:446-449",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L446-L449"
            },
            {
              "label": "timeoutManager.ts:90-100",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L90-L100"
            },
            {
              "label": "timeoutManager.ts:108-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L108-L118"
            },
            {
              "label": "timeoutManager.ts:128-140",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L128-L140"
            },
            {
              "label": "timeoutManager.ts:178-182",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L178-L182"
            }
          ],
          "deeper": [
            {
              "title": "4.2 Built on demand, torn down in reverse",
              "href": "/4-runner/4-2-custom-fixtures/"
            },
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "body",
          "step": "the-test-body-ends-with-time-to",
          "log": []
        },
        {
          "node": "after",
          "step": "after-hooks-and-teardown-start-w",
          "log": [],
          "edge": "body_after"
        },
        {
          "node": "teardown",
          "step": "account-teardown-spends-all-of-i",
          "log": [],
          "edge": "after_teardown"
        },
        {
          "node": "after",
          "step": "account-teardown-spends-all-of-i",
          "log": [
            "Tearing down \"account\" exceeded the test timeout of 30000ms."
          ],
          "fail": true
        }
      ]
    }
  ],
  "definitions": {
    "test": {
      "term": "Test slot",
      "text": "A test-scoped fixture without its own timeout selects the default test slot during setup."
    },
    "elapsed": {
      "term": "Elapsed budget",
      "text": "The selected slot retains elapsed time between pieces of work; the deadline subtracts that elapsed time."
    },
    "body": {
      "term": "Test body",
      "text": "Required fixtures resolve before the test body runs under the default test runnable."
    },
    "fixture": {
      "term": "Own fixture clock",
      "text": "An explicit fixture timeout selects a separate slot. Setup and teardown share that same slot object."
    },
    "after": {
      "term": "After-hooks slot",
      "text": "After the body, after hooks and default test fixture teardown share one fresh slot. A fixture with its own slot selects that instead."
    },
    "action": {
      "term": "Action timer",
      "text": "A click has its own server-layer deadline. Zero removes only that deadline; a longer action timeout does not extend the test budget."
    },
    "guard": {
      "term": "Exhausted fixture",
      "text": "A fixture whose selected slot is already exhausted does not start its teardown."
    },
    "example-0-0": {
      "term": "Example budgets · milliseconds",
      "text": "Test: 30000 total · 0 spent · 30000 left; Fixture “account”: No separate slot selected; After hooks: No separate slot selected; Action: No action running"
    },
    "example-0-1": {
      "term": "Example budgets · milliseconds",
      "text": "Test: 30000 total · 20000 spent · 10000 left; Fixture “account”: No separate slot selected; After hooks: No separate slot selected; Action: No action running"
    },
    "example-0-2": {
      "term": "Example budgets · milliseconds",
      "text": "Test: 30000 total · 20000 spent · 10000 left; Fixture “account”: No separate slot selected; After hooks: No separate slot selected; Action: 60000 total · 0 spent · 60000 left"
    },
    "example-0-3": {
      "term": "Example budgets · milliseconds",
      "text": "Test: 30000 total · 30000 spent · 0 left; Fixture “account”: No separate slot selected; After hooks: No separate slot selected; Action: 60000 total · 10000 spent · 50000 left"
    },
    "example-1-0": {
      "term": "Example budgets · milliseconds",
      "text": "Test: 30000 total · 0 spent · 30000 left; Fixture “account”: 60000 total · 40000 spent · 20000 left; After hooks: No separate slot selected; Action: No action running"
    },
    "example-1-1": {
      "term": "Example budgets · milliseconds",
      "text": "Test: 30000 total · 10000 spent · 20000 left; Fixture “account”: 60000 total · 40000 spent · 20000 left; After hooks: No separate slot selected; Action: No action running"
    },
    "example-1-2": {
      "term": "Example budgets · milliseconds",
      "text": "Test: 30000 total · 10000 spent · 20000 left; Fixture “account”: 60000 total · 40000 spent · 20000 left; After hooks: 30000 total · 0 spent · 30000 left; Action: No action running"
    },
    "example-1-3": {
      "term": "Example budgets · milliseconds",
      "text": "Test: 30000 total · 10000 spent · 20000 left; Fixture “account”: 60000 total · 60000 spent · 0 left; After hooks: 30000 total · 0 spent · 30000 left; Action: No action running"
    },
    "example-2-0": {
      "term": "Example budgets · milliseconds",
      "text": "Test: 30000 total · 20000 spent · 10000 left; Fixture “account”: No separate slot selected; After hooks: No separate slot selected; Action: No action deadline"
    },
    "example-2-1": {
      "term": "Example budgets · milliseconds",
      "text": "Test: 30000 total · 20000 spent · 10000 left; Fixture “account”: No separate slot selected; After hooks: No separate slot selected; Action: 5000 total · 0 spent · 5000 left"
    },
    "example-2-2": {
      "term": "Example budgets · milliseconds",
      "text": "Test: 30000 total · 22500 spent · 7500 left; Fixture “account”: No separate slot selected; After hooks: No separate slot selected; Action: 5000 total · 2500 spent · 2500 left"
    },
    "example-2-3": {
      "term": "Example budgets · milliseconds",
      "text": "Test: 30000 total · 25000 spent · 5000 left; Fixture “account”: No separate slot selected; After hooks: No separate slot selected; Action: 5000 total · 5000 spent · 0 left"
    },
    "example-3-0": {
      "term": "Example budgets · milliseconds",
      "text": "Test: 30000 total · 12000 spent · 18000 left; Fixture “account”: No separate slot selected; After hooks: No separate slot selected; Action: No action running"
    },
    "example-3-1": {
      "term": "Example budgets · milliseconds",
      "text": "Test: 30000 total · 12000 spent · 18000 left; Fixture “account”: No separate slot selected; After hooks: 30000 total · 0 spent · 30000 left; Action: No action running"
    },
    "example-3-2": {
      "term": "Example budgets · milliseconds",
      "text": "Test: 30000 total · 12000 spent · 18000 left; Fixture “account”: No separate slot selected; After hooks: 30000 total · 30000 spent · 0 left; Action: No action running"
    }
  },
  "code": {
    "deadline": {
      "title": "Inside Playwright · timeoutManager.ts",
      "source": {
        "label": "timeoutManager.ts:132-132",
        "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L132"
      },
      "lines": [
        "running.deadline = running.start + (running.slot.timeout - running.slot.elapsed);",
        "// Compensate for Node.js troubles with timeouts that can fire too early.",
        "// We add an extra millisecond which seems to be enough."
      ]
    },
    "fixture": {
      "title": "In your test · slow fixture setup",
      "lines": [
        "// ✗ Only raising click's timer",
        "await save.click({ timeout: 60_000 });",
        "",
        "// ✓ Give account setup its own budget",
        "account: [async ({}, use) => {",
        "  const account = await createAccount();",
        "  await use(account);",
        "  await deleteAccount(account);",
        "}, { timeout: 60_000 }],"
      ]
    }
  },
  "conceptScenario": "how",
  "concepts": [
    {
      "label": "Worker process · clocks",
      "layer": "runner",
      "items": [
        {
          "definition": "test",
          "short": "Test-scoped fixtures without explicit timeouts have no separate slot.",
          "nodes": [
            "test",
            "setup"
          ],
          "step": {
            "step": "test-scoped-setup-can-share-the"
          },
          "source": {
            "label": "fixtureRunner.ts:56-67",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L56-L67"
          }
        },
        {
          "definition": "elapsed",
          "short": "The deadline subtracts elapsed time from the selected slot timeout.",
          "nodes": [
            "elapsed"
          ],
          "step": {
            "step": "elapsed-time-stays-spent"
          },
          "source": {
            "label": "timeoutManager.ts:128-140",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/timeoutManager.ts#L128-L140"
          }
        },
        {
          "definition": "body",
          "short": "The test body runs under the default test runnable.",
          "nodes": [
            "body"
          ],
          "step": {
            "step": "the-body-uses-what-remains"
          },
          "source": {
            "label": "workerMain.ts:410-414",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L410-L414"
          }
        },
        {
          "definition": "fixture",
          "short": "Setup and teardown descriptions share the same fixture slot object.",
          "nodes": [
            "fixture",
            "ownSetup",
            "teardown"
          ],
          "step": {
            "step": "setup-and-teardown-keep-the-same"
          },
          "source": {
            "label": "fixtureRunner.ts:56-68",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L56-L68"
          }
        },
        {
          "definition": "after",
          "short": "After hooks receive a fresh timeout slot.",
          "nodes": [
            "after"
          ],
          "step": {
            "step": "after-hooks-and-default-teardown"
          },
          "source": {
            "label": "workerMain.ts:423-431",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/workerMain.ts#L423-L431"
          }
        },
        {
          "definition": "guard",
          "short": "An exhausted selected slot prevents fixture teardown from starting.",
          "nodes": [
            "teardown"
          ],
          "step": {
            "step": "an-empty-fixture-clock-skips-tea"
          },
          "source": {
            "label": "fixtureRunner.ts:138-149",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright/src/worker/fixtureRunner.ts#L138-L149"
          }
        }
      ]
    },
    {
      "label": "Server layer · action timer",
      "layer": "server",
      "items": [
        {
          "definition": "action",
          "short": "A nonzero action timeout creates a deadline; zero creates none.",
          "nodes": [
            "action",
            "expired"
          ],
          "step": {
            "step": "the-action-has-an-independent-de"
          },
          "source": {
            "label": "progress.ts:82-85",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/progress.ts#L82-L85"
          }
        }
      ]
    }
  ],
  "callouts": {
    "1": [
      "test",
      "setup",
      "elapsed",
      "body"
    ],
    "2": [
      "fixture",
      "ownSetup",
      "teardown"
    ],
    "3": [
      "action",
      "expired"
    ],
    "4": [
      "after",
      "teardown"
    ]
  },
  "deeper": [
    {
      "title": "4.2 Built on demand, torn down in reverse",
      "href": "/4-runner/4-2-custom-fixtures/",
      "why": "Fixture dependencies, setup and teardown."
    },
    {
      "title": "2.1 Two loops behind every click",
      "href": "/2-actions/2-1-two-loops/",
      "why": "What the action deadline bounds."
    },
    {
      "title": "0.1 API calls leave from Node, page calls from the browser",
      "href": "/0-anatomy/0-1-anatomy-of-a-test/",
      "why": "Worker and server layer in the process picture."
    }
  ]
}
