Skip to content

Commit

Permalink
MOSIP-33486 Prereg new APIs (#721)
Browse files Browse the repository at this point in the history
* MOSIP-33486 Prereg new APIs

Signed-off-by: NitinHegde <[email protected]>

* MOSIP-33486 Prereg new APIs

Signed-off-by: NitinHegde <[email protected]>

---------

Signed-off-by: NitinHegde <[email protected]>
  • Loading branch information
hegdenitin authored Sep 13, 2024
1 parent f6064b6 commit 07af3c2
Show file tree
Hide file tree
Showing 14 changed files with 215 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FetchAvailabilityDataByCenterID:
Prereg_FetchAvailabilityDataByCenterID_All_Valid_Smoke_sid:
endPoint: /preregistration/v1/applications/appointment/slots/availability/10003
description: Fetch the available data by center ID
role: batch
restMethod: get
inputTemplate: preReg/FetchAvailabilityData/fetchAvailabilityData
outputTemplate: preReg/FetchAvailabilityData/fetchAvailabilityDataResult
input: '{
"registrationCenterId": "10003"
}'
output: '{
"regCenterId": "10003"
}'
Prereg_FetchAvailabilityData_inValid_CenterID_Smoke_sid:
endPoint: /preregistration/v1/applications/appointment/slots/availability/{registrationCenterId}
description: Fetch the available data by invalid center ID
role: batch
restMethod: get
inputTemplate: preReg/FetchAvailabilityData/fetchAvailabilityData
outputTemplate: preReg/error
input: '{
"registrationCenterId": "@#@$W#"
}'
output: '{
"errors": [
{
"errorCode": "KER-MSD-215"
}
]
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"registrationCenterId": "{{registrationCenterId}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"response": {
"regCenterId": "{{regCenterId}}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
GetApplicationStatusByApplicationID:
Prereg_GetApplicationStatusByApplicationID_All_Valid_Smoke_sid:
endPoint: /preregistration/v1/applications/status/{applicationId}
description: Retrieve the application status by application ID
role: batch
checkErrorsOnlyInResponse: true
restMethod: get
inputTemplate: preReg/GetApplicationStatusByApplicationID/getApplicationStatusByApplicationID
outputTemplate: preReg/GetApplicationStatusByApplicationID/getApplicationStatusByApplicationIDResult
input: '{
"applicationId": "52917592714578"
}'
output: '{
"response": "Cancelled"
}'
Prereg_GetApplicationStatusByApplicationID_InValid_applicationId:
endPoint: /preregistration/v1/applications/status/{applicationId}
description: Retrieve the application status by invalid application ID
role: batch
restMethod: get
inputTemplate: preReg/GetApplicationStatusByApplicationID/getApplicationStatusByApplicationID
outputTemplate: preReg/error
input: '{
"applicationId": "erwsdhgqw5dcfbz"
}'
output: '{
"errors": [
{
"errorCode": "PRG_APP_013"
}
]
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"applicationId": "{{applicationId}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"response": "{{response}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
GetApplicationsApplicationID:
Prereg_GetApplicationsApplicationID_All_Valid_Smoke_sid:
endPoint: /preregistration/v1/applications/{applicationId}
description: Retrieve the application by application ID
role: batch
checkErrorsOnlyInResponse: true
restMethod: get
inputTemplate: preReg/GetApplicationsApplicationID/getApplicationsApplicationID
outputTemplate: preReg/GetApplicationsApplicationID/getApplicationsApplicationIDResult
input: '{
"applicationId": "52917592714578"
}'
output: '{
"applicationId": "52917592714578"
}'
Prereg_GetApplicationsApplicationID_InValid_applicationID:
endPoint: /preregistration/v1/applications/{applicationId}
description: Retrieve the application by invalid application ID
role: batch
restMethod: get
inputTemplate: preReg/GetApplicationsApplicationID/getApplicationsApplicationID
outputTemplate: preReg/error
input: '{
"applicationId": "erwsdhgqw5dcfbz"
}'
output: '{
"errors": [
{
"errorCode": "PRG_APP_013"
}
]
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"applicationId": "{{applicationId}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"response": {
"applicationId": "{{applicationId}}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
GetPreRegDemographicDataByPrid:
Prereg_GetPreRegDemographicDataByPrid_Valid_preRegistrationId:
endPoint: /preregistration/v1/applications/prereg/{preRegistrationId}
description: Retrieve the PreReg demographic data by PRID
role: batch
restMethod: get
inputTemplate: preReg/GetPreRegDemographicDataByPrid/getPreRegDemographicDataByPrid
outputTemplate: preReg/GetPreRegDemographicDataByPrid/getPreRegDemographicDataByPridResult
input: '{
"preRegistrationId": "$ID:CreatePrereg_Smoke_PreRegDemographicData_sid_preRegistrationId$"
}'
output: '{
"preRegistrationId": "$ID:CreatePrereg_Smoke_PreRegDemographicData_sid_preRegistrationId$",
"postalCode":"14022",
"dateOfBirth": "$IGNORE$",
"IDSchemaVersion": "$IGNORE$",
"phone": "$IGNORE$"
}'
Prereg_GetPreRegDemographicDataByPrid_inValid_preRegistrationId:
endPoint: /preregistration/v1/applications/prereg/info/{preRegistrationId}
description: Retrieve the PreReg demographic data by invalid PRID
role: batch
restMethod: get
inputTemplate: preReg/GetPreRegDemographicDataByPrid/getPreRegDemographicDataByPrid
outputTemplate: preReg/error
input: '{
"preRegistrationId": "123456"
}'
output: '{
"errors": [
{
"errorCode": "PRG_PAM_APP_005"
}
]
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"preRegistrationId": "{{preRegistrationId}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"response": {
"demographicDetails": {
"identity": {
"postalCode": "14022",
"dateOfBirth": "1996/01/01",
"phone": "8249742850"
}
}
}
}
21 changes: 21 additions & 0 deletions apitest/src/main/resources/preReg/createPrereg/createPrereg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -673,4 +673,25 @@ CreatePrereg:
"id": "mosip.pre-registration.demographic.create"
}'
output: '{
}'
Prereg_CreatePrereg_Smoke_PreRegDemographicData_sid:
endPoint: /preregistration/v1/applications/prereg
description: Creating preregistration appointment using PRID for demographic data
role: batch
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: preReg/createPrereg/createPrereg
outputTemplate: preReg/createPrereg/createPreregResult
input: '{
"postalCode": "14022",
"phone": "8249742850",
"email": "[email protected]",
"IDSchemaVersion": $SCHEMAVERSION$,
"dateOfBirth": "1996/01/01",
"version": "1.0",
"langCode": "$1STLANG$",
"requesttime": "$TIMESTAMP$",
"id": "mosip.pre-registration.demographic.create"
}'
output: '{
}'
29 changes: 28 additions & 1 deletion apitest/testNgXmlFiles/preregApi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -332,5 +332,32 @@
<class name="io.mosip.testrig.apirig.testscripts.SimplePost" />
</classes>
</test>

<test name="FetchAvailabilityData">
<parameter name="ymlFile"
value="preReg/FetchAvailabilityData/FetchAvailabilityData.yml" />
<classes>
<class name="io.mosip.testrig.apirig.testscripts.GetWithParam" />
</classes>
</test>
<test name="GetPreRegDemographicDataByPrid">
<parameter name="ymlFile"
value="preReg/GetPreRegDemographicDataByPrid/GetPreRegDemographicDataByPrid.yml" />
<classes>
<class name="io.mosip.testrig.apirig.testscripts.GetWithParam" />
</classes>
</test>
<test name="GetApplicationsApplicationID">
<parameter name="ymlFile"
value="preReg/GetApplicationsApplicationID/GetApplicationsApplicationID.yml" />
<classes>
<class name="io.mosip.testrig.apirig.testscripts.GetWithParam" />
</classes>
</test>
<test name="GetApplicationStatusByApplicationID">
<parameter name="ymlFile"
value="preReg/GetApplicationStatusByApplicationID/GetApplicationStatusByApplicationID.yml" />
<classes>
<class name="io.mosip.testrig.apirig.testscripts.GetWithParam" />
</classes>
</test>
</suite>

0 comments on commit 07af3c2

Please sign in to comment.