Skip to content

Commit

Permalink
Fix a slash inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenfuqua committed Jul 23, 2024
1 parent eb88e27 commit 8bcdc8e
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ Feature: Reject client requests for abstract entities

#@ignore
Scenario: 01 Ensure that clients cannot POST an abstract entity (Education Organizations)
When a POST request is made to "/ed-fi/educationOrganizations" with
When a POST request is made to "ed-fi/educationOrganizations" with
"""
"""
Then it should respond with 404

#@ignore
Scenario: 02 Ensure that clients cannot POST an abstract entity (General Student Program Association)
When a POST request is made to "/ed-fi/generalStudentProgramAssociations" with
When a POST request is made to "ed-fi/generalStudentProgramAssociations" with
"""
"""
Then it should respond with 404

#@ignore
Scenario: 03 Ensure that clients cannot GET an abstract entity (Education Organizations)
When a GET request is made to "/ed-fi/educationOrganizations"
When a GET request is made to "ed-fi/educationOrganizations"
Then it should respond with 404

#@ignore
Scenario: 04 Ensure that clients cannot GET an abstract entity (Student Program Association)
When a GET request is made to "/ed-fi/generalStudentProgramAssociations"
When a GET request is made to "ed-fi/generalStudentProgramAssociations"
Then it should respond with 404
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Feature: School Year Reference Validation
| "451" | { "schoolId": 535 } | { "schoolYear": 2029 } | uri://ed-fi.org/CalendarTypeDescriptor#Student Specific | [] |

Scenario: 01 Try creating a resource using a valid school year
When a POST request is made to "/ed-fi/calendars" with
When a POST request is made to "ed-fi/calendars" with
"""
{
"calendarCode": "321",
Expand All @@ -37,7 +37,7 @@ Feature: School Year Reference Validation
Then it should respond with 200 or 201

Scenario: 02 Try creating a resource using an invalid school year
When a POST request is made to "/ed-fi/calendars" with
When a POST request is made to "ed-fi/calendars" with
"""
{
"calendarCode": "325",
Expand All @@ -64,7 +64,7 @@ Feature: School Year Reference Validation
"""

Scenario: 03 Try creating a CalendarDate using a valid Calendar reference
When a POST request is made to "/ed-fi/calendarDates" with
When a POST request is made to "ed-fi/calendarDates" with
"""
{
"calendarReference": {
Expand All @@ -83,7 +83,7 @@ Feature: School Year Reference Validation
Then it should respond with 201

Scenario: 04 Try creating a CalendarDate using an invalid Calendar reference with an invalid School year
When a POST request is made to "/ed-fi/calendarDates" with
When a POST request is made to "ed-fi/calendarDates" with
"""
{
"calendarReference": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Feature: Validation of DELETE requests that would cause a foreign key violation
}
"""

#@ignore
@ignore
Scenario: 05 Ensure clients cannot delete a resource that is used by another items
Given a POST request is made to "ed-fi/programs" with
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Paging Support for GET requests for Ed-Fi Resources
| 5 | School 5 | [ {"gradeLevelDescriptor": "uri://ed-fi.org/GradeLevelDescriptor#Postsecondary"} ] | [ {"educationOrganizationCategoryDescriptor": "uri://tpdm.ed-fi.org/EducationOrganizationCategoryDescriptor#Educator Preparation Provider"} ] |

Scenario: 01 Ensure clients can get information when filtering by limit and and a valid offset
When a GET request is made to "/ed-fi/schools?offset=3&limit=5"
When a GET request is made to "ed-fi/schools?offset=3&limit=5"
Then it should respond with 200
And the response body is
"""
Expand Down Expand Up @@ -49,15 +49,15 @@ Feature: Paging Support for GET requests for Ed-Fi Resources
"""

Scenario: 02 Ensure clients can get information when filtering by limit and offset greater than the total
When a GET request is made to "/ed-fi/schools?offset=6&limit=5"
When a GET request is made to "ed-fi/schools?offset=6&limit=5"
Then it should respond with 200
And the response body is
"""
[]
"""

Scenario: 03 Ensure clients can GET information when querying using an offset without providing any limit in the query string
When a GET request is made to "/ed-fi/schools?offset=4"
When a GET request is made to "ed-fi/schools?offset=4"
Then it should respond with 200
And the response body is
"""
Expand All @@ -83,7 +83,7 @@ Feature: Paging Support for GET requests for Ed-Fi Resources
# TODO GET by parameters
@ignore
Scenario: 04 Ensure clients can GET information when filtering with limits and properties
When a GET request is made to "/ed-fi/schools?nameOfInstitution=School+5&limit=2"
When a GET request is made to "ed-fi/schools?nameOfInstitution=School+5&limit=2"
Then it should respond with 200
And the response body is
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,71 +1,71 @@
Feature: Query Strings handling for GET requests

Rule: Testing without data
Background:
Given there are no schools
Background:
Given there are no schools

Scenario: 01 Validate totalCount value when there are no existing schools in the Database
When a GET request is made to "/ed-fi/schools?totalCount=true"
When a GET request is made to "ed-fi/schools?totalCount=true"
Then it should respond with 200
And the response headers includes total-count 0

Scenario: 02 Validate totalCount is not included when there are no existing schools in the Database and value equals to false
When a GET request is made to "/ed-fi/schools?totalCount=false"
When a GET request is made to "ed-fi/schools?totalCount=false"
Then it should respond with 200
And the response headers does not include total-count

Scenario: 03 Validate totalCount is not included when is not included in the URL
When a GET request is made to "/ed-fi/schools"
When a GET request is made to "ed-fi/schools"
Then it should respond with 200
And the response headers does not include total-count

Rule: Thesting with data upload
Background:
Given the system has these "schools"
| schoolId | nameOfInstitution | gradeLevels | educationOrganizationCategories |
| 5 | School with max edorgId value | [ {"gradeLevelDescriptor": "uri://ed-fi.org/GradeLevelDescriptor#Tenth grade"} ] | [ {"educationOrganizationCategoryDescriptor": "uri://tpdm.ed-fi.org/EducationOrganizationCategoryDescriptor#School"} ] |
| 6 | UT Austin College of Education Under Graduate | [ {"gradeLevelDescriptor": "uri://ed-fi.org/GradeLevelDescriptor#Eleventh grade"} ] | [ {"educationOrganizationCategoryDescriptor": "uri://tpdm.ed-fi.org/EducationOrganizationCategoryDescriptor#School"} ] |
| 255901001 | Grand Bend High School | [ {"gradeLevelDescriptor": "uri://ed-fi.org/GradeLevelDescriptor#Tenth grade"} ] | [ {"educationOrganizationCategoryDescriptor": "uri://tpdm.ed-fi.org/EducationOrganizationCategoryDescriptor#School"} ] |
| 255901044 | Grand Bend Middle School | [ {"gradeLevelDescriptor": "uri://ed-fi.org/GradeLevelDescriptor#Ninth grade"} ] | [ {"educationOrganizationCategoryDescriptor": "uri://tpdm.ed-fi.org/EducationOrganizationCategoryDescriptor#School"} ] |
| 255901045 | UT Austin Extended Campus | [ {"gradeLevelDescriptor": "uri://ed-fi.org/GradeLevelDescriptor#Twelfth grade"} ] | [ {"educationOrganizationCategoryDescriptor": "uri://tpdm.ed-fi.org/EducationOrganizationCategoryDescriptor#School"} ] |

Scenario: 04 Ensure that schools return the total count
When a GET request is made to "/ed-fi/schools?totalCount=true"
Rule: Testing with data upload
Background:
Given the system has these "schools"
| schoolId | nameOfInstitution | gradeLevels | educationOrganizationCategories |
| 5 | School with max edorgId value | [ {"gradeLevelDescriptor": "uri://ed-fi.org/GradeLevelDescriptor#Tenth grade"} ] | [ {"educationOrganizationCategoryDescriptor": "uri://tpdm.ed-fi.org/EducationOrganizationCategoryDescriptor#School"} ] |
| 6 | UT Austin College of Education Under Graduate | [ {"gradeLevelDescriptor": "uri://ed-fi.org/GradeLevelDescriptor#Eleventh grade"} ] | [ {"educationOrganizationCategoryDescriptor": "uri://tpdm.ed-fi.org/EducationOrganizationCategoryDescriptor#School"} ] |
| 255901001 | Grand Bend High School | [ {"gradeLevelDescriptor": "uri://ed-fi.org/GradeLevelDescriptor#Tenth grade"} ] | [ {"educationOrganizationCategoryDescriptor": "uri://tpdm.ed-fi.org/EducationOrganizationCategoryDescriptor#School"} ] |
| 255901044 | Grand Bend Middle School | [ {"gradeLevelDescriptor": "uri://ed-fi.org/GradeLevelDescriptor#Ninth grade"} ] | [ {"educationOrganizationCategoryDescriptor": "uri://tpdm.ed-fi.org/EducationOrganizationCategoryDescriptor#School"} ] |
| 255901045 | UT Austin Extended Campus | [ {"gradeLevelDescriptor": "uri://ed-fi.org/GradeLevelDescriptor#Twelfth grade"} ] | [ {"educationOrganizationCategoryDescriptor": "uri://tpdm.ed-fi.org/EducationOrganizationCategoryDescriptor#School"} ] |

Scenario: 04 Ensure that schools return the total count
When a GET request is made to "ed-fi/schools?totalCount=true"
Then it should respond with 200
And the response headers includes total-count 5

Scenario: 05 Validate totalCount Header is not included when equals to false
When a GET request is made to "/ed-fi/schools?totalCount=false"
When a GET request is made to "ed-fi/schools?totalCount=false"
Then it should respond with 200
And the response headers does not include total-count

Scenario: 06 Validate totalCount is not included when it is not present in the URL
When a GET request is made to "/ed-fi/schools"
When a GET request is made to "ed-fi/schools"
Then it should respond with 200
And the response headers does not include total-count

Scenario: 07 Ensure results can be limited and totalCount matches the actual number of existing records
When a GET request is made to "/ed-fi/schools?totalCount=true&limit=2"
When a GET request is made to "ed-fi/schools?totalCount=true&limit=2"
Then getting less schools than the total-count
And the response headers includes total-count 5

Scenario: 08 Ensure clients can get information when filtering by limit and and a valid offset
When a GET request is made to "/ed-fi/schools?offset=3&limit=5"
When a GET request is made to "ed-fi/schools?offset=3&limit=5"
Then it should respond with 200
And schools returned
| schoolId | nameOfInstitution |
| 255901044 | Grand Bend Middle School |
| 255901045 | UT Austin Extended Campus |
| schoolId | nameOfInstitution |
| 255901044 | Grand Bend Middle School |
| 255901045 | UT Austin Extended Campus |

Scenario: 09 Ensure clients can get information when filtering by limit and offset greater than the total
When a GET request is made to "/ed-fi/schools?offset=6&limit=5"
When a GET request is made to "ed-fi/schools?offset=6&limit=5"
Then it should respond with 200
And the response body is
"""
[]
"""
Scenario: 10 Ensure clients can't GET information when filtering using invalid values
When a GET request is made to "/ed-fi/schools?limit=-1" using values as
When a GET request is made to "ed-fi/schools?limit=-1" using values as
| Values |
| -1 |
| 'zero' |
Expand All @@ -89,7 +89,7 @@ Feature: Query Strings handling for GET requests
"""

Scenario: 11 Ensure clients can not GET information when filtering by limit and offset using invalid values
When a GET request is made to "/ed-fi/schools?offset=-1" using values as
When a GET request is made to "ed-fi/schools?offset=-1" using values as
| Values |
| -1 |
| 'zero' |
Expand Down Expand Up @@ -120,7 +120,7 @@ Feature: Query Strings handling for GET requests
Given the following schools exist
| schoolId | nameOfInstitution | gradeLevels | educationOrganizationCategories |
| 5 | School with max edorgId value | [ "Postsecondary" ] | [ "School" ] |
When a GET request is made to "/ed-fi/schools?nameOfInstitution=school+with+max+edorgid+value"
When a GET request is made to "ed-fi/schools?nameOfInstitution=school+with+max+edorgid+value"
Then it should respond with 200
And the response body includes "nameOfInstitution: School with max edorgId value"

Expand All @@ -129,7 +129,7 @@ Feature: Query Strings handling for GET requests
Given the following schools exist
| schoolId | nameOfInstitution | gradeLevels | educationOrganizationCategories |
| 6 | UT Austin College of Education Under Graduate | [ "Postsecondary" ] | [ "Educator Preparation Provider" ] |
When a GET request is made to "/ed-fi/schools?nameOfInstitution=UT+AUSTIN+COLLEGE+OF+EDUCATION+UNDER+GRADUATE"
When a GET request is made to "ed-fi/schools?nameOfInstitution=UT+AUSTIN+COLLEGE+OF+EDUCATION+UNDER+GRADUATE"
Then it should respond with 200
And the response body includes "nameOfInstitution: UT Austin College of Education Under Graduate"

Expand All @@ -138,21 +138,21 @@ Feature: Query Strings handling for GET requests
Given the following schools exist
| schoolId | nameOfInstitution | gradeLevels | educationOrganizationCategories |
| 6 | UT Austin College of Education Under Graduate | [ "Postsecondary" ] | [ "Educator Preparation Provider" ] |
When a GET request is made to "/ed-fi/schools?nameOfInstitution=nonExisting+school"
When a GET request is made to "ed-fi/schools?nameOfInstitution=nonExisting+school"
Then it should respond with 200
And the response body is
"""
[]
"""

##I need a few more details on this scenario
@ignore
Scenario: 15 Ensure clients can't GET information when querying with filter and offset using limit without offset
Given the following schools exist
| schoolId | nameOfInstitution |
| 5 | School with max edorgId value |
| 6 | UT Austin College of Education Under Graduate |
When a GET request is made to "/ed-fi/schools?limit=-6&offset=-1"
When a GET request is made to "ed-fi/schools?limit=-6&offset=-1"
Then it should respond with 400
And the response body is
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Feature: Resources "Create" Operation validations
And the response headers includes
"""
{
"location": "/ed-fi/absenceEventCategoryDescriptors/{id}"
"location": "ed-fi/absenceEventCategoryDescriptors/{id}"
}
"""
And the record can be retrieved with a GET request
Expand Down Expand Up @@ -787,7 +787,7 @@ Feature: Resources "Create" Operation validations
And the response headers includes
"""
{
"location": "/ed-fi/schools/{id}"
"location": "ed-fi/schools/{id}"
}
"""
And the record can be retrieved with a GET request
Expand Down
Loading

0 comments on commit 8bcdc8e

Please sign in to comment.