mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
12d8a262be
The `screenshotsDir` option controls the expectation storage for `toHaveScreenshot()` function. The new expectation management for screenshots has the following key properties: - All screenshots are stored in a single folder called `screenshotsDir`. - Screenshot names **do not** respect `snapshotDir` and `snapshotSuffix` configurations. - `screenshotsDir` is configurable per project. This way a "smoke tests" project can re-use screenshots from "all tests" project. - Host platform is a top-level folder. For example, given the following config: ```js // playwright.config.ts module.exports = { projects: [ { name: 'Mobile Safari' }, { name: 'Desktop Chrome' }, ], }; ``` And the following test structure: ``` smoke-tests/ └── basic.spec.ts ``` Will result in the following screenshots folder structure by default: ``` __screenshots__/ └── darwin/ ├── Mobile Safari/ │ └── smoke-tests/ │ └── basic.spec.ts/ │ └── screenshot-expectation.png └── Desktop Chrome/ └── smoke-tests/ └── basic.spec.ts/ └── screenshot-expectation.png ``` |
||
---|---|---|
.. | ||
build | ||
docker | ||
doclint | ||
flakiness-dashboard | ||
generate_types | ||
linux-browser-dependencies | ||
protocol-types-generator | ||
testserver | ||
avd_install.sh | ||
avd_recreate.sh | ||
avd_start.sh | ||
avd_test.js | ||
build_android_driver.sh | ||
check_chromium_cdn.js | ||
check_deps.js | ||
copyright.js | ||
draft_release_notes.sh | ||
generate_channels.js | ||
generate_chromium_default_font_families.js | ||
generate_dotnet_channels.js | ||
lint_tests.js | ||
list_closed_issues.sh | ||
markdown.js | ||
pack_package.js | ||
print_versions.js | ||
publish_all_packages.sh | ||
roll_browser.js | ||
upload_flakiness_dashboard.sh | ||
video_stress.js | ||
workspace.js |