I am new at Cucumber. I am trying to write a feature file that tests
- a new drop down on an existing page
- and on selecting this new value entry goes in a new DB Table
I have written this feature file. It doesn't seem correct.
- I'm not sure if we can have two
Then
s. - Or is there some way we can have interdependent features, like one feature for the new drop down and one for the database entry?
The feature file is like
Scenario: Admin user should be able to assign ReadOnly role to a searched user via Change User page
Given user logs into webapp with Admin role
And Navigates to Change User page
When user searches for user with id 123
And clicks select link corresponding to correct id
Then Change User page loads
And it has a new drop down with Read Only role
And when user selects MS distributor in drop down # note when with small w
And Presses Submit button then a new entry is saved in DB table # then with small t
Or maybe I can use the following:
Scenario: Admin user should be able to assign ReadOnly role to a searched user via Change User page
Given user logs into webapp with Admin role
And Navigates to Change User page
When user searches for user with id 123
And clicks select link corresponding to correct id to open Change User page
And it has a new drop down with Read Only role # need to check this new value in my selenium test case
And when user selects MS distributor value in drop down # note when with small w
And presses Save button
Then a new entry is saved in DB table
I'm looking forward to learning from your experience.