Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hook up ability to move signups around a raid
Accepting, unaccepting, cancelling and re-enqueuing are now fully supported and only allowed by the appropriate party.
- Loading branch information
1 parent
381e670
commit cf14657
Showing
7 changed files
with
104 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
<div class="signup"> | ||
<span><%= signup.character_name %></span> | ||
<span><%= signup.role %></span> | ||
<span class="actions"> | ||
<% list_available_signup_actions(signup).each do |action| %> | ||
<%= link_to action.name, update_signup_path(signup.id, command: action.action) %> | ||
<% end %> | ||
</span> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Feature: Managing Raid Signups | ||
|
||
Background: | ||
Given I am signed in as "jason" | ||
And today is "2012/07/01" | ||
And "jason" has scheduled the following raids | ||
| where | when | start | invite_offset | | ||
| ICC | 2012/07/01 | 20:00 | 15 | | ||
And "jason" has the following characters | ||
| game | region | server | name | | ||
| wow | US | Detheroc | Weemuu | | ||
|
||
And "jason" signed up "Weemuu" for "ICC" | ||
When I am at the home page | ||
And I follow "ICC" | ||
|
||
Scenario: Raid leader can manage signup acceptance | ||
# Available -> Accept | ||
Then I should see "Accept" within ".available" | ||
|
||
When I follow "Accept" | ||
Then I should see "Weemuu" within ".accepted" | ||
And I should see "Unaccept" within ".accepted" | ||
|
||
# Accept -> Available | ||
When I follow "Unaccept" | ||
Then I should see "Weemuu" within ".available" | ||
And I should see "Accept" within ".available" | ||
|
||
# Available -> Cancelled | ||
When I follow "Cancel" | ||
Then I should see "Weemuu" within ".cancelled" | ||
And I should see "Enqueue" within ".cancelled" | ||
And I should not see "Accept" within ".cancelled" | ||
|
||
# Cancelled -> Available | ||
When I follow "Enqueue" | ||
Then I should see "Weemuu" within ".available" | ||
And I should see "Accept" within ".available" | ||
And I should see "Cancel" within ".available" | ||
|
||
# Accepted -> Cancelled | ||
When I follow "Accept" | ||
And I follow "Cancel" | ||
Then I should see "Weemuu" within ".cancelled" | ||
And I should see "Enqueue" within ".cancelled" | ||
And I should not see "Accept" within ".cancelled" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters