How to use the cucumber-tsflow.after function in cucumber-tsflow

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

github 99xt / CodeSpecJS / lib / base.steps.ts View on Github external
lifeCycleHooks: IHooks;
  defaultElementTimeout: number;
  constructor() {
    this.elementService = ElementService.GetInstance();
    this.variableService = VariableService.GetInstance();
    this.lifeCycleHooks = new Hooks();
    this.defaultElementTimeout = 10000;
  }


  @before()
  public beforeEveryScenarios(): void {
    this.lifeCycleHooks.beforeScenario();
  }

  @after()
  public afterEveryScenario(): void {
    this.lifeCycleHooks.afterScenario();
  }
  // @after()
  // public afterAllScenarios(scenario): void {
  //   if (scenario.status === 'failed') {
  //     let world = this;
  //     browser.takeScreenshot().then(function (png) {
  //       var decodedImage = new Buffer(png.replace(/^data:image\/(png|gif|jpeg);base64,/, ''), 'base64');

  //       ScenarioContext.attach(decodedImage, 'image/png');
  //     });
  //   }
  // }

  private getWebElement(

cucumber-tsflow

Provides 'specflow' like bindings for CucumberJS 7.0.0+ in TypeScript 1.7+.

MIT
Latest version published 1 year ago

Package Health Score

57 / 100
Full package analysis

Similar packages