Skip to content

Commit

Permalink
Done with iter1-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Vikram Baid committed Oct 26, 2017
1 parent 2142aaa commit a0f63f1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions app/views/admins/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@
<%= link_to "Approve", admin_approve_team_path(:team_id => t, :disc=> "#{s.disc3id}"), {:id=>"approve_3", :class=>'btn btn-xs btn-danger'} %>
<%= label "disc_#{s.disc3id}", Discussion.find_by_id(s.disc3id).info %>
</td>
<td>
<%= link_to "Send Email", admins_send_email_path(:team_id => t), {:id=>"sendemail_#{t.id}", :class=>'btn btn-xs btn-success'} %>
</td>
<% else %>
<td>Forming</td>
<td></td>
<% end %>
<td>
<%= link_to "Send Email", admins_send_email_path(:team_id => t), {:id=>"sendemail_#{t.id}", :class=>'btn btn-xs btn-success'} %>
</td>
</tr>
<% end %>
</table>
Expand Down
7 changes: 4 additions & 3 deletions features/admins/create_email.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@ Feature: An admin sends an e-mail
Background:
Given the following users exist
| name | email |team_passcode | major | sid |
| Sahai | eecs666@hotmail.com | penguindrool | EECS | 000 |
| Sahai | eecs666@hotmail.com | penguindrool | EECS | 000 |
| Jorge | legueoflegends667@hotmail.com | penguindrool | Football Player | 999 |
| Kandi | justanotheremail@aol.com | anotherteam | EECS | 567 |
| Kandi | justanotheremail@aol.com | penguindrool | EECS | 567 |
And the following admins exist
| name | email |
| Bob | supreme_ruler@aol.com |
And the following discussions exist
| number | time | capacity |
| 54321 | Tues, 3pm | 25 |
And the team with passcode "penguindrool" is submitted
And I am on the login page
And I log in as an admin with email "supreme_ruler@aol.com"

Scenario: Send E-mail button is available and redirects you to the send page
Given I follow "Send Email"
Given I first follow "Send Email"
Then I should see "Send customized e-mail to team"

Scenario: Fill In TextBox Area, and click Submit
Expand Down
6 changes: 5 additions & 1 deletion features/step_definitions/web_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@ def with_scope(locator)
click_button(button)
end

When /^(?:|I )follow "([^"]*)"$/ do |link|
When /^(?:|I )first follow "([^"]*)"$/ do |link|
click_link(link, match: :first)
end

When /^(?:|I )follow "([^"]*)"$/ do |link|
click_link(link)
end

When /^(?:|I )fill in "([^"]*)" with "([^"]*)"$/ do |field, value|
fill_in(field, :with => value)
end
Expand Down

0 comments on commit a0f63f1

Please sign in to comment.