cucumber-tsflow是否支持@和装饰器?
我希望能够实现以下情况。
当我使用“黄瓜”中的“给定,何时,然后和”绑定时。我的脚本抛出错误
虽然从“ cucumber-tsflow”中“给出,何时,然后”可以正常工作。
cucumber-tsflow是否支持“和”装饰器?
ERROR @wdio/runner: Error: src\stepDefs\LandingPage.steps.ts:36: Invalid second argument: should be a object or function
at C:\typescript\cucumber-ts-wdio\node_modules\cucumber\lib\support_code_library_builder\validate_arguments.js:88:13
at Array.forEach (<anonymous>)
at validateArguments (C:\typescript\cucumber-ts-wdio\node_modules\cucumber\lib\support_code_library_builder\validate_arguments.js:82:23)
功能文件:
Scenario: Test
Given I Am On Landing Page
Then Verify Landing Page
And Click Start Shopping
And Add Add Plan To Cart
我的步骤定义文件
import {given,when,then,binding} from 'cucumber-tsflow';
import {Given, When, Then, And} from 'cucumber';
import landingPageModel from '../pagemodels/LandingPageModel';
@binding()
class sampleSteps {
@given('I Am On Landing Page')
public landing_page() {
landingPageModel.navigateToUrl();
}
@then('Verify Landing Page')
public verify_landing_page() {
landingPageModel.verifyLandingPage();
}
@when('I Click Start Shopping')
public i_click_start_chopping() {
landingPageModel.clickOnStartShopping();
}
}
export default new sampleSteps();