Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isNotPermitted-Fix updated isNotPermitted errorObject #125

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cypress/fixtures/objects/errorObjects/errorContent.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,10 @@
"isNotAvailable": {
"errorMessage": ["not available"],
"errorCode": [-50300]
},
"isNotPermitted": {
"errorMessage": ["not permitted"],
"errorCode": []
}

}
5 changes: 3 additions & 2 deletions cypress/support/cypress-commands/assertion.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Cypress.Commands.add(
'validateErrorObject',
(method, expectedContent, validationType, context = CONSTANTS.NO_CONTEXT, appId, param) => {
// Function to extract the error validation objects for the passed method and parameters from the exception list.
const errorSchemaFilePath = CONSTANTS.ERROR_SCHEMA_OBJECTS_PATH;
const errorContentFilePath = CONSTANTS.ERROR_CONTENT_OBJECTS_PATH;

const fetchErrorValidationObjectForExceptionmethod = (method, param) => {
return new Promise((resolve) => {
const exceptionMethods = UTILS.getEnvVariable(CONSTANTS.EXCEPTION_METHODS);
Expand Down Expand Up @@ -73,8 +76,6 @@ Cypress.Commands.add(
errorType = CONSTANTS.NOT_SUPPORTED;
}
}
const errorSchemaFilePath = CONSTANTS.ERROR_SCHEMA_OBJECTS_PATH;
const errorContentFilePath = CONSTANTS.ERROR_CONTENT_OBJECTS_PATH;

// Extracting the error validation object from the above files based on obtained errorType.
cy.task(CONSTANTS.READFILEIFEXISTS, errorSchemaFilePath).then((errorSchema) => {
Expand Down
Loading