Skip to content

Commit

Permalink
Merge pull request #2 from Enigel/otwarchive
Browse files Browse the repository at this point in the history
---

Beefing up some wrangling tests.
  • Loading branch information
thecatwasnot committed Feb 8, 2011
2 parents 1803097 + e579ea5 commit 53b1827
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 10 deletions.
6 changes: 6 additions & 0 deletions features/fixtures/tags.yml
Expand Up @@ -21,6 +21,7 @@ fandom3:
media1:
name: TV Shows
type: Media
canonical: true
char1:
name: Person A
type: Character
Expand All @@ -29,3 +30,8 @@ char1a:
name: Persone A
type: Character
taggings_count: 1
ghostsoup:
id: 1234
name: Ghost Soup
type: Fandom
canonical: true
2 changes: 1 addition & 1 deletion features/step_definitions/tag_steps.rb
Expand Up @@ -48,12 +48,12 @@
if tw.blank?
tw = Factory.create(:user, {:login => user, :password => password})
tw.activate
tw.tag_wrangler = '1'
else
tw.password = password
tw.password_confirmation = password
tw.save
end
tw.tag_wrangler = '1'
visit login_path
fill_in "User name", :with => user
fill_in "Password", :with => password
Expand Down
40 changes: 37 additions & 3 deletions features/tag_wrangling_more.feature
@@ -1,5 +1,5 @@
@tags @tag_wrangling
Feature: Tag wrangling more
Feature: Tag wrangling: assigning wranglers, using the filters on the Wranglers page

Scenario: Log in as a tag wrangler and see wrangler pages.
View new tags in your fandoms
Expand All @@ -10,8 +10,11 @@ Feature: Tag wrangling more
And the following activated user exists
| login | password |
| dizmo | wrangulator |
And the following activated tag wrangler exists
| login | password |
| Enigel | wrangulator |

# making a user into a tag wrangler
# admin making a user into a tag wrangler
When I go to the admin_login page
And I fill in "admin_session_login" with "Zooey"
And I fill in "admin_session_password" with "secret"
Expand Down Expand Up @@ -49,7 +52,7 @@ Feature: Tag wrangling more
And I should see "first fandom"
And I should not see "dizmo" within ".wranglers"

# assigning a wrangler to a fandom
# assigning a fandom to oneself
When I fill in "tag_fandom_string" with "first fandom"
And I press "Assign"
And I follow "Wrangling Home"
Expand All @@ -65,3 +68,34 @@ Feature: Tag wrangling more
When I follow "first fandom"
Then I should see "Wrangle Tags for first fandom"
And I should see "Characters (1)"

When I follow "Log out"
And I am logged in as "Enigel" with password "wrangulator"
And I follow "Tag Wrangling"

# assigning another wrangler to a fandom
When I follow "Wranglers"
And I fill in "fandom_string" with "Ghost"
And I press "Go"
Then I should see "Ghost Soup"
And I should not see "first fandom"
When I select "dizmo" from "assignments_1234_"
And I press "Assign"
Then I should see "Wranglers were successfully assigned"

# the filters on the Wranglers page
When I select "TV Shows" from "media_id"
And I fill in "fandom_string" with ""
And I press "Go"
Then "TV Shows" should be selected within "media_id"
And I should see "first fandom"
And I should not see "second fandom"
When I select "dizmo" from "wrangler_id"
And I press "Go"
Then I should see "first fandom"
And I should not see "Ghost Soup"
When I select "" from "media_id"
And I press "Go"
Then "dizmo" should be selected within "wrangler_id"
And I should see "Ghost Soup"
And I should see "first fandom"
21 changes: 15 additions & 6 deletions features/tag_wrangling_relationships.feature
Expand Up @@ -218,21 +218,30 @@ Scenario: relationship wrangling - syns, mergers, characters, autocompletes

Given the following activated tag wrangler exists
| login | password |
| Enigel | wrangulate! |
| Enigel | wrangulate |
And the following activated user exists
| login | password |
| writer | password |
And basic tags
And a fandom exists with name: "Up with Testing", canonical: true
And a fandom exists with name: "Coding", canonical: true
And a character exists with name: "Testing McTestypants", canonical: true
And a character exists with name: "Testing McTestySkirt", canonical: true
And I am logged in as "Enigel" with password "wrangulate!"

# create a relationship from posting a work as a regular user, just in case
Given I am logged in as "writer" with password "password"
And I follow "Post New"
And I fill in "Fandoms" with "Up with Testing"
And I fill in "Work Title" with "whatever"
And I fill in "Relationships" with "Testypants/Testyskirt"
And I press "Post without preview"
And I follow "Tag Wrangling"

When I edit the tag "Coding"
And I fill in "content" with "a long story about nothing"
And I press "Preview"
And I press "Post"
And I follow "Log out"

# wrangle the tags to be as close of those that have errored on beta and test
When I am logged in as "Enigel" with password "wrangulate"
And I edit the tag "Coding"
And I fill in "MetaTags" with "Up with Testing"
And I press "Save changes"
Then I should see "Tag was updated"
Expand Down

0 comments on commit 53b1827

Please sign in to comment.