diff --git a/.github/workflows/smoke_test.yaml b/.github/workflows/smoke_test.yaml index b4ed39fd68..3fd61cd9c5 100644 --- a/.github/workflows/smoke_test.yaml +++ b/.github/workflows/smoke_test.yaml @@ -22,4 +22,10 @@ jobs: yarn api:test:ci env: BUDIBASE_HOST: budicloud.qa.budibase.net - BUDIBASE_ACCOUNTS_URL: https://account-portal.budicloud.qa.budibase.net \ No newline at end of file + BUDIBASE_ACCOUNTS_URL: https://account-portal.budicloud.qa.budibase.net + + - name: Cypress Discord Notify + run: yarn test:notify + env: + WEBHOOK_URL: ${{ secrets.BUDI_QA_WEBHOOK }} + GITHUB_RUN_URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID \ No newline at end of file diff --git a/qa-core/.gitignore b/qa-core/.gitignore index e82880bc81..08660a00a8 100644 --- a/qa-core/.gitignore +++ b/qa-core/.gitignore @@ -1,4 +1,5 @@ node_modules/ .env watchtower-hook.json -dist/ \ No newline at end of file +dist/ +.testReport.json diff --git a/qa-core/package.json b/qa-core/package.json index 846ccb4dbe..2ae04ece6c 100644 --- a/qa-core/package.json +++ b/qa-core/package.json @@ -12,6 +12,7 @@ "test": "env-cmd jest --runInBand --json --outputFile=testResults.json", "test:watch": "env-cmd jest --watch", "test:debug": "DEBUG=1 jest", + "test:notify": "node scripts/testResultsWebhook", "docker:up": "docker-compose up -d", "docker:down": "docker-compose down", "api:server:setup": "npm run docker:up && env-cmd ts-node ../packages/builder/ts/setup.ts", diff --git a/qa-core/scripts/testResultsWebhook.js b/qa-core/scripts/testResultsWebhook.js index 034fe45064..fc00bf34ad 100644 --- a/qa-core/scripts/testResultsWebhook.js +++ b/qa-core/scripts/testResultsWebhook.js @@ -4,7 +4,7 @@ const fetch = require("node-fetch") const path = require("path") const fs = require("fs") -const WEBHOOK_URL = process.env.CYPRESS_WEBHOOK_URL +const WEBHOOK_URL = process.env.WEBHOOK_URL const GIT_SHA = process.env.GITHUB_SHA const GITHUB_ACTIONS_RUN_URL = process.env.GITHUB_ACTIONS_RUN_URL diff --git a/qa-core/testReport.json b/qa-core/testReport.json deleted file mode 100644 index b1aa321bc5..0000000000 --- a/qa-core/testReport.json +++ /dev/null @@ -1 +0,0 @@ -{"numFailedTestSuites":1,"numFailedTests":1,"numPassedTestSuites":11,"numPassedTests":41,"numPendingTestSuites":3,"numPendingTests":11,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":15,"numTotalTests":53,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1676469571194,"success":false,"testResults":[{"assertionResults":[{"ancestorTitles":["Public API - /rows endpoints"],"duration":548,"failureMessages":[],"fullName":"Public API - /rows endpoints POST - Create a row","location":null,"status":"passed","title":"POST - Create a row"},{"ancestorTitles":["Public API - /rows endpoints"],"duration":60002,"failureMessages":["Error: thrown: \"Exceeded timeout of 60000 ms for a test.\nUse jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test.\"\n at /Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/public-api/tables/rows.spec.ts:35:3\n at _dispatchDescribe (/Users/mmckeaveney/Dev/budibase/budibase/qa-core/node_modules/jest-circus/build/index.js:105:26)\n at describe (/Users/mmckeaveney/Dev/budibase/budibase/qa-core/node_modules/jest-circus/build/index.js:60:5)\n at Object. (/Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/public-api/tables/rows.spec.ts:6:1)\n at Runtime._execModule (/Users/mmckeaveney/Dev/budibase/budibase/qa-core/node_modules/jest-runtime/build/index.js:1714:24)\n at Runtime._loadModule (/Users/mmckeaveney/Dev/budibase/budibase/qa-core/node_modules/jest-runtime/build/index.js:1223:12)\n at Runtime.requireModule (/Users/mmckeaveney/Dev/budibase/budibase/qa-core/node_modules/jest-runtime/build/index.js:1047:12)\n at jestAdapter (/Users/mmckeaveney/Dev/budibase/budibase/qa-core/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:89:13)\n at runTestInternal (/Users/mmckeaveney/Dev/budibase/budibase/qa-core/node_modules/jest-runner/build/runTest.js:411:16)\n at runTest (/Users/mmckeaveney/Dev/budibase/budibase/qa-core/node_modules/jest-runner/build/runTest.js:499:34)"],"fullName":"Public API - /rows endpoints POST - Search rows","location":null,"status":"failed","title":"POST - Search rows"},{"ancestorTitles":["Public API - /rows endpoints"],"duration":496,"failureMessages":[],"fullName":"Public API - /rows endpoints GET - Retrieve a row","location":null,"status":"passed","title":"GET - Retrieve a row"},{"ancestorTitles":["Public API - /rows endpoints"],"duration":644,"failureMessages":[],"fullName":"Public API - /rows endpoints PUT - update a row","location":null,"status":"passed","title":"PUT - update a row"}],"endTime":1676469635424,"message":"\u001b[1m\u001b[31m \u001b[1m● \u001b[22m\u001b[1mPublic API - /rows endpoints › POST - Search rows\u001b[39m\u001b[22m\n\n thrown: \"Exceeded timeout of 60000 ms for a test.\n Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test.\"\n\u001b[2m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 33 |\u001b[39m })\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 34 |\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m\u001b[31m\u001b[1m>\u001b[22m\u001b[2m\u001b[39m\u001b[90m 35 |\u001b[39m it(\u001b[32m\"POST - Search rows\"\u001b[39m\u001b[33m,\u001b[39m \u001b[36masync\u001b[39m () \u001b[33m=>\u001b[39m {\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m |\u001b[39m \u001b[31m\u001b[1m^\u001b[22m\u001b[2m\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 36 |\u001b[39m \u001b[36mconst\u001b[39m [response\u001b[33m,\u001b[39m rows] \u001b[33m=\u001b[39m \u001b[36mawait\u001b[39m config\u001b[33m.\u001b[39mrows\u001b[33m.\u001b[39msearch({\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 37 |\u001b[39m query\u001b[33m:\u001b[39m {\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 38 |\u001b[39m string\u001b[33m:\u001b[39m {\u001b[0m\u001b[22m\n\u001b[2m\u001b[22m\n\u001b[2m \u001b[2mat \u001b[22m\u001b[2m\u001b[0m\u001b[36msrc/tests/public-api/tables/rows.spec.ts\u001b[39m\u001b[0m\u001b[2m:35:3\u001b[22m\u001b[2m\u001b[22m\n\u001b[2m \u001b[2mat Object. (\u001b[22m\u001b[2m\u001b[0m\u001b[36msrc/tests/public-api/tables/rows.spec.ts\u001b[39m\u001b[0m\u001b[2m:6:1)\u001b[22m\u001b[2m\u001b[22m\n","name":"/Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/public-api/tables/rows.spec.ts","startTime":1676469571238,"status":"failed","summary":""},{"assertionResults":[{"ancestorTitles":["Internal API - App Specific Roles & Permissions"],"duration":3773,"failureMessages":[],"fullName":"Internal API - App Specific Roles & Permissions Add BASIC user to app","location":null,"status":"passed","title":"Add BASIC user to app"},{"ancestorTitles":["Internal API - App Specific Roles & Permissions"],"duration":4896,"failureMessages":[],"fullName":"Internal API - App Specific Roles & Permissions Add ADMIN user to app","location":null,"status":"passed","title":"Add ADMIN user to app"},{"ancestorTitles":["Internal API - App Specific Roles & Permissions"],"duration":2606,"failureMessages":[],"fullName":"Internal API - App Specific Roles & Permissions Add POWER user to app","location":null,"status":"passed","title":"Add POWER user to app"}],"endTime":1676469650546,"message":"","name":"/Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/internal-api/userManagement/appSpecificRoles.spec.ts","startTime":1676469635431,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Internal API - Table Operations"],"duration":4474,"failureMessages":[],"fullName":"Internal API - Table Operations Create and delete table, columns and rows","location":null,"status":"passed","title":"Create and delete table, columns and rows"},{"ancestorTitles":["Internal API - Table Operations"],"duration":7624,"failureMessages":[],"fullName":"Internal API - Table Operations Search and pagination","location":null,"status":"passed","title":"Search and pagination"}],"endTime":1676469664993,"message":"","name":"/Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/internal-api/tables/tables.spec.ts","startTime":1676469650551,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Internal API - Application creation, update, publish and delete"],"duration":4680,"failureMessages":[],"fullName":"Internal API - Application creation, update, publish and delete Publish app","location":null,"status":"passed","title":"Publish app"},{"ancestorTitles":["Internal API - Application creation, update, publish and delete"],"duration":1641,"failureMessages":[],"fullName":"Internal API - Application creation, update, publish and delete Sync application before deployment","location":null,"status":"passed","title":"Sync application before deployment"},{"ancestorTitles":["Internal API - Application creation, update, publish and delete"],"duration":2805,"failureMessages":[],"fullName":"Internal API - Application creation, update, publish and delete Sync application after deployment","location":null,"status":"passed","title":"Sync application after deployment"}],"endTime":1676469676987,"message":"","name":"/Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/internal-api/applications/publish.spec.ts","startTime":1676469664996,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Public API - /applications endpoints"],"duration":792,"failureMessages":[],"fullName":"Public API - /applications endpoints POST - Create an application","location":null,"status":"passed","title":"POST - Create an application"},{"ancestorTitles":["Public API - /applications endpoints"],"duration":29,"failureMessages":[],"fullName":"Public API - /applications endpoints POST - Search applications","location":null,"status":"passed","title":"POST - Search applications"},{"ancestorTitles":["Public API - /applications endpoints"],"duration":140,"failureMessages":[],"fullName":"Public API - /applications endpoints GET - Retrieve an application","location":null,"status":"passed","title":"GET - Retrieve an application"},{"ancestorTitles":["Public API - /applications endpoints"],"duration":305,"failureMessages":[],"fullName":"Public API - /applications endpoints PUT - update an application","location":null,"status":"passed","title":"PUT - update an application"},{"ancestorTitles":["Public API - /applications endpoints"],"duration":12038,"failureMessages":[],"fullName":"Public API - /applications endpoints POST - publish an application","location":null,"status":"passed","title":"POST - publish an application"},{"ancestorTitles":["Public API - /applications endpoints"],"duration":14193,"failureMessages":[],"fullName":"Public API - /applications endpoints POST - unpublish a published application","location":null,"status":"passed","title":"POST - unpublish a published application"},{"ancestorTitles":["Public API - /applications endpoints"],"duration":128,"failureMessages":[],"fullName":"Public API - /applications endpoints POST - unpublish an unpublished application","location":null,"status":"passed","title":"POST - unpublish an unpublished application"},{"ancestorTitles":["Public API - /applications endpoints"],"duration":21572,"failureMessages":[],"fullName":"Public API - /applications endpoints DELETE - delete a published application and the dev application","location":null,"status":"passed","title":"DELETE - delete a published application and the dev application"}],"endTime":1676469727469,"message":"","name":"/Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/public-api/applications/applications.spec.ts","startTime":1676469676996,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Internal API - Application creation, update, publish and delete"],"duration":1421,"failureMessages":[],"fullName":"Internal API - Application creation, update, publish and delete Update an application","location":null,"status":"passed","title":"Update an application"},{"ancestorTitles":["Internal API - Application creation, update, publish and delete"],"duration":1268,"failureMessages":[],"fullName":"Internal API - Application creation, update, publish and delete Revert Changes without changes","location":null,"status":"passed","title":"Revert Changes without changes"},{"ancestorTitles":["Internal API - Application creation, update, publish and delete"],"duration":4735,"failureMessages":[],"fullName":"Internal API - Application creation, update, publish and delete Revert Changes","location":null,"status":"passed","title":"Revert Changes"}],"endTime":1676469737505,"message":"","name":"/Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/internal-api/applications/update.spec.ts","startTime":1676469727506,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Internal API - User Management & Permissions"],"duration":2158,"failureMessages":[],"fullName":"Internal API - User Management & Permissions Add Users with different roles","location":null,"status":"passed","title":"Add Users with different roles"},{"ancestorTitles":["Internal API - User Management & Permissions"],"duration":1010,"failureMessages":[],"fullName":"Internal API - User Management & Permissions Delete User","location":null,"status":"passed","title":"Delete User"},{"ancestorTitles":["Internal API - User Management & Permissions"],"duration":1200,"failureMessages":[],"fullName":"Internal API - User Management & Permissions Reset Password","location":null,"status":"passed","title":"Reset Password"},{"ancestorTitles":["Internal API - User Management & Permissions"],"duration":1258,"failureMessages":[],"fullName":"Internal API - User Management & Permissions Change User information","location":null,"status":"passed","title":"Change User information"}],"endTime":1676469745995,"message":"","name":"/Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/internal-api/userManagement/userManagement.spec.ts","startTime":1676469737513,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Internal API - /screens endpoints"],"duration":2086,"failureMessages":[],"fullName":"Internal API - /screens endpoints Create a screen with each role type","location":null,"status":"passed","title":"Create a screen with each role type"},{"ancestorTitles":["Internal API - /screens endpoints"],"duration":1530,"failureMessages":[],"fullName":"Internal API - /screens endpoints Get screens","location":null,"status":"passed","title":"Get screens"},{"ancestorTitles":["Internal API - /screens endpoints"],"duration":1632,"failureMessages":[],"fullName":"Internal API - /screens endpoints Delete a screen","location":null,"status":"passed","title":"Delete a screen"}],"endTime":1676469753597,"message":"","name":"/Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/internal-api/screens/screens.spec.ts","startTime":1676469746008,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Internal API - Application creation"],"duration":324,"failureMessages":[],"fullName":"Internal API - Application creation Get applications without applications","location":null,"status":"passed","title":"Get applications without applications"},{"ancestorTitles":["Internal API - Application creation"],"duration":1253,"failureMessages":[],"fullName":"Internal API - Application creation Get all Applications after creating an application","location":null,"status":"passed","title":"Get all Applications after creating an application"},{"ancestorTitles":["Internal API - Application creation"],"duration":1254,"failureMessages":[],"fullName":"Internal API - Application creation Get application details","location":null,"status":"passed","title":"Get application details"}],"endTime":1676469758806,"message":"","name":"/Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/internal-api/applications/create.spec.ts","startTime":1676469753605,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Internal API - Application creation, update, publish and delete"],"duration":1747,"failureMessages":[],"fullName":"Internal API - Application creation, update, publish and delete DELETE - Delete an application","location":null,"status":"passed","title":"DELETE - Delete an application"}],"endTime":1676469762953,"message":"","name":"/Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/internal-api/applications/delete.spec.ts","startTime":1676469758814,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Internal API - App Specific Roles & Permissions"],"duration":null,"failureMessages":[],"fullName":"Internal API - App Specific Roles & Permissions Custom role access for level 1 permissions","location":null,"status":"pending","title":"Custom role access for level 1 permissions"},{"ancestorTitles":["Internal API - App Specific Roles & Permissions"],"duration":null,"failureMessages":[],"fullName":"Internal API - App Specific Roles & Permissions Custom role access for level 2 permissions","location":null,"status":"pending","title":"Custom role access for level 2 permissions"},{"ancestorTitles":["Internal API - App Specific Roles & Permissions"],"duration":null,"failureMessages":[],"fullName":"Internal API - App Specific Roles & Permissions Custom role access for level 3 permissions","location":null,"status":"pending","title":"Custom role access for level 3 permissions"},{"ancestorTitles":["Internal API - App Specific Roles & Permissions"],"duration":null,"failureMessages":[],"fullName":"Internal API - App Specific Roles & Permissions Custom role access for level 4 permissions","location":null,"status":"pending","title":"Custom role access for level 4 permissions"},{"ancestorTitles":["Internal API - App Specific Roles & Permissions"],"duration":null,"failureMessages":[],"fullName":"Internal API - App Specific Roles & Permissions Custom role access for level 5 permissions","location":null,"status":"pending","title":"Custom role access for level 5 permissions"}],"endTime":1676469763432,"message":"","name":"/Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/internal-api/userManagement/customRoles.spec.ts","startTime":1676469762962,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Internal API - Role screen access"],"duration":null,"failureMessages":[],"fullName":"Internal API - Role screen access Check Screen access for BASIC Role","location":null,"status":"pending","title":"Check Screen access for BASIC Role"},{"ancestorTitles":["Internal API - Role screen access"],"duration":null,"failureMessages":[],"fullName":"Internal API - Role screen access Check Screen access for POWER role","location":null,"status":"pending","title":"Check Screen access for POWER role"},{"ancestorTitles":["Internal API - Role screen access"],"duration":null,"failureMessages":[],"fullName":"Internal API - Role screen access Check Screen access for ADMIN role","location":null,"status":"pending","title":"Check Screen access for ADMIN role"}],"endTime":1676469763656,"message":"","name":"/Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/internal-api/userManagement/screenAccess.spec.ts","startTime":1676469763438,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Internal API - Role table access"],"duration":null,"failureMessages":[],"fullName":"Internal API - Role table access Check Table access for app user","location":null,"status":"pending","title":"Check Table access for app user"},{"ancestorTitles":["Internal API - Role table access"],"duration":null,"failureMessages":[],"fullName":"Internal API - Role table access Check Table access for developer","location":null,"status":"pending","title":"Check Table access for developer"},{"ancestorTitles":["Internal API - Role table access"],"duration":null,"failureMessages":[],"fullName":"Internal API - Role table access Check Table access for admin","location":null,"status":"pending","title":"Check Table access for admin"}],"endTime":1676469763691,"message":"","name":"/Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/internal-api/userManagement/tableAccess.spec.ts","startTime":1676469763660,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Public API - /tables endpoints"],"duration":242,"failureMessages":[],"fullName":"Public API - /tables endpoints POST - Create a table","location":null,"status":"passed","title":"POST - Create a table"},{"ancestorTitles":["Public API - /tables endpoints"],"duration":104,"failureMessages":[],"fullName":"Public API - /tables endpoints POST - Search tables","location":null,"status":"passed","title":"POST - Search tables"},{"ancestorTitles":["Public API - /tables endpoints"],"duration":114,"failureMessages":[],"fullName":"Public API - /tables endpoints GET - Retrieve a table","location":null,"status":"passed","title":"GET - Retrieve a table"},{"ancestorTitles":["Public API - /tables endpoints"],"duration":337,"failureMessages":[],"fullName":"Public API - /tables endpoints PUT - update a table","location":null,"status":"passed","title":"PUT - update a table"}],"endTime":1676469765643,"message":"","name":"/Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/public-api/tables/tables.spec.ts","startTime":1676469763694,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Public API - /users endpoints"],"duration":352,"failureMessages":[],"fullName":"Public API - /users endpoints POST - Create a user","location":null,"status":"passed","title":"POST - Create a user"},{"ancestorTitles":["Public API - /users endpoints"],"duration":191,"failureMessages":[],"fullName":"Public API - /users endpoints POST - Search users","location":null,"status":"passed","title":"POST - Search users"},{"ancestorTitles":["Public API - /users endpoints"],"duration":99,"failureMessages":[],"fullName":"Public API - /users endpoints GET - Retrieve a user","location":null,"status":"passed","title":"GET - Retrieve a user"},{"ancestorTitles":["Public API - /users endpoints"],"duration":314,"failureMessages":[],"fullName":"Public API - /users endpoints PUT - update a user","location":null,"status":"passed","title":"PUT - update a user"}],"endTime":1676469766998,"message":"","name":"/Users/mmckeaveney/Dev/budibase/budibase/qa-core/src/tests/public-api/users/users.spec.ts","startTime":1676469765647,"status":"passed","summary":""}],"wasInterrupted":false} \ No newline at end of file