Skip to content

Commit

Permalink
Merge pull request #1639 from MeghaMaledar/release-1.3.0-ES
Browse files Browse the repository at this point in the history
MOSIP-35937 L2-Negative Test cases
  • Loading branch information
mohanachandran-s authored Oct 15, 2024
2 parents 9331588 + 558d67e commit 541bfea
Show file tree
Hide file tree
Showing 11 changed files with 1,295 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -618,4 +618,31 @@ AddIdentity:
}'
output: '{
"status":"ACTIVATED"
}'

ESignet_AddIdentity_L2_Valid_Parameters_smoke_Neg_Pos:
endPoint: /idrepository/v1/identity/
role: idrepo
restMethod: post
inputTemplate: esignet/AddIdentity/addIdentity_$LANGNUMBER$
outputTemplate: esignet/AddIdentity/addIdentityResult
input: '{
"value": "$BIOVALUE$",
"id": "mosip.id.create",
"registrationId": "$RID$",
"biometricReferenceId": "23452353",
"UIN": "$UIN$",
"dateOfBirth": "1992/04/15",
"postalCode": "14022",
"email": "[email protected]",
"phone": "9876543210",
"referenceIdentityNumber": "6789545678878",
"version": "v1",
"introducerRID": "212124324784879",
"introducerUIN": "212124324784879",
"category": "individualBiometrics",
"requesttime": "$TIMESTAMP$"
}'
output: '{
"status":"ACTIVATED"
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"encodedHash": "{{encodedHash}}",
"requestTime": "{{requestTime}}",
"request": {
"transactionId": "{{transactionId}}",
"individualId": "{{individualId}}",
"challengeList" : [
{
"authFactorType" : "{{authFactorType}}",
"challenge" : "{{challenge}}",
"format": "alpha-numeric"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
AuthenticateUserV3NegTC:
ESignet_AuthenticateUserNegTC_V3_AuthToken_Xsrf__uin_Otp_Valid_Smoke:
endPoint: /v1/esignet/authorization/v3/authenticate
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/AuthenticateUserV3NegTC/AuthenticateUserNegTC
outputTemplate: esignet/AuthenticateUserV3/AuthenticateUserResult
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_V3_Neg_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_V3_Neg_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_transactionId$",
"individualId": "$ID:AddIdentity_L2_Valid_Parameters_smoke_Neg_Pos_UIN$",
"authFactorType" : "OTP",
"challenge" : "$ID:AddIdentity_L2_Valid_Parameters_smoke_Neg_Pos_EMAIL$",
"sendOtp":{
"encodedHash": "$ID:OAuthDetailsRequest_V3_Neg_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_V3_Neg_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_transactionId$",
"individualId": "$ID:AddIdentity_L2_Valid_Parameters_smoke_Neg_Pos_UIN$",
"otpChannels": [{channel: "email"},{channel: "phone"}],
"sendOtpReqTemplate": "esignet/SendOtp/SendOtp",
"sendOtpEndPoint": "/v1/esignet/authorization/send-otp"
}
}'
output: '{
"sendOtpResp":{
"maskedMobile": "$IGNORE$",
"sendOtpResTemplate":"esignet/SendOtp/SendOtpResult",
"maskedEmail": "$IGNORE$"
}
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"encodedHash": "{{encodedHash}}",
"transactionId": "{{transactionId}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
ClaimDetailsNegTC:
ESignet_ClaimDetailsNegTC_Invalid_EncodedHash:
endPoint: /v1/esignet/authorization/claim-details
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/ClaimDetailsNegTC/ClaimDetailsNegTC
outputTemplate: esignet/error
input: '{
"encodedHash": "ggfhjkhgyydiytf",
"transactionId": "$ID:OAuthDetailsRequest_V3_Neg_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_transactionId$"
}'
output: '{
"errors": [
{
"errorCode": "invalid_transaction",
"errorMessage": "invalid_transaction"
}
]
}'

ESignet_ClaimDetailsNegTC_Null_EncodedHash:
endPoint: /v1/esignet/authorization/claim-details
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/ClaimDetailsNegTC/ClaimDetailsNegTC
outputTemplate: esignet/error
input: '{
"encodedHash": null,
"transactionId": "$ID:OAuthDetailsRequest_V3_Neg_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_transactionId$"
}'
output: '{
"errors": [
{
"errorCode": "invalid_transaction",
"errorMessage": "invalid_transaction"
}
]
}'

ESignet_ClaimDetailsNegTC_Empty_EncodedHash:
endPoint: /v1/esignet/authorization/claim-details
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/ClaimDetailsNegTC/ClaimDetailsNegTC
outputTemplate: esignet/error
input: '{
"encodedHash": "",
"transactionId": "$ID:OAuthDetailsRequest_V3_Neg_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_transactionId$"
}'
output: '{
"errors": [
{
"errorCode": "invalid_transaction",
"errorMessage": "invalid_transaction"
}
]
}'

ESignet_ClaimDetailsNegTC_Space_Val_EncodedHash:
endPoint: /v1/esignet/authorization/claim-details
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/ClaimDetailsNegTC/ClaimDetailsNegTC
outputTemplate: esignet/error
input: '{
"encodedHash": " ",
"transactionId": "$ID:OAuthDetailsRequest_V3_Neg_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_transactionId$"
}'
output: '{
"errors": [
{
"errorCode": "invalid_transaction",
"errorMessage": "invalid_transaction"
}
]
}'

ESignet_ClaimDetailsNegTC_Missing_EncodedHash:
endPoint: /v1/esignet/authorization/claim-details
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/ClaimDetailsNegTC/ClaimDetailsNegTC
outputTemplate: esignet/error
input: '{
"encodedHash": "$REMOVE$",
"transactionId": "$ID:OAuthDetailsRequest_V3_Neg_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_transactionId$"
}'
output: '{
"errors": [
{
"errorCode": "invalid_transaction",
"errorMessage": "invalid_transaction"
}
]
}'

ESignet_ClaimDetailsNegTC_invalid_TransactionId:
endPoint: /v1/esignet/authorization/claim-details
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/ClaimDetailsNegTC/ClaimDetailsNegTC
outputTemplate: esignet/error
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_V3_Neg_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_encodedResp$",
"transactionId": "aojoidncpoailf"
}'
output: '{
"errors": [
{
"errorCode": "invalid_transaction",
"errorMessage": "invalid_transaction"
}
]
}'

ESignet_ClaimDetailsNegTC_Null_Val_TransactionId:
endPoint: /v1/esignet/authorization/claim-details
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/ClaimDetailsNegTC/ClaimDetailsNegTC
outputTemplate: esignet/error
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_V3_Neg_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_encodedResp$",
"transactionId": null
}'
output: '{
"errors": [
{
"errorCode": "invalid_transaction",
"errorMessage": "invalid_transaction"
}
]
}'

ESignet_ClaimDetailsNegTC_Empty_TransactionId:
endPoint: /v1/esignet/authorization/claim-details
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/ClaimDetailsNegTC/ClaimDetailsNegTC
outputTemplate: esignet/error
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_V3_Neg_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_encodedResp$",
"transactionId": ""
}'
output: '{
"errors": [
{
"errorCode": "invalid_transaction",
"errorMessage": "invalid_transaction"
}
]
}'

ESignet_ClaimDetailsNegTC_Space_Val_TransactionId:
endPoint: /v1/esignet/authorization/claim-details
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/ClaimDetailsNegTC/ClaimDetailsNegTC
outputTemplate: esignet/error
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_V3_Neg_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_encodedResp$",
"transactionId": " "
}'
output: '{
"errors": [
{
"errorCode": "invalid_transaction",
"errorMessage": "invalid_transaction"
}
]
}'

ESignet_ClaimDetailsNegTC_Missing_TransactionId:
endPoint: /v1/esignet/authorization/claim-details
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/ClaimDetailsNegTC/ClaimDetailsNegTC
outputTemplate: esignet/error
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_V3_Neg_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_encodedResp$",
"transactionId": "$REMOVE$"
}'
output: '{
"errors": [
{
"errorCode": "invalid_transaction",
"errorMessage": "invalid_transaction"
}
]
}'
ESignet_ClaimDetailsNegTC_AuthToken_Xsrf_uin_Valid_Smoke:
endPoint: /v1/esignet/authorization/claim-details
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/ClaimDetailsNegTC/ClaimDetailsNegTC
outputTemplate: esignet/ClaimDetailsNegTC/ClaimDetailsResultNegTC
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_V3_Neg_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_encodedResp$",
"transactionId": "$ID:OAuthDetailsRequest_V3_Neg_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_transactionId$"
}'
output: '{
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"requestTime": "{{requestTime}}",
"request": {
"clientId": "{{clientId}}",
"scope": "{{scope}}",
"responseType": "{{responseType}}",
"redirectUri": "{{redirectUri}}",
"display": "{{display}}",
"prompt": "{{prompt}}",
"acrValues": "{{acrValues}}",
"claims": {
"userinfo": {
"name": {
"essential": false
},
"phone_number": {
"essential": true
},
"verified_claims": [
{
"verification": {
"trust_framework": {"value": "{{trust_framework}}"}
},
"claims": {
"email": {
"essential": true
}
}
}
]
},
"id_token": {}
},
"nonce" : "{{nonce}}",
"state" : "{{state}}",
"claimsLocales" : "{{claimsLocales}}",
"uiLocales" : "{{uiLocales}}"
}
}
Loading

0 comments on commit 541bfea

Please sign in to comment.