How to use tag in my function scenario Cucumber.js?
See original GitHub issueHi,
How to know the scenario that calls my function ? How to use the tags in my function scenario ?
Actually I have one scenario :
Feature: create module feature
As a admin
I want to use create module
@createModule
Given I am logged as 'ADMIN'
And I am on "/admin/create"
Then The "book_id" field should be empty
I would like to use my tag @createModule in my function Then :
this.Then(/^The "?([^"]*)"? field should be empty$/, function (el) {
if (myModule === @createModule) {
...
} else if {
...
}
return main_po.checkIsEmptyElement(this, el);
});
I would like to get my tag @createModule, to specify the scenario called, or other alternative, I would like to know what scenarios call my function.
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to use the tags in my function scenario Cucumber.js?
I would like to get my tag @createModule, to specify the scenario called, or other alternative, I would like to know what scenarios...
Read more >Cucumber Tags - Tools QA
Tag starts with “@”. After “@” you can have any relevant text to define your tag like @SmokeTests just above the scenarios you...
Read more >Cucumber Reference - Cucumber Documentation
Another way to run a subset of scenarios is to use the file.feature:line pattern or the --scenario option. Tag expressions. A tag expression...
Read more >Chapter 5.3 - Data Files, Tags, and NPM Scripts
# Using Tags. Tags are an easy way to group tests, Features , or Scenarios in Cucumber. It allows us to group Features...
Read more >Organising Scenarios With Tags - Hindsight | Guides & tutorials
This is very useful when it comes to executing scenarios. Tools like Cucumber can take tags as arguments to determine which scenarios to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Solved :
I added :
and my function :
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.