hermione-testgen

0.0.2 • Public • Published

hermione-testgen

YAML screenshot tests generator for Hermione.

Usage

1. Install the package

npm install hermione-testgen

2. Create YAML file with your tests

# tests/generate.yml
- name: Test suite # (required) Test suite name.
  url: Maksandre/hermione-testgen # (required) It will be added to your baseUrl from .hermione.conf.js.
  size: [800, 1600] # (optional) Window width. If specified it generates a test for each parameter.
  sets: # (required)
    - test: plain # (required) Test name.
      size: [900, 400] # (optional) Override test suite sizes.
      only: [chrome, ie11] # (optional) Create tests only for specified browsers from your .hermione.conf.js.
      testComponent: 'h1' # (required) Element selector under test.
    - test: hover
      skip: [ie11] # (optional) Skip tests for browsers from your hermione.conf.js.
      act: # (optional)
        - moveToObject: h1 # (optional) Element selector to hover.
          click: h1 # (optional) Element selector to click.
          # ... you may specify as many actions as you need.
      testComponent: 'h1'
# ... next test suite

3. Use it in your tests

// tests/test.js
const generateTests = require('hermione-testgen');

describe('Genetated tests', function () {
  generateTests('./tests');
});

Package Sidebar

Install

npm i hermione-testgen

Weekly Downloads

3

Version

0.0.2

License

MIT

Unpacked Size

4.67 kB

Total Files

4

Last publish

Collaborators

  • maxick