Git Product home page Git Product logo

gpc-step-groups's Introduction

gpc-step-groups

Downloads Version@npm Version@git CI Docs

The StepGroups precompiler is responsible for correcting the gherkin keywords of steps to make the tests more readable.

Example

Given the page is opened
Given the settings are deleted
When the settings menu item is clicked
When the advanced settings link is clicked
Then the advanced settings should be loaded
Then the basic settings link should be visible

It will be modified to:

Given the page is opened
And the settings are deleted
When the settings menu item is clicked
And the advanced settings link is clicked
Then the advanced settings should be loaded
And the basic settings link should be visible

Usage

'use strict';
const compiler = require('gherking');
const StepGroups = require('step-groups');

let ast = await compiler.load('./features/src/login.feature');
ast = compiler.process(
    ast,
    new StepGroups({
        // config
    })
);
await compiler.save('./features/dist/login.feature', ast, {
    lineBreak: '\r\n'
});
'use strict';
import {load, process, save} from "gherking";
import Template = require("step-groups");

let ast = await load("./features/src/login.feature");
ast = process(
    ast,
    new Template({
        // config
    })
);
await save('./features/dist/login.feature', ast, {
    lineBreak: '\r\n'
});

Other

This package uses debug for logging, use gpc:step-groups :

DEBUG=gpc:step-groups* gherking ...

For detailed documentation see the TypeDocs documentation.

gpc-step-groups's People

Contributors

dependabot[bot] avatar judit-nahaj avatar szikszail avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.