Logo: Relish

  1. Sign in

Project: Addiction-pat

View my papers

In order to find papers
As a website user
I need to be able to access papers that I am authorized to

Background
Given
a user exists with the email "[email protected]"
Scenarios
Website visitors (not logged in users) should have no access
Given
I am not logged in
When
I am on the "your papers" page
Then
I should be redirected to the "login" page
And
I should see the message "Sorry, you must be logged in to view that page"
Users with no papers should see a message explaining this
Given
I am logged in as "[email protected]"
And
there are no papers I have a role assign to
Then
I should see the message "You don't have any papers yet"
All users should be able to create a new paper
Given
I am logged in as "[email protected]"
When
I am on the "your papers" page
Then
I should be able to see a link to the "create paper" page with the text "Create Paper"
Users with an admin role on a paper should be able to delete a paper
Given
I am logged in as "[email protected]"
And
I have an admin role on a paper with the title "Admin Paper Title"
When
I am on the "your papers" page
Then
I should see the paper with the title "Admin Paper Title"
And
I should be able to see a link to the "delete paper" page with the text "delete"
And
I should be able to view the paper with the title "Admin Paper Title"
Users with an author role on a paper should not be able to delete a paper
Given
I am logged in as "[email protected]"
And
I have an author role on a paper with the title "Author Paper Title"
When
I am on the "your papers" page
Then
I should see the paper with the title "Author Paper Title"
And
I should not be able to see a link to the "delete paper" page
And
I should be able to view the paper with the title "Author Paper Title"
Users who have no roles on a paper should not be able to access it
Given
I am logged in as "[email protected]"
And
I have no roles on a paper with the title "No Roles"
When
I am on the "your papers" page
Then
I should not see the paper with the title "No Roles"
And
I should not be able to see a link to the "delete paper" page
And
I should not be able to view the paper with the title "No Roles"

Last published 10 months ago by SilverbackDan.