Hey all,
Hey all,
I am trying to publish an actor, but it fails through the automatic tests.
My actor expects a VAT number, and it must be valid. If it is invalid I return the 'Actor.exit()' in my code.
The automatic tests however doesn't add the VAT number and fails.
I do want the automatic tests to run, but I don't know how I can set the VAT number for the automated tests.
Currently my input_scheme.json looks something like this:
{
"title": "Input schema for Actor VIES VAT number validation",
"type": "object",
"schemaVersion": 1,
"properties": {
"country": {
"title": "Country",
"type": "string"
~
],
"enumTitles": [
"Austria",
"Belgium",
~
]
},
"vatNumber": {
"title": "VAT number",
"type": "string",
"description": "The VAT number of that specific country.",
"editor": "textfield",
"example": "NL854897276B01"
}
},
"required": [ "vatNumber" ]
}
Does anyone know how I can specify the input for the test automation? I don't want to add the "default" property to my vatNumber as I want the user always to input their own value.
7 Replies
foreign-sapphire•2mo ago
use prefill: https://docs.apify.com/platform/actors/development/actor-definition/input-schema/specification/v1#fields
Specification | Platform | Apify Documentation
Learn how to define and validate a schema for your Actor's input with code examples. Provide an autogenerated input UI for your Actor's users.
sunny-green•2mo ago
Great, I'll try that.
But it seems that this prefills the data into the actors, also of the users (not only the test automation).
That is fine for this Actor that I am creating.
But I am also creating an Actor that has an API key as input, I don't want users to see that API key. Is there then another way in stead of using prefill?
foreign-sapphire•2mo ago
For API key one, you can ask our support to remove the automation tests.
The form for this comes in the email which says actor is failing tests
sunny-green•2mo ago
So there isn't a way to do this automatically. I will add the request.
Where can I add this as feature request?
foreign-sapphire•2mo ago
Well for now we have decided to have a layer of checking before removing the automated tests from the Actors. As we want uninterrupted usage for our users.
In future we may give developers a button to do it directly but for now you have to make a request.
sunny-green•2mo ago
Sounds like you have done some good thinking here. Thank you for the info.
@Dennis Rosenbaum just advanced to level 1! Thanks for your contributions! 🎉