@hirez_io/lembas-cypress
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

lembas-cypress

A cypress plugin to run lembas setup files as a task.

Usage

In your plugins/index.ts add the following:

import { setupDataTask } from '@hirez_io/lembas-cypress';

export default (on, config) => {
  on('task', setupDataTask);
  
};

Then in your tests you can call the task like this:

import { SETUP_DATA } from '@hirez_io/lembas-cypress';
import { MainSetupData } from './main.smoke.setup';

describe('main smoke test', () => {

  it('should do something', () => {

    cy.task<MainSetupData>(SETUP_DATA, 'src/smoke/main.smoke.setup').then(data) => {

      cy.visit('/');

      // ... do something with the data ...
      
    });
  });
});


Readme

Keywords

none

Package Sidebar

Install

npm i @hirez_io/lembas-cypress

Weekly Downloads

0

Version

0.0.5

License

none

Unpacked Size

4.28 kB

Total Files

9

Last publish

Collaborators

  • hirez.io