I am new to Cucumber and Gherkin, here's the situation I think I will come across. A home page contains many features, naturally you want to start from the home and perform a task, feature.
Given user logged into home page
When user performs feature 1
Then ...
Given user logged into home page
When user performs feature 2
Then ...
When you run Cucumber the for the second feature, it will complain that the Given step is ambiguous.
How does one resolve this issue? You can change the Given step a little bit for the second feature. By doing so, you are actually repeating yourself. Thoughts, anyone?
if user logged into homepage is a pre requisite for your tests within the feature to run, then put it in the background:
Then: