Skip to content

Commit

Permalink
move datatables stuff to new file
Browse files Browse the repository at this point in the history
  • Loading branch information
cycomachead committed May 10, 2024
1 parent c4ad7f5 commit 163e2a9
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ jobs:
run: |
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
$CCTR sum-coverage coverage/codeclimate.*.json
$CCTR upload-coverage --id "$CC_TEST_REPORTER_ID"
$CCTR upload-coverage --id "${{ secrets.CC_TEST_REPORTER_ID }}"
44 changes: 0 additions & 44 deletions features/admin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -147,26 +147,6 @@ Feature: basic admin functionality
And I press "Update"
Then I should not have sent out any emails

Scenario: Updating application status persists changes in database
Given the following schools exist:
| name | country | city | state | website | grade_level | school_type |
| UC Berkeley | US | Berkeley | CA | https://www.berkeley.edu | university | public |
Given the following teachers exist:
| first_name | last_name | admin | email | school | snap | application_status |
| Bobby | John | false | testteacher@berkeley.edu | UC Berkeley | bobby | denied |
Given I am on the BJC home page
And I have an admin email
And I follow "Log In"
Then I can log in with Google
When I go to the teachers page
And I go to the edit page for Bobby John
And I set my application status as "Validated"
And I press "Update"
Then I see a confirmation "Saved"
When I go to the teachers page
And I check "Validated"
Then I should see "Bobby John"

Scenario: Deny teacher as an admin
Given the following schools exist:
| name | country | city | state | website | grade_level | school_type |
Expand Down Expand Up @@ -199,30 +179,6 @@ Feature: basic admin functionality
When I go to the edit page for Joseph Mamoa
Then should see "You need to log in to access this."

Scenario: Filter all teacher info as an admin
Given the following schools exist:
| name | country | city | state | website | grade_level | school_type |
| UC Berkeley | US | Berkeley | CA | https://www.berkeley.edu | university | public |
Given the following teachers exist:
| first_name | last_name | admin | email | school | application_status |
| Victor | Validateme | false | testteacher1@berkeley.edu | UC Berkeley | Validated |
| Danny | Denyme | false | testteacher2@berkeley.edu | UC Berkeley | Denied |
| Peter | Pendme | false | testteacher3@berkeley.edu | UC Berkeley | Not Reviewed |
Given I am on the BJC home page
Given I have an admin email
And I follow "Log In"
Then I can log in with Google
When I go to the teachers page
And I check "Not Reviewed"
And I uncheck "Validated"
Then I should see "Peter"
Then I should not see "Victor"
Then I should not see "Danny"
And I check "Validated"
Then I should see "Peter"
Then I should see "Victor"
Then I should not see "Danny"

Scenario: View teacher info as an admin
Given the following schools exist:
| name | country | city | state | website | grade_level | school_type |
Expand Down
54 changes: 54 additions & 0 deletions features/data_tables.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Feature: Admin Data Tables functionality

As an admin
So that I can see how many people are teaching BJC
I can use interactive datatables

Background: Has an Admin in DB
Given the following teachers exist:
| first_name | last_name | admin | email |
| Admin | User | true | testadminuser@berkeley.edu |

# Scenario: Updating application status persists changes in database
# Given the following schools exist:
# | name | country | city | state | website | grade_level | school_type |
# | UC Berkeley | US | Berkeley | CA | https://www.berkeley.edu | university | public |
# Given the following teachers exist:
# | first_name | last_name | admin | email | school | snap | application_status |
# | Bobby | John | false | [email protected] | UC Berkeley | bobby | denied |
# Given I am on the BJC home page
# And I have an admin email
# And I follow "Log In"
# Then I can log in with Google
# When I go to the teachers page
# And I go to the edit page for Bobby John
# And I set my application status as "Validated"
# And I press "Update"
# Then I see a confirmation "Saved"
# When I go to the teachers page
# And I check "Validated"
# Then I should see "Bobby John"

# Scenario: Filter all teacher info as an admin
# Given the following schools exist:
# | name | country | city | state | website | grade_level | school_type |
# | UC Berkeley | US | Berkeley | CA | https://www.berkeley.edu | university | public |
# Given the following teachers exist:
# | first_name | last_name | admin | email | school | application_status |
# | Victor | Validateme | false | [email protected] | UC Berkeley | Validated |
# | Danny | Denyme | false | [email protected] | UC Berkeley | Denied |
# | Peter | Pendme | false | [email protected] | UC Berkeley | Not Reviewed |
# Given I am on the BJC home page
# Given I have an admin email
# And I follow "Log In"
# Then I can log in with Google
# When I go to the teachers page
# And I check "Not Reviewed"
# And I uncheck "Validated"
# Then I should see "Peter"
# Then I should not see "Victor"
# Then I should not see "Danny"
# And I check "Validated"
# Then I should see "Peter"
# Then I should see "Victor"
# Then I should not see "Danny"

0 comments on commit 163e2a9

Please sign in to comment.