How to use the mugshot function in mugshot

To help you get started, we’ve selected a few mugshot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NiGhTTraX / react-test-buffet / tests / gui / suite.js View on Github external
runnerBefore(function connectToSelenium() {
    const options = {
      host: SELENIUM_HOST,
      desiredCapabilities: { browserName: BROWSER }
    };

    rootSuiteBrowser = remote(options).init();

    const adapter = new WebdriverIOAdapter(rootSuiteBrowser);

    rootSuiteMugshot = new Mugshot(adapter, {
      rootDirectory: path.join(__dirname, 'screenshots', BROWSER),
      acceptFirstBaseline: false
    });

    return rootSuiteBrowser;
  });
github NiGhTTraX / react-test-buffet / tests / acceptance / setup.js View on Github external
before('Connecting to Selenium', function() {
  this.timeout(10 * 1000);

  const options = {
    host: SELENIUM_HOST,
    desiredCapabilities: { browserName: BROWSER }
  };

  const client = remote(options).init();
  const adapter = new WebdriverIOAdapter(client);

  mugshot = new Mugshot(adapter, {
    rootDirectory: path.join(__dirname, 'screenshots', BROWSER),
    acceptFirstBaseline: false
  });

  global.browser = client;

  return client;
});