Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
judit-nahaj committed Feb 14, 2018
2 parents f850a2b + 9c1b401 commit 63b2b3d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/builtIn/Macro.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class Macro extends DefaultConfig {
* @returns {boolean|*} FALSE if the given element should be filtered out.
*/
preFilterScenario(scenario, parent, i) {
if (!scenario.tags) {
return;
}
const macroTag = scenario.tags.find(tag => /^@macro\(.*\)/.test(tag.name));

if (macroTag) {
Expand Down
3 changes: 3 additions & 0 deletions test/data/input/macro.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Feature: Test for macro

Background: Background
Given step

@macro(not_used_macro)
Scenario: Macro not used
Given the Index pages is opened
Expand Down
3 changes: 3 additions & 0 deletions test/data/output/macro.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Feature: Test for macro

Background: Background
Given step

Scenario: Logging in
Given the Login pages is opened
When the username field is filled with the username of user_1
Expand Down

0 comments on commit 63b2b3d

Please sign in to comment.