-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
52 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,14 +9,33 @@ Feature: admin adds discussion times | |
| Bob | supreme_ruler@aol.com | ilikcats | | ||
And I am on the login page | ||
And I log in as an admin with email "[email protected]" | ||
And I am on the new discussion page | ||
|
||
Scenario: Admin successfully adds a new discussion | ||
Given I am on the new discussion page | ||
When I fill in "ccn" with "12345" | ||
Given I fill in "ccn" with "12345" | ||
And I select "Monday" from "day" | ||
And I fill in "time" with "3pm" | ||
And I fill in "capacity" with "20" | ||
And I press "Add Discussion" | ||
Then I should see "Discussion Sections" | ||
And I should see "12345 Monday 3pm 20" | ||
|
||
And PENDING: I choose "3PM" from "time" | ||
And PENDING: I fill in "capacity" with "20" | ||
And PENDING: I press "Add Discussion" | ||
Then PENDING: I should see "Discussion Sections" | ||
And PENDING: I should see "12345 Monday 3pm 20" | ||
|
||
Scenario: Admin prevented from adding a discussion with an already-existing CCN | ||
Given the following discussions exist | ||
| number | time | capacity | | ||
| 54321 | Tues, 3pm | 25 | | ||
And PENDING: I fill in "ccn" with "54321" | ||
And PENDING: I select "Monday" from "day" | ||
And PENDING: I choose "3PM" from "time" | ||
And PENDING: I fill in "capacity" with "20" | ||
And PENDING: I press "Add Discussion" | ||
Then PENDING: I should see "This discussion already exists" | ||
|
||
Scenario: Admin fails to create a new discussion | ||
Given PENDING: I fill in "ccn" with "Elmo's World" | ||
And PENDING: I select "Monday" from "day" | ||
And PENDING: I choose "3PM" from "time" | ||
And PENDING: I fill in "capacity" with "Nananana" | ||
And PENDING: I press "Add Discussion" | ||
Then PENDING: I should see "Unable to create discussion" | ||
And PENDING: I should be on the new_discussion page |
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,25 @@ | ||
Feature: admin edits discussion times | ||
As an admin | ||
In order to account for course changes | ||
I want to edit discussion times and capacities | ||
|
||
Background: | ||
Given the following admins exist | ||
| name | email | password | | ||
| Bob | supreme_ruler@aol.com | ilikcats | | ||
And the following discussions exist | ||
| number | time | capacity | | ||
| 54321 | Tues, 3pm | 25 | | ||
And I am on the login page | ||
And I log in as an admin with email "[email protected]" | ||
|
||
Scenario: Admin successfully edits a discussion | ||
Given I am on the discussion_index page | ||
Then I should see "54321 Tues, 3pm 25" | ||
When PENDING: I press "edit_1" | ||
And PENDING: I select "Monday" from "day" | ||
And PENDING: I fill in "time" with "4pm" | ||
And PENDING: I fill in "capacity" with "10" | ||
And PENDING: I press "Make Changes" | ||
Then PENDING: I should see "Discussion Sections" | ||
And PENDING: I should see "54321 Monday 4pm 10" |