-
Notifications
You must be signed in to change notification settings - Fork 18
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
test: add tests focusing on workflow run outputs, document and facial similarity reports #109
Conversation
4da382d
to
2963f9b
Compare
workflow_version_id: expect.anything(), | ||
dashboard_url: expect.anything(), | ||
status: expect.anything(), | ||
output: expect.anything(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be worth it validating output
field to be sure it's accessible even if not defined in detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran these tests locally, and they're returning null
in the output. Is that expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We haven't validated enough this output field yet, but the goal of improving these tests over was also to be sure that what is returned in output field, even if can't be mapped to a precise schema, it can be accessible.
Therefore probably workflow run should be improved to have some data in this field so that we can see such data can be accessed using client library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Studio clients can define output
to be whatever they want (a string, an object, etc). In my latest changes, I've added validations for output
containing:
- the outcome of a profile data capture task
- the result of a document report and a facial similarity report
b71f344
to
c9e777a
Compare
14f7dcd
to
fe1ddac
Compare
fe1ddac
to
8dcc748
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🙇
@@ -43,10 +43,11 @@ | |||
"devDependencies": { | |||
"@faker-js/faker": "^8.4.1", | |||
"@types/jest": "^26.0.15", | |||
"@types/node": "^12.11.5", | |||
"dotenv": "^16.4.5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine adding that this way for now. I've created PR#69 to not forget about this change.
Add tests for workflow run outputs.
The
output
field of workflow runs is configured within Studio workflow builder and can yield anything the client configures.The tests added validate there are no schema errors when the output is configured to be the result of a Profile Data Capture task, of a Document Report and of a Facial Similarity Photo Report.
I've also added tests validating the outcome of Document and Facial Similarity reports.