Network And API Defaults
Pack:
playwrightParent skill: Playwright Network Control And API Synchronization Source:playwright/playwright-network-control-and-api-synchronization/references/network-and-api-defaults.mdDefault synchronization order:
- visible UI outcome
- targeted network contract
- route interception or API setup only when needed
Good reasons to mock:
- third-party volatility
- rare edge case coverage
- expensive or slow dependency paths
Bad reasons to mock:
- avoiding understanding the real flow
- hiding a flaky app contract
- bypassing broken locators
API setup is good when:
- it creates state faster
- it is not the product surface under test
- it keeps the UI test focused