Skip to content

Commit

Permalink
all passing tests are now marked with @passed. working on making more…
Browse files Browse the repository at this point in the history
… pass
  • Loading branch information
ckildow committed Jul 16, 2009
1 parent 5fe8f45 commit 74a6432
Show file tree
Hide file tree
Showing 19 changed files with 146 additions and 148 deletions.
18 changes: 16 additions & 2 deletions features/application_configs_test.feature
Expand Up @@ -10,6 +10,7 @@ Feature: Application Configs
And I am "Albus Dumbledore"
And I am on the Application Settings page

@passed
Scenario: Footer
When I fill in "Footer" with "Hogwarts University"
And I press "Submit"
Expand All @@ -25,11 +26,24 @@ Feature: Application Configs
Then I should see "Jedi Academy" in the footer
And I should see "Jedi Rule" in the footer

@passed
Scenario: LDAP Settings
When I fill in "Ldap address" with "2222"
When I fill in "Ldap host address" with "directory.yale.edu"
And I fill in "Ldap port" with "389"
And I fill in "Ldap base" with "ou=People,o=yale.edu"
And I fill in "Ldap login" with "uid"
And I fill in "Ldap first name" with "givenname"
And I fill in "Ldap last name" with "sn"
And I fill in "Ldap email" with "mail"
And I press "Submit"
Then I should see "Successfully updated appconfig."
And the ldap address should be "2222"
And the "ldap_host_address" should be "directory.yale.edu"
And the "ldap_port" should be "389"
And the "ldap_base" should be "ou=People,o=yale.edu"
And the "ldap_login" should be "uid"
And the "ldap_first_name" should be "givenname"
And the "ldap_last_name" should be "sn"
And the "ldap_email" should be "mail"

Scenario: Email: Site admin email address
When I fill in "Site Admin Email Address" with "dumbledore@hogwarts.edu"
Expand Down
7 changes: 4 additions & 3 deletions features/authentication_test.feature
Expand Up @@ -6,6 +6,7 @@ Feature: Authentication Systems
As a application admin
I want manage the authentication settings

@passed
Scenario: Using Authlogic to login if CAS is supposed to be your authtype

When I am on the login page
Expand All @@ -20,7 +21,7 @@ Feature: Authentication Systems
And I press "Reset my password"
Then I should see "No user using authlogic was found with that email address"
And "hp123@hogwarts.edu" should not receive an email

@passed
Scenario: Using Authlogic to login
When I am on the login page
And I fill in "Login" with "filch"
Expand Down Expand Up @@ -55,7 +56,7 @@ Feature: Authentication Systems
And I press "Submit"
Then I should see "Successfully logged in."


@passed
Scenario: Login Works until the password is actually reset
When I am on the login page
And I follow "reset your password?"
Expand All @@ -69,7 +70,7 @@ Feature: Authentication Systems
And I press "Submit"
Then I should see "Successfully logged in."
And I should see "Welcome Argus Filch"
@t

Scenario: Creating a user with AuthLogic
Given the user "Albus Dumbledore" has permissions "Hogwarts dept admin"
And I am "Albus Dumbledore"
Expand Down
5 changes: 2 additions & 3 deletions features/data_entries_test.feature
Expand Up @@ -20,12 +20,11 @@ Feature: data entries
And I am on the data objects page
When I follow "The One Ring"
And I press "Add new data entry"

And I select "Gold" as the "Metal"
And I check "Invisibility"
And I check "Flight"
And I put "It drove Frodo mad." in "Comments"
And I put "1" in "Number"
And I put "It drove Frodo mad." in "Comments"
And I select "Gold" as the "Metal"
And I press "Submit"

Then I should see "Successfully created data entry."
Expand Down
4 changes: 2 additions & 2 deletions features/data_objects_test.feature
Expand Up @@ -34,7 +34,7 @@ Feature: data object
And I should see "Name: Garfield"
And I should see "Description: he hates Mondays"
And I should see "Locations: Cats aisle, Checkout"

@passed
Scenario: Editing data objects
Given I have a data object of data_type "Cat", named "Garfield", description "he hates Mondays", in location "Cat Aisle"
When I am on the data objects page
Expand All @@ -53,7 +53,7 @@ Feature: data object
And I should see "Hermione's cat"
And I should see "Locations:"
And I should see "Dog Aisle"

@passed
Scenario: Deleting data objects
Given I have a data object of data_type "Cat", named "Garfield", description "he hates Mondays", in location "Cat Aisle"
When I am on the data objects page
Expand Down
1 change: 1 addition & 0 deletions features/data_types_test.feature
@@ -1,5 +1,6 @@
@data
@cw
@passed
Feature: data types
In order to manage data types
As an admin
Expand Down
46 changes: 11 additions & 35 deletions features/dept_payforms_configs.feature
Expand Up @@ -10,19 +10,8 @@ Feature: Payform settings
And the user "Albus Dumbledore" has permission "Hogwarts dept admin"
And I am on the department settings page

Scenario: Payform settings: Reminder email text and times
Given I have the following payforms:
| date | department | user_first | user_last | submitted | approved |printed|
| 2009-06-13 | Hogwarts | Harry | Potter | nil | nil | nil |
| 2009-06-06 | Hogwarts | Harry | Potter | true | nil | nil |
| 2009-05-09 | Hogwarts | Harry | Potter | true | true | nil |
| 2009-05-23 | Hogwarts | Hermione | Granger | true | true | nil |
| 2009-05-16 | Hogwarts | Hermione | Granger | true | true | true |


@t
Scenario: Payform settings: Min Length for Item description
When I fill in "department_config_description_min" with "7"
When I fill in "department_config_description_min" with "12"
And I press "Submit"
And I follow "Logout"
Given I am "Harry Potter"
Expand All @@ -32,15 +21,20 @@ Feature: Payform settings
And I follow "Payforms"

And I follow "New Payform Item"
And I select "calculate_hours_user_input" from "payform_item_hours"
And I select "Study" from "Category"
And I fill in "Description" with "hello"
And I select "03" from "time_input_start_4i"
And I select "00" from "time_input_start_5i"
And I select "PM" from "time_input_start_7i"
And I select "05" from "time_input_end_4i"
And I select "00" from "time_input_end_5i"
And I select "PM" from "time_input_end_7i"
And I select "Study" from "payform_item_category_id"
And I fill in "Description" with "description"
And I press "Create"
Then I should see "Description seems too short"
Then I should see "Description is too short"
And I should have 0 payform_items
When I fill in "Description" with "a longer description"
And I press "Create"
Then I should see "Payform item successfully created"
Then I should see "Successfully created payform item."
And I should have 1 payform_item


Expand Down Expand Up @@ -78,24 +72,6 @@ Feature: Payform settings
And payform item 1 should have attribute "active" "false"


Scenario: Payform settings: Punchclock for users
When I check "department_config_punch_clock"
And I press "Submit"
And I follow "Logout"
Given I am "Harry Potter"
And I am on the payforms page
Then I should see "Punch clock"

Given I am "Albus Dumbledore"
And I am on the department settings page
When I uncheck "department_config_punch_clock"
And I press "Submit"
And I follow "Logout"
Given I am "Harry Potter"
And I am on the payforms page
Then I should not see "Punch clock"


Scenario: Payform settings: Disabled Categories vs Miscellaneous
Given "Harry Potter" has a current payform
And "Harry Potter" has the following current payform item
Expand Down
7 changes: 4 additions & 3 deletions features/dept_shifts_configs.feature
Expand Up @@ -15,6 +15,7 @@ Feature: Shift settings
| 12/25/2009 5pm | 12/25/2009 7pm | Diagon Alley | Harry Potter |
And "Harry Potter" signs in at "12/25/2009 5:10pm"

@passed
Scenario: Shifts settings: Start and end times
When I select "05:00 AM" from "department_config_schedule_start"
And I select "07:00 AM" from "department_config_schedule_end"
Expand Down Expand Up @@ -48,9 +49,9 @@ Feature: Shift settings
| 15 | | | |

Scenario: Shifts settings: Grace Period
# When I fill in "department_config_grace_period" with "11"
# And I press "Submit"
# Then that_shift should not be late
When I fill in "department_config_grace_period" with "11"
And I press "Submit"
Then that_shift should not be late

When I fill in "department_config_grace_period" with "7"
And I press "Submit"
Expand Down
10 changes: 5 additions & 5 deletions features/payform_admin_test.feature
Expand Up @@ -16,7 +16,7 @@ Feature: payform admin
| 2009-05-23 | Hogwarts | Hermione | Granger | true | true | nil |
| 2009-05-16 | Hogwarts | Hermione | Granger | true | true | true |
And I am on the payforms page

@passed
Scenario: Viewing payforms
Then I should see "Harry Potter" under "User" in column 1
And I should see "2009-06-13" under "Unsubmitted" in column 2
Expand Down Expand Up @@ -58,15 +58,15 @@ Feature: payform admin
Then I should see "1 active clock"
And I should see "Harry Potter"
And I should see "Hermione Granger"

@passed
Scenario: Approving payforms
When I follow "2009-06-06"
And I follow "Approve Payform"
Then I should see "Successfully approved payform."
And I should not see "not"
When I am on the payforms page
Then I should see "2009-06-06" under "Approved" in column 4

@passed
Scenario: Printing Individual payforms
When I follow "2009-05-23"
And I follow "Print Payform"
Expand All @@ -80,7 +80,7 @@ Feature: payform admin
Then I should have a pdf with "Week Ending: May 23, 2009" in it
Then I should have a pdf with "Total Hours: 0" in it
Then I should have a pdf with "This payform was approved by #{@current_user} at" in it

@passed
Scenario: Printing Sets of Payforms
Given I have the following payform items
| category | user_login | hours | description | date |
Expand All @@ -102,7 +102,7 @@ Feature: payform admin
Then I should have a pdf with "caught the snitch" in it
Then I should have a pdf with "Total Hours: 1.5" in it
Then I should have a pdf with "This payform was approved by #{@current_user} at" in it

@passed
Scenario: Pruning Empty Payforms
Given I have the following payform items
| category | user_login | hours | description | date |
Expand Down
11 changes: 8 additions & 3 deletions features/payform_test.feature
Expand Up @@ -8,12 +8,17 @@ Feature: payform
Background:
Given I am "Harry Potter"
And I have a payform for the week "2009-5-23"

@t
Scenario: Add a job to a payform
Given I am on the page for the payform for the week "2009-05-23"
When I follow "New Payform Item"
And I select "2009-05-18" from "Date"
And I fill in "Hours" with "1.2"
And I select "03" from "time_input_start_4i"
And I select "00" from "time_input_start_5i"
And I select "PM" from "time_input_start_7i"
And I select "04" from "time_input_end_4i"
And I select "12" from "time_input_end_5i"
And I select "PM" from "time_input_end_7i"
And I fill in "Description" with "Studying defense against the dark arts"
And I select "Study" from "payform_item[category_id]"
And I press "Create"
Expand Down Expand Up @@ -56,7 +61,7 @@ Feature: payform
Then I should see "Payform item deleted"
And I should have 1 payform_item
And that payform_item should be inactive

@passed
Scenario: Submit a payform
Given I have the following payform items
| category | user_login | hours | description | date |
Expand Down
2 changes: 1 addition & 1 deletion features/settings_general.feature
Expand Up @@ -7,7 +7,7 @@ Feature: Settings

Background:
Given I am "Albus Dumbledore"

@passed
Scenario: Department settings should be created when a new department is created
# Given the user "Albus Dumbledore" is a superuser
And I am on the list of departments
Expand Down
74 changes: 37 additions & 37 deletions features/shift_admin.feature
Expand Up @@ -6,48 +6,48 @@ Feature: Shift admin manages shifts
Scenario: Create a shift with power sign up
Given I am logged into CAS as "ad12"
And I am on the homepage
And I follow "Shifts"
Then I should see "Power sign up"
When I follow "Power sign up"
And I follow "Shifts"
Then I should see "Power sign up"
When I follow "Power sign up"
And I select "2010" from "shift_start_1i"
And I select "January" from "shift_start_2i"
And I select "18" from "shift_start_3i"
And I select "09" from "shift_start_4i"
And I select "00" from "shift_start_5i"
And I select "2010" from "shift_end_1i"
And I select "January" from "shift_end_2i"
And I select "18" from "shift_end_3i"
And I select "12" from "shift_end_4i"
And I select "00" from "shift_end_5i"
And I select "Harry Potter" from "shift_user_id"
And I select "Diagon Alley" from "shift_location_id"
When I press "Submit"
Then I should see "Successfully created shift."
And I select "January" from "shift_start_2i"
And I select "18" from "shift_start_3i"
And I select "09" from "shift_start_4i"
And I select "00" from "shift_start_5i"
And I select "2010" from "shift_end_1i"
And I select "January" from "shift_end_2i"
And I select "18" from "shift_end_3i"
And I select "12" from "shift_end_4i"
And I select "00" from "shift_end_5i"
And I select "Harry Potter" from "shift_user_id"
And I select "Diagon Alley" from "shift_location_id"
When I press "Submit"
Then I should see "Successfully created shift."

Scenario: Destroy a shift
Given I am logged into CAS as "ad12"
And I am on the homepage
And I follow "Shifts"
Then I should see "Power sign up"
When I follow "Power sign up"
And I follow "Shifts"
Then I should see "Power sign up"
When I follow "Power sign up"
And I select "2010" from "shift_start_1i"
And I select "January" from "shift_start_2i"
And I select "18" from "shift_start_3i"
And I select "09" from "shift_start_4i"
And I select "00" from "shift_start_5i"
And I select "2010" from "shift_end_1i"
And I select "January" from "shift_end_2i"
And I select "18" from "shift_end_3i"
And I select "12" from "shift_end_4i"
And I select "00" from "shift_end_5i"
And I select "Harry Potter" from "shift_user_id"
And I select "Diagon Alley" from "shift_location_id"
When I press "Submit"
Then I should see "Successfully created shift."
When I follow "Shifts"
And I follow "Destroy"
Then I should see "Successfully destroyed shift."

And I select "January" from "shift_start_2i"
And I select "18" from "shift_start_3i"
And I select "09" from "shift_start_4i"
And I select "00" from "shift_start_5i"
And I select "2010" from "shift_end_1i"
And I select "January" from "shift_end_2i"
And I select "18" from "shift_end_3i"
And I select "12" from "shift_end_4i"
And I select "00" from "shift_end_5i"
And I select "Harry Potter" from "shift_user_id"
And I select "Diagon Alley" from "shift_location_id"
When I press "Submit"
Then I should see "Successfully created shift."
When I follow "Shifts"
And I follow "Destroy"
Then I should see "Successfully destroyed shift."
@passed
Scenario Outline: See more choices when logged in as admin
Given I am logged into CAS as <user>
Given I am on the homepage
Expand All @@ -70,7 +70,7 @@ Scenarios: Logged in as normal user
|"em123"|should |"Payforms" |
|"em123"|should not |"Departments"|
|"em123"|should not |"Users" |

@passed
Scenario Outline: See control panel on certain pages depending on how logged in
Given I am logged into CAS as <user>
Given I am on the homepage
Expand Down

0 comments on commit 74a6432

Please sign in to comment.