Protractor CumberJS-TaggedBeforeFeature
我希望在CucumberJS-量角器测试中标记我的BeforeFeature挂钩,以便Protractor CumberJS-TaggedBeforeFeature,protractor,bdd,cucumberjs,Protractor,Bdd,Cucumberjs,我希望在CucumberJS-量角器测试中标记我的BeforeFeature挂钩,以便 挂钩仅对具有该标记的要素文件运行 钩子中的代码在功能文件开始之前只运行一次,而不是在每个场景之前 e、 g.-仅以特定用户身份登录BeforeFeature中的功能文件“abc.feature” cucumberjs中BeforeFeature的现有实现如下所示- this.registerHandler('BeforeFeature', function (feature) { //do c
this.registerHandler('BeforeFeature', function (feature) {
//do common action before feature file execution
});
我不确定它是否将标记作为参数。是否有其他方法在BeforeFeature级别指定标记
this.BeforeFeature(function(feature) {
feature.getTags().forEach(function (tag) {
if(tag.getName() === '@myTag') {
//do common action before feature file execution
}
});
});
或
this.BeforeFeature(function(feature) {
if(feature.getName() === 'ABC') {//Gherkin file => Feature: ABC
//do common action before feature file execution
}
});