Skip to content

Commit

Permalink
test: add queue list test
Browse files Browse the repository at this point in the history
  • Loading branch information
ismay committed Nov 16, 2023
1 parent 8e37dd8 commit b666038
Show file tree
Hide file tree
Showing 22 changed files with 412 additions and 286 deletions.
27 changes: 27 additions & 0 deletions cypress/fixtures/list/a-queue.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[
{
"name": "Queue",
"type": "Sequence",
"cronExpression": "0 0 3 ? * MON",
"nextExecutionTime": "2023-11-20T03:00:00.000",
"status": "SCHEDULED",
"enabled": true,
"configurable": true,
"sequence": [
{
"id": "uvUPBToQHD9",
"name": "Job 1",
"type": "DATA_INTEGRITY",
"cronExpression": "0 0 3 ? * MON",
"nextExecutionTime": "2023-11-20T03:00:00.000",
"status": "SCHEDULED"
},
{
"id": "PPgVeqiSXpz",
"name": "Job 2",
"type": "DISABLE_INACTIVE_USERS",
"status": "SCHEDULED"
}
]
}
]
35 changes: 35 additions & 0 deletions cypress/fixtures/network/41/queues_should_be_listed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[
{
"path": "/api/41/systemSettings/helpPageLink",
"featureName": "Queues should be listed",
"static": false,
"count": 1,
"nonDeterministic": false,
"method": "GET",
"requestBody": "",
"requestHeaders": {
"host": "debug.dhis2.org",
"connection": "keep-alive",
"accept": "application/json",
"origin": "http://localhost:3000",
"sec-fetch-site": "cross-site",
"sec-fetch-mode": "cors"
},
"statusCode": 200,
"responseBody": "{\"helpPageLink\":\"https://dhis2.github.io/dhis2-docs/master/en/user/html/dhis2_user_manual_en.html\"}",
"responseSize": 99,
"responseHeaders": {
"server": "nginx/1.23.0",
"content-type": "application/json;charset=UTF-8",
"transfer-encoding": "chunked",
"connection": "keep-alive",
"access-control-allow-credentials": "true",
"access-control-allow-origin": "http://localhost:3000",
"vary": "Origin",
"access-control-expose-headers": "ETag, Location",
"cache-control": "no-cache, private",
"x-content-type-options": "nosniff",
"x-xss-protection": "1; mode=block"
}
}
]
243 changes: 123 additions & 120 deletions cypress/fixtures/network/41/static_resources.json

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions cypress/fixtures/network/41/summary.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"count": 951,
"totalResponseSize": 1022634,
"duplicates": 840,
"nonDeterministicResponses": 91,
"count": 969,
"totalResponseSize": 1032886,
"duplicates": 856,
"nonDeterministicResponses": 98,
"apiVersion": "41",
"fixtureFiles": [
"static_resources.json",
Expand All @@ -20,8 +20,10 @@
"jobs_can_be_filtered.json",
"system_job_visibility_can_be_toggled.json",
"user_jobs_can_be_enabled_and_disabled.json",
"queues_should_be_listed.json",
"all_user_defined_jobs_should_be_listed.json",
"users_should_be_able_to_navigate_to_the_new_job_route.json",
"users_should_be_able_to_navigate_to_the_new_queue_route.json",
"system_job_actions.json",
"user_job_actions.json",
"users_that_are_not_authorized_should_be_denied_access.json",
Expand Down
59 changes: 13 additions & 46 deletions cypress/fixtures/network/41/user_job_actions.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"sec-fetch-mode": "cors"
},
"statusCode": 200,
"responseBody": "[{\"name\":\"User account expiry alert\",\"type\":\"ACCOUNT_EXPIRY_ALERT\",\"cronExpression\":\"0 0 2 ? * *\",\"nextExecutionTime\":\"2023-08-02T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"fUWM1At1TUx\",\"name\":\"User account expiry alert\",\"type\":\"ACCOUNT_EXPIRY_ALERT\",\"cronExpression\":\"0 0 2 ? * *\",\"nextExecutionTime\":\"2023-08-02T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"File resource clean up\",\"type\":\"FILE_RESOURCE_CLEANUP\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-08-02T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"pd6O228pqr0\",\"name\":\"File resource clean up\",\"type\":\"FILE_RESOURCE_CLEANUP\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-08-02T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Data statistics\",\"type\":\"DATA_STATISTICS\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-08-02T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"BFa3jDsbtdO\",\"name\":\"Data statistics\",\"type\":\"DATA_STATISTICS\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-08-02T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Remove expired or used reserved values\",\"type\":\"REMOVE_USED_OR_EXPIRED_RESERVED_VALUES\",\"cronExpression\":\"0 0 2 ? * *\",\"nextExecutionTime\":\"2023-08-02T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"uwWCT2BMmlq\",\"name\":\"Remove expired or used reserved values\",\"type\":\"REMOVE_USED_OR_EXPIRED_RESERVED_VALUES\",\"cronExpression\":\"0 0 2 ? * *\",\"nextExecutionTime\":\"2023-08-02T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Dataset notification\",\"type\":\"DATA_SET_NOTIFICATION\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-08-02T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"YvAwAmrqAtN\",\"name\":\"Dataset notification\",\"type\":\"DATA_SET_NOTIFICATION\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-08-02T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Remove lock exceptions older than 6 months\",\"type\":\"LOCK_EXCEPTION_CLEANUP\",\"cronExpression\":\"0 0 2 ? * *\",\"nextExecutionTime\":\"2023-08-02T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":true,\"sequence\":[{\"id\":\"OQ9KeLgqy20\",\"name\":\"Remove lock exceptions older than 6 months\",\"type\":\"LOCK_EXCEPTION_CLEANUP\",\"cronExpression\":\"0 0 2 ? * *\",\"nextExecutionTime\":\"2023-08-02T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Credentials expiry alert\",\"type\":\"CREDENTIALS_EXPIRY_ALERT\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-08-02T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"sHMedQF7VYa\",\"name\":\"Credentials expiry alert\",\"type\":\"CREDENTIALS_EXPIRY_ALERT\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-08-02T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"System version update check notification\",\"type\":\"SYSTEM_VERSION_UPDATE_CHECK\",\"cronExpression\":\"44 8 3 ? * *\",\"nextExecutionTime\":\"2023-08-02T03:08:44.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"vt21671bgno\",\"name\":\"System version update check notification\",\"type\":\"SYSTEM_VERSION_UPDATE_CHECK\",\"cronExpression\":\"44 8 3 ? * *\",\"nextExecutionTime\":\"2023-08-02T03:08:44.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Validation result notification\",\"type\":\"VALIDATION_RESULTS_NOTIFICATION\",\"cronExpression\":\"0 0 7 * * ?\",\"nextExecutionTime\":\"2023-08-02T07:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"Js3vHn2AVuG\",\"name\":\"Validation result notification\",\"type\":\"VALIDATION_RESULTS_NOTIFICATION\",\"cronExpression\":\"0 0 7 * * ?\",\"nextExecutionTime\":\"2023-08-02T07:00:00.000\",\"status\":\"SCHEDULED\"}]}]",
"responseSize": 3724,
"responseBody": "[{\"name\":\"Housekeeping\",\"type\":\"HOUSEKEEPING\",\"delay\":20,\"nextExecutionTime\":\"2023-11-16T13:25:51.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"DHIS2rocks1\",\"name\":\"Housekeeping\",\"type\":\"HOUSEKEEPING\",\"delay\":20,\"nextExecutionTime\":\"2023-11-16T13:25:51.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"User account expiry alert\",\"type\":\"ACCOUNT_EXPIRY_ALERT\",\"cronExpression\":\"0 0 2 ? * *\",\"nextExecutionTime\":\"2023-11-17T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"fUWM1At1TUx\",\"name\":\"User account expiry alert\",\"type\":\"ACCOUNT_EXPIRY_ALERT\",\"cronExpression\":\"0 0 2 ? * *\",\"nextExecutionTime\":\"2023-11-17T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"File resource clean up\",\"type\":\"FILE_RESOURCE_CLEANUP\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-11-17T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"pd6O228pqr0\",\"name\":\"File resource clean up\",\"type\":\"FILE_RESOURCE_CLEANUP\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-11-17T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Remove expired or used reserved values\",\"type\":\"REMOVE_USED_OR_EXPIRED_RESERVED_VALUES\",\"cronExpression\":\"0 0 2 ? * *\",\"nextExecutionTime\":\"2023-11-17T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"uwWCT2BMmlq\",\"name\":\"Remove expired or used reserved values\",\"type\":\"REMOVE_USED_OR_EXPIRED_RESERVED_VALUES\",\"cronExpression\":\"0 0 2 ? * *\",\"nextExecutionTime\":\"2023-11-17T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Data statistics\",\"type\":\"DATA_STATISTICS\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-11-17T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"BFa3jDsbtdO\",\"name\":\"Data statistics\",\"type\":\"DATA_STATISTICS\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-11-17T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Dataset notification\",\"type\":\"DATA_SET_NOTIFICATION\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-11-17T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"YvAwAmrqAtN\",\"name\":\"Dataset notification\",\"type\":\"DATA_SET_NOTIFICATION\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-11-17T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Credentials expiry alert\",\"type\":\"CREDENTIALS_EXPIRY_ALERT\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-11-17T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"sHMedQF7VYa\",\"name\":\"Credentials expiry alert\",\"type\":\"CREDENTIALS_EXPIRY_ALERT\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-11-17T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"System version update check notification\",\"type\":\"SYSTEM_VERSION_UPDATE_CHECK\",\"cronExpression\":\"44 8 3 ? * *\",\"nextExecutionTime\":\"2023-11-17T03:08:44.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"vt21671bgno\",\"name\":\"System version update check notification\",\"type\":\"SYSTEM_VERSION_UPDATE_CHECK\",\"cronExpression\":\"44 8 3 ? * *\",\"nextExecutionTime\":\"2023-11-17T03:08:44.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Validation result notification\",\"type\":\"VALIDATION_RESULTS_NOTIFICATION\",\"cronExpression\":\"0 0 7 * * ?\",\"nextExecutionTime\":\"2023-11-17T07:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"Js3vHn2AVuG\",\"name\":\"Validation result notification\",\"type\":\"VALIDATION_RESULTS_NOTIFICATION\",\"cronExpression\":\"0 0 7 * * ?\",\"nextExecutionTime\":\"2023-11-17T07:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Queue\",\"type\":\"Sequence\",\"cronExpression\":\"0 0 3 ? * MON\",\"nextExecutionTime\":\"2023-11-20T03:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":true,\"sequence\":[{\"id\":\"uvUPBToQHD9\",\"name\":\"Job 1\",\"type\":\"DATA_INTEGRITY\",\"cronExpression\":\"0 0 3 ? * MON\",\"nextExecutionTime\":\"2023-11-20T03:00:00.000\",\"status\":\"SCHEDULED\"},{\"id\":\"PPgVeqiSXpz\",\"name\":\"Job 2\",\"type\":\"DISABLE_INACTIVE_USERS\",\"status\":\"SCHEDULED\"}]}]",
"responseSize": 4037,
"responseHeaders": {
"server": "nginx/1.23.0",
"content-type": "application/json;charset=UTF-8",
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit b666038

Please sign in to comment.