Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cucumber test done for select_teams ver.1 #3

Merged
merged 1 commit into from
Oct 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/group/create.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</td>

<td>Approved</td>
<% d = Discussion.find_by_id(t.discussion_id) %>
<% d = Discussion.find_by_number(t.discussion_id) %>
<td>
<%= d.info %>
</td>
Expand Down
41 changes: 41 additions & 0 deletions features/admins/add_group.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Feature: admin can create a Group by selecting two teams

As an administrator
So I can make a group
I want to select two teams and create a group

Background:
Given the following admins exist
| name | email |
| Bob | supreme_ruler@aol.com |
And I am on the login page
And I log in as an admin with email "supreme_ruler@aol.com"
And the following teams exist
| submission_id | approved | passcode | submitted | discussion_id |
| 1 | true | "asdf" | true | 79997 |
| 2 | true | "fdsa" | true | 79997 |
| 3 | true | "dididi" | true | 89998 |
| 4 | true | "tiredmj" | true | 89998 |
And the following discussions exist
#number, time, day, capacity, seats_open
| number | time | day | capacity | seats_open |
| 79997 | 3:00 PM | Tuesday | 24 | 24 |
| 89998 | 4:00 PM | Tuesday | 24 | 24 |

Scenario: An admin merges two valid teams in the same discussion
Given I press "Create Groups"
When I check "team_1"
And I check "team_2"
And I press "Create Group"
Then I should not see "team_1"
And I should not see "team_2"
And I should see "3"
And I should see "4"

Scenario: An admin merges two valid teams in different discussions
Given I press "Create Groups"
When I check "team_1"
And I check "team_3"
And I press "Create Group"
Then I should see "1"
And I should see "3"
7 changes: 7 additions & 0 deletions features/step_definitions/enrollme_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@
end
end

Given /^the following teams exist$/ do |table|
table.rows.each do |submission_id, approved, passcode, submitted, discussion_id|
next if submission_id == :submission_id # skipping table header
Team.create!(:submission_id => submission_id.to_i, :approved => approved=="true", :passcode => passcode, :submitted => submitted=="true", :discussion_id => discussion_id.to_i)
end
end

Given /^the following groups exist$/ do |table|
table.rows.each do |team1_id, team2_id, discussion|
next if team1_id == :team1_id # skipping table header
Expand Down
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

Loading