-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathINPUT_SCHEMA.json
97 lines (97 loc) · 5.03 KB
/
INPUT_SCHEMA.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{
"title": "Input schema for the apify_project actor.",
"type": "object",
"schemaVersion": 1,
"properties": {
"testSpec": {
"title": "Test spec",
"type": "string",
"description": "Write your tests here like you would in a .spec jasmine file. Refer to the README for matchers information",
"prefill": "({ it, xit, moment, _, run, expect, expectAsync, input, describe }) => {\n (input.resource ? [\n 'beta',\n ] : [\n 'latest',\n ]).forEach((build) => {\n describe(`${build} version`, () => {\n it('test something-task', async () => {\n const runResult = await run({\n taskId: '',\n });\n\n await expectAsync(runResult).toHaveStatus('SUCCEEDED');\n await expectAsync(runResult).withLog((log) => {\n expect(log)\n .withContext(runResult.format('ReferenceError'))\n .not.toContain('ReferenceError');\n expect(log)\n .withContext(runResult.format('TypeError'))\n .not.toContain('TypeError');\n });\n\n await expectAsync(runResult).withStatistics((stats) => {\n expect(stats.requestsRetries)\n .withContext(runResult.format('Request retries'))\n .toBeLessThan(3);\n\n expect(stats.crawlerRuntimeMillis)\n .withContext(runResult.format('Run time'))\n .toBeWithinRange(0.1 * 60000, 10 * 60000);\n });\n\n await expectAsync(runResult).withDataset(({ dataset, info }) => {\n expect(info.cleanItemCount)\n .withContext(runResult.format('Dataset cleanItemCount'))\n .toBeGreaterThan(0);\n\n expect(dataset.items)\n .withContext(runResult.format('Dataset items array'))\n .toBeNonEmptyArray();\n });\n });\n });\n });\n}",
"editor": "javascript"
},
"testName": {
"title": "Test Name",
"description": "Pick a descriptive name for this test suite. Otherwise the task name will be used",
"default": "",
"type": "string",
"editor": "textfield"
},
"defaultTimeout": {
"title": "Default timeout",
"description": "Changes the default timeout for each individual test, in milliseconds. Defaults to 5 minutes",
"default": 1200000,
"type": "integer",
"editor": "number"
},
"verboseLogs": {
"title": "Verbose Log",
"description": "Print progress information",
"type": "boolean",
"default": true,
"editor": "checkbox"
},
"abortRuns": {
"title": "Abort runs",
"type": "boolean",
"default": true,
"description": "Aborts the underlying actor runs upon aborting this actor as well",
"editor": "checkbox"
},
"customData": {
"title": "Custom data",
"description": "Anything you may want to access through input.customData inside tests",
"default": {},
"type": "object",
"editor": "json"
},
"filter": {
"title": "Filter tests",
"description": "You can filter tests providing their names here",
"type": "array",
"default": [],
"editor": "stringList"
},
"email": {
"title": "Email notification",
"description": "Receive failing tests on the provided email",
"type": "string",
"default": "",
"editor": "textfield"
},
"slackToken": {
"title": "Slack token",
"description": "Slack token",
"type": "string",
"editor": "textfield"
},
"retryFailedTests": {
"title": "Retry failed tests",
"description": "Retry failed tests one more time",
"editor": "checkbox",
"default": false,
"type": "boolean"
},
"slackChannel": {
"title": "Slack channel",
"description": "Slack channel",
"prefill": "#public-actors-tests-notifications",
"type": "string",
"editor": "textfield"
},
"slackPrefix": {
"title": "Slack prefix",
"description": "This string will be prepended to all slack messages",
"prefill": "@lead-dev @actor-owner",
"type": "string",
"editor": "textfield"
},
"token": {
"title": "Token",
"description": "Optional account token",
"type": "string",
"editor": "textfield"
}
},
"required": []
}