I have a question since i started o use cucumber with cypress. According to cucumber syntax we can write scenarios like this:
Feature: Background Section
Scenario: ex #1
When counter is incremented
Then counter equals 1
Scenario: ex #2
When counter is incremented
When counter is incremented
Then counter equals 2
Scenario: ex #3
When counter is incremented
Then counter equals 3
Question: If When counter is incremented
is used in each scenario, does this mean that the code that is write in ex 1
will override the When counter is incremented
from ex 2
?
Question reason: I had a situation in cypress when the tests was working separately but if i put all the scenarios to run then a test failed, and only making different the titles of each when.then.given
my tests passed. So i assume the the titles have an importance.
Who faced with the same issues?