2

Say, if an application has both admin console(admin user only) and user consoles(end user) and a course of action in admin console will be reflected in user console. So, even though the goal is considered to be for actual end user, changes will also be seen for admin as well.

We currently have one story with acceptance criteria saying admin user should be able to re-order menu items in admin console.

Here is the sample feature:

Feature: Re-order menu items

In order to change the display order of menu items for end users/customers in user console

As an admin user

I want to re-order menu items in admin console

It makes sense to have single feature to specify the expected behavior(or goal) , but cases like these where feature could be one but outcome is just not at a single place and also the stakeholders are different- what is the better approach - single feature (or) multiple features? Any recommendations?

1 Answer 1

1

The user story will be implemented for the admin, so you can write checks as the following:

Given I am an admin
When I set the order "XYZ"
Then the order "XYZ" is saved

and

Given I am an admin
When I set the default order
Then the order "TYZ" is saved

And for the user side story, you can write scenarios as the following:

Given I am an user
And the order "XYZ" is set
Then I see the order "XYZ"

and

Given I am an user
And the default order is set
Then I see the order "TYZ"

They can even go on the same .feature file, if you evaluate that would be clearer for your context.

However, I would say to not write things such as

Given I am an admin
When I set the order "XYZ"
Then I logout
And I login as an user
Then I see the order "XYZ"

Because you would be coupling the actions of the two users. It would make developing harder, because it does not motivates mocking on the user view scenario. Additionally, if you change the way the order is set, even if only the wording, it would reflect on the scenario related to the user, whom does not care about how the order is set, but only that it is set somehow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.