Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private async createApplitoolsInstance(
testArgs: TestHookArgs
): Promise {
const eyes = new Eyes(new VisualGridRunner(3));
const configuration = new Configuration();
configuration.setAppName('Proof');
configuration.setTestName('WebdriverIO Visual Grid');
const browserConfig = this.options.configure || defaultConfigure;
browserConfig(configuration);
// Settings
configuration.setApiKey(this.appSDKID!);
configuration.setForceFullPageScreenshot(true);
configuration.setHideScrollbars(true);
configuration.stitchMode = 'CSS';
eyes.setConfiguration(configuration);
if (!this.commonBatchInfo) {
function defaultConfigure(configuration: Configuration) {
configuration.addBrowser(1440, 800, BrowserType.CHROME);
configuration.addBrowser(1024, 900, BrowserType.CHROME);
configuration.addBrowser(768, 900, BrowserType.CHROME);
configuration.addBrowser(320, 900, BrowserType.CHROME);
}
function defaultConfigure(configuration: Configuration) {
configuration.addBrowser(1440, 800, BrowserType.CHROME);
configuration.addBrowser(1024, 900, BrowserType.CHROME);
configuration.addBrowser(768, 900, BrowserType.CHROME);
configuration.addBrowser(320, 900, BrowserType.CHROME);
}