Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@syngrisi/core-api
Advanced tools
Readme
Syngrisi Core API (@syngrisi/core-api
) provides an interface to communicate with the Syngrisi visual regression
testing service. This service allows clients to start and stop sessions, create checks, and get snapshots and baselines.
This is the common JS/TS library, if you use WebdriverIO as automation framework try to use wdio-syngrisi-cucumber-service or @syngrisi/syngrisi-wdio-sdk, if Playwright try to
use @syngrisi/playwright-sdk. For detailed documentation on the API methods
and their parameters, refer to Syngrisi Core API Documentation.
Syngrisi Core API (@syngrisi/core-api
) provides a way to interact with the Syngrisi visual regression testing service. This service lets you start and stop testing sessions, set up test checks, and retrieve snapshots and baseline images. This is a common JavaScript/TypeScript library. If your automation framework is WebdriverIO, consider using wdio-syngrisi-cucumber-service or @syngrisi/syngrisi-wdio-sdk. If you are using Playwright, the @syngrisi/playwright-sdk is recommended. For a comprehensive guide on how to use the API's functions and parameters, please check out the Syngrisi Core API Documentation.
Install the package with npm:
npm install @syngrisi/core-api
To begin visual regression testing, start a session with the Syngrisi service:
import { SyngrisiApi } from '@syngrisi/core-api';
// Initialize the API client with your configuration
const apiClient = new SyngrisiApi({
url: 'http://<your-domain>/',
apiKey: 'your-api-key'
});
// Start a new session with the required parameters
// The `sessionResponse` will have data about the test that started, and contains a `testId` which will be used for creating checks
const sessionResponse = await apiClient.startSession({
run: 'run-id',
suite: 'suite-name',
runident: 'run-identifier',
name: 'test-name',
viewport: '1200x800',
browser: 'chrome',
browserVersion: '113',
os: 'macOS',
app: 'MyProject'
});
Once the session is started, you can perform a visual check:
// Assuming `imageBuffer` is the Buffer instance of the screenshot to check
// The `checkResponse` will contain the result of the visual comparison
const checkResponse = await apiClient.coreCheck(imageBuffer, {
name: 'homepage',
viewport: '1200x800',
browserName: 'chrome',
os: 'macOS',
app: 'MyProject',
branch: 'main',
testId: sessionResponse.testId // obtained from the startSession call
});
After checks are completed, stop the session:
// `stopResponse` will have data about the completed test.
const stopResponse = await apiClient.stopSession(sessionResponse.testId);
SYNGRISI_LOG_LEVEL
- logging level ("trace" | "debug" | "info" | "warn" | "error"
)
This project is licensed under the MIT License - see the LICENSE.md file for details.
FAQs
Syngrisi Core JS client
The npm package @syngrisi/core-api receives a total of 1 weekly downloads. As such, @syngrisi/core-api popularity was classified as not popular.
We found that @syngrisi/core-api 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.