It's hard to answer your question as there's not a lot of detail about what you're trying to achieve, but I'll give it a go.
You've got 3 different inputs there:
- The viewer
- Whether it's been viewed or not
- A flag.
So those inputs provide different contexts (Givens) for the scenarios.
- Given a .jpg viewer
- Given I have already viewed the image twice
- Given the image has been flagged
How you set up the data for these givens is entirely up to you. You can hard-code it, use mysql data or input real data using an admin console, etc.. It shouldn't matter. The behaviour you're interested in is what happens when you apply the event (When):
- When I retrieve the v1 picture
Presumably, the input provided in your contexts is relevant, and will provide different outcomes (Thens) depending on that input.
- Then I should see a .jpg file
- Then I should see the "Image flagged" banner
- Then I should see the message "Viewed 2 times"
So I might have scenarios like:
Given a .jpg viewer
And an image that's been viewed 3 times
When I retrieve the v1 picture
Then the service should give me 1.jpg
And I should see the message "Viewed 3 times"
Given a .png viewer
When I retrieve the v1 picture
Then the service should give me 1.png
etc.
I don't know what your real service is doing, but hopefully this helps you see the pattern. Try to keep different aspects of the behaviour separated in the scenarios (more like the 2nd than the 1st) unless there are combinations you need to exemplify.