
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
pytest-playwright-snapshot
Advanced tools
This plugin enables snapshot testing in playwright like snapshotting screenshots of pages, element handles etc.
$ pip install pytest-playwright-snapshot
This plugin provides a assert_snapshot
fixture which is used to create snapshots and compare it.
Example:
def test_myapp(page, assert_snapshot):
page.goto("https://example.com")
assert_snapshot(page.screenshot(), "example.png")
Ths first time you run pytest, you will get error like
Failed: Snapshot not found, use --update-snapshots to create it.
As first you need to create golden snapshots to which this plugin will compare in future.
To create snapshots run:
$ pytest --update-snapshots
This will create snapshots for your tests, after that you can run the tests are usual and this will compare the snapshots.
There is threshold
kwarg only option which can be used to set the threshold for the comparison of the screenshots and by default it is 0.1
Apache 2.0 LICENSE
FAQs
A pytest wrapper for snapshot testing with playwright
We found that pytest-playwright-snapshot demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.