Skip to content

Commit

Permalink
Merge pull request #2326 from cesy/AO3-4464tests
Browse files Browse the repository at this point in the history
AO3-4464 Admin automated test TODOs
  • Loading branch information
sarken committed Jan 27, 2016
2 parents 53dd21b + 845e980 commit 2e9ea6f
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 18 deletions.
7 changes: 5 additions & 2 deletions features/admins/admin_post_issues.feature
Expand Up @@ -13,9 +13,12 @@ Feature: Admin Actions to Post Known Issues
# Suspect related to issue 2458
And I press "Post"
Then I should see "Known issue was successfully created"
And I should see "First known problem"

Scenario: Edit known issues
# TODO

Given I have posted known issues
When I edit known issues
Then I should see "Known issue was successfully updated"
Then I should see "Known issue was successfully updated"
And I should not see "First known problem"
And I should see "This is a bit of a problem, and this is too"
25 changes: 23 additions & 2 deletions features/admins/admin_post_news.feature
Expand Up @@ -63,8 +63,29 @@ Feature: Admin Actions to Post News
Then 1 email should be delivered to "testadmin@example.org"
# notification to the admin list for admin post
And 1 email should be delivered to "admin@example.org"

# TODO: this is something the user does, not the admin, and should be in another test?

Scenario: Evil user can impersonate admin in comments
# However, they can't use an icon, so the admin's icon is the guarantee that they're real
# also their username will be plain text and not a link

Given I have posted an admin post
When I am logged out as an admin
And I am logged in as "happyuser"
And I go to the admin-posts page
When I follow "Comment"
And I fill in "Comment" with "Excellent, my dear!"
And I press "Comment"
When I am logged out
And I go to the admin-posts page
And I follow "Default Admin Post"
And I fill in "Comment" with "Behold, ye mighty, and despair!"
And I fill in "Name" with "admin"
And I fill in "Email" with "admin@example.com"
And I press "Comment"
Then I should see "Comment created!"
And I should see "admin"
And I should see "Behold, ye mighty, and despair!"

Scenario: User views RSS of admin posts

Given I have posted an admin post
Expand Down
32 changes: 18 additions & 14 deletions features/admins/admin_works.feature
Expand Up @@ -157,30 +157,34 @@ Feature: Admin Actions for Works and Bookmarks
Then I should see "Successfully logged in"
When I view the work "The One Where Neal is Awesome"
And I follow "Comments (1)"
Then I should not see "Mark as spam"
Then I should not see "Spam" within "#feedback"

# now mark a comment as spam
When I post the comment "Would you like a genuine rolex" on the work "The One Where Neal is Awesome" as a guest
And I am logged in as an admin
And I view the work "The One Where Neal is Awesome"
And I follow "Comments (2)"
Then I should see "rolex"
And I should see "Spam"
When I follow "Spam"
And I should see "Spam" within "#feedback"
When I follow "Spam" within "#feedback"
# Can see link to unmark
Then I should see "Not Spam"
When I follow "Hide Comments"
# TODO: Figure out if this is a defect or not, that it shows 2 instead of 1
# Then I should see "Comments (1)"

# comment should no longer be there
When I follow "Comments"
Then I should see "rolex"
And I should see "Not Spam"
# Admin can still see spam comment
And I should see "Hide Comments (2)"
And I should see "rolex"
# proper content should still be there
And I should see "I loved this!"
When I am logged out as an admin
And I view the work "The One Where Neal is Awesome"
And I follow "Comments"
# user can't see spam comment, but can see that it exists
Then I should see "Comments (2)"
When I follow "Comments (2)"
Then I should not see "rolex"
And I should see "I loved this!"
# author can still see that spam comment exists, but can't see content of it
When I am logged in as "author" with password "password"
And I view the work "The One Where Neal is Awesome"
And I follow "Comments"
Then I should not see "rolex"
Then I should see "Comments (2)"
When I follow "Comments (2)"
Then I should not see "rolex"
And I should see "I loved this!"

0 comments on commit 2e9ea6f

Please sign in to comment.