How to use the terra-toolkit/lib/nightwatch/responsive-helpers.resizeTo function in terra-toolkit

To help you get started, we’ve selected a few terra-toolkit 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 cerner / generator-terra-module / generators / app / templates / projectName-spec.js View on Github external
/* eslint-disable no-unused-expressions */
// eslint-disable-next-line import/no-extraneous-dependencies
const resizeTo = require('terra-toolkit/lib/nightwatch/responsive-helpers').resizeTo;

module.exports = resizeTo(['tiny', 'small', 'medium', 'large', 'huge', 'enormous'], {
  'Displays a default <%= moduleName %>': (browser) => {
    browser
      .url(`http://localhost:${browser.globals.webpackDevServerPort}/#/tests/<%= moduleName %>-tests/default`)
      .expect.element('.<%= cssClassName %>').to.be.present;
  },
});