Commit Graph

198 Commits

Author SHA1 Message Date
Peter Clement 977c0e44f3 Merge remote-tracking branch 'origin/master' into feat/update-automation-tests 2024-11-26 20:08:10 +00:00
Peter Clement 685657b8eb migrate createrow step to use test builder 2024-11-26 19:50:18 +00:00
Peter Clement b99d411cec migrate deleteRow from runStep to test builder 2024-11-26 15:48:40 +00:00
Peter Clement e8ade0caee update row spec file using automation builder 2024-11-26 12:00:47 +00:00
Peter Clement f3c5a2b973
Merge branch 'master' into fix/automation-adjacent-bugs 2024-11-26 10:02:05 +00:00
Peter Clement 9f35ea0839 fix tests 2024-11-25 12:40:20 +00:00
Peter Clement db032ed35b update properties to be correct 2024-11-25 10:14:32 +00:00
Peter Clement 08f5df2546 add execute script automation tests 2024-11-25 09:45:42 +00:00
mike12345567 66ade79ff9 Updating rest of test cases. 2024-11-18 17:55:40 +00:00
Sam Rose c418ffc8a9
Merge branch 'chore/sqs-always-on' of github.com:budibase/budibase into split-server-tests-out-by-database 2024-11-07 10:16:57 +00:00
Adria Navarro 5089528ffd
Merge branch 'master' into BUDI-8683/correct-automation-cron-server-timestamp 2024-11-07 10:58:35 +01:00
Sam Rose 42a0e26aed
Merge chore/sqs-always-on 2024-11-06 17:35:55 +00:00
Sam Rose 48578e1f18
Fix some automation tests. 2024-11-06 17:29:34 +00:00
Sam Rose 50ce97135c
Fix scienarios.spec.ts 2024-11-06 17:13:29 +00:00
Peter Clement 7072acfa1b
Merge branch 'master' into fix/issue-with-looping-iterations 2024-11-06 17:04:03 +00:00
Peter Clement 7bbbaadea4 Issue where looping wasn't working due to missing context 2024-11-06 16:59:44 +00:00
Adria Navarro 0667dd9d30 Add test 2024-11-06 12:39:56 +01:00
Dean 80526ad9b7 Merge remote-tracking branch 'origin/master' into feature/automation-branching-ux 2024-11-05 14:36:15 +00:00
Martin McKeaveney a197a2ead9 lint 2024-11-05 11:58:05 +00:00
Martin McKeaveney a8aa0d0822 fix tests 2024-11-05 11:50:28 +00:00
Dean 11d24db255 Merge remote-tracking branch 'origin/v3-ui' into feature/automation-branching-ux 2024-10-28 12:00:33 +00:00
Sam Rose 0875ac817c
Merge branch 'master' into budi-8742-add-a-baseurl-binding-inside-automations 2024-10-25 10:51:29 +01:00
Dean fb17881ea3 Merge remote-tracking branch 'origin/v3-ui' into feature/automation-branching-ux 2024-10-23 09:23:01 +01:00
Peter Clement a26b64bb03 pass user through to automation context 2024-10-18 15:08:18 +01:00
Sam Rose 3fc170c16b
Add settings to automation context. 2024-10-15 17:33:32 +01:00
Peter Clement b304d1d622 changes to support automation conditions on both sides of evaluation 2024-10-14 09:30:05 +01:00
Dean 4928c7f553 Add a default branch id for server tests 2024-10-14 09:06:49 +01:00
Peter Clement f00593ff26 pr comments 2024-10-01 12:25:41 +01:00
Peter Clement 5d31976835 updated automation thread to use ids and test 2024-09-30 13:08:11 +01:00
Peter Clement acdcd02fcd Fix small issue with conditions in branches 2024-09-27 09:12:50 +01:00
Peter Clement 4bc30a0187 pr comment 2024-09-26 11:50:03 +01:00
Peter Clement 44702bbfb6 pr comments 2024-09-26 10:22:16 +01:00
Peter Clement 0c6946af62 more automation tests 2024-09-24 15:01:05 +01:00
Peter Clement 6842c392a2 Merge remote-tracking branch 'origin/master' into feat/more-automation-tests 2024-09-24 12:05:54 +01:00
Peter Clement 980615b37b looping query rows 2024-09-24 11:08:44 +01:00
mike12345567 c8d1956c73 Fixing AI test cases. 2024-09-23 12:59:20 +01:00
Martin McKeaveney dadce14a71
Merge branch 'master' into budi-8608-ai-platform-level-config-pt-2 2024-09-19 10:48:01 +01:00
Martin McKeaveney 950bd45b2c add ts ignore for mock 2024-09-18 18:04:13 +01:00
Martin McKeaveney 69b2bf9bdb lint 2024-09-18 14:21:10 +01:00
Martin McKeaveney 9cbaa02f5f add test for automation run step when LLM feature flags are on 2024-09-18 14:01:54 +01:00
Peter Clement 7e767e4089 some pr comments 2024-09-13 12:25:39 +01:00
Peter Clement a831a4bf07 tests to cover automation naming 2024-09-12 14:58:53 +01:00
Peter Clement 594551e1b5 tests for filter steps 2024-09-12 14:05:32 +01:00
Peter Clement babbe16d7d fix test name 2024-09-11 15:50:21 +01:00
Peter Clement f377b9f566 remove top level table config 2024-09-11 15:39:21 +01:00
Peter Clement 1947000f0c update case where no branch condition is met 2024-09-11 14:50:52 +01:00
Peter Clement 452ff17e1f
Merge branch 'master' into fix/automation-context-bug 2024-09-04 17:54:15 +01:00
Peter Clement 2135dbca67 update automation test builder to support ...building 2024-09-04 16:37:33 +01:00
Peter Clement 3a8a8b1195 fix issue with multiple loops breaking automation context 2024-09-04 14:54:47 +01:00
Peter Clement 484b329bc8 ensure branch step is in output 2024-09-03 16:29:52 +01:00
Peter Clement 56641e06c3 re-add branch step to outputs 2024-09-03 11:10:30 +01:00
Peter Clement 66fdf03398
Refactor automation orchestrator to support branching (#14461)
* refactor automation thread

* fix infinite loop in branching

* remove try catch

* remove spacing

* remove unecessary addition of branch outputs

* pr comments

* remove loopstep instance variable

* add test to cover failure scenario

* add tests for other automationf ailure conditions

* update test name

* use private keyword instead of underscore

* parse int / string safely

* fix refs

* add condition support for branching and tests

* create helper function for recursing all search filters

* move helper func

* fix import
2024-09-03 08:33:41 +00:00
Peter Clement 0e229c9b2e
Update automation test builder to support branching (#14387)
* add branch step definition

* update automation test builder to support branching

* rename Automation test builder

* example test

* pr comments
2024-08-15 16:07:42 +00:00
Peter Clement f15847a40f
More automation typing in preparation for branching (#14378)
* More typing for automations

* undo test updates

* remove casting of loop step and add more types

* remove unused type

* pro

* Update types and fix ts issues

* add branching types

* remove any cast

---------

Co-authored-by: Adria Navarro <adria@budibase.com>
2024-08-14 21:39:39 +01:00
Peter Clement 37f749019d
Add more automation tests (#14369)
* Add more automation tests

* remove comment

* update assertion

* unused type

* split out query creation

* remove map
2024-08-13 14:16:55 +01:00
Sam Rose 083b595d50
Fix formatting. 2024-08-09 11:58:57 +01:00
Sam Rose 3d590e879e
Rely on withEnv and setEnv functions in respective environment.ts files. 2024-08-09 10:30:27 +01:00
Sam Rose 1ce5b53409
Add Oracle to executeQuery.spec.ts 2024-08-02 17:20:52 +01:00
Sam Rose c8fadc33d9
Fix discorfd.spec.ts's reliance on the node-fetch mock. 2024-08-01 12:21:42 +01:00
Sam Rose 6d70dd1924
Fix outgoingWebhook.spec.ts's reliance on the node-fetch mock. 2024-08-01 12:19:44 +01:00
Sam Rose b39875fb4b
Fix make.spec.ts's reliance on the node-fetch mock. 2024-08-01 12:07:01 +01:00
Sam Rose f16f1fb7ba
Fix zapier.spec.ts's reliance on the node-fetch mock. 2024-08-01 12:03:29 +01:00
Sam Rose e530400f46
Fix n8n.spec.ts's reliance on the node-fetch mock. 2024-08-01 11:57:04 +01:00
Peter Clement 8539f6d853
Add helper function / builder for creating Automations for tests and improved types (#14220)
* basic class for generating and running an automation

* change filename

* add to existing tests

* remove dupe tests

* add types to automation steps

* add types to triggers

* update tests and typing

* fix types

* typo

* move all step schema types do types folder

* updated types

* typing pr comments

* remove unused param

* some more typing and tests

* more typing

* improve type map

* fix broken type

* this will surely fix my issue
2024-07-31 22:18:00 +01:00
Sam Rose 3a74df0a4a
Fix tests. 2024-07-03 17:04:31 +01:00
Sam Rose cd98882127
Move secrets into backend-core. 2024-07-03 16:30:23 +01:00
Peter Clement 9809bf1a91
Fix an issue where null values were causing an error in automation loops (#14083)
* fixes an issue where nulls weren't being handled correctly in loops

* remove log

* update recursive gate to be more specific

* use lodash for object check
2024-07-03 09:07:44 +00:00
Peter Clement cf11009e24
Update OpenAI dependency to fix 400 errors (#14033)
* Update OpenAI dependency to fix 400 errors

* add some optional chaining for safety

* add caret

* fix tests
2024-06-27 12:17:48 +01:00
Peter Clement 9a2de11203
Allow users to only specify a binding when adding attachments (#13819)
* add ability for user to toggle bindable input for attachment

* error handling for missing keys

* improve error handling for smtp attachments

* remove log

* add test

* fixing some pr comments

* update test
2024-06-07 08:35:18 +00:00
mike12345567 906e7686d6 Removing messaging check - not important. 2024-05-15 12:14:21 +01:00
Adria Navarro 9696f19ead Fix test 2024-05-13 12:23:56 +02:00
Peter Clement db273bcd36
Support attachment columns in Automations (#13567)
* base work to support attachments in create / update row

* handle single attachment column

* fix tests

* pro

* fix some types

* handle case where file exists in storage

* improve attacment processing

* refactor slightly and ensure correct url is used for existing attachments

* add test

* Fixing a build issue.

* update tests

* some lint

* remove cursed backend-core test util

* addressing pr comments

* refactoring nasty automationUtils upload code

* remove uneeded check

* use basneeame for fallback filename

* add a test to ensure coverage of single attachment column type

* fail early when fetching object metadata

---------

Co-authored-by: mike12345567 <me@michaeldrury.co.uk>
2024-05-09 14:30:56 +01:00
Sam Rose 4722fd1cab
Fix queryRows.spec.ts 2024-05-07 17:16:47 +01:00
Peter Clement a4c0328c53
REST file handling and SMTP automation block attachments (#13403)
* handle files in rest connector

* fetch presigned url and return

* further updates to handle files in rest connector

* remove unused important and fix extension bug

* wrong expiry param

* tests

* add const for temp bucket

* handle ttl on bucket

* more bucket ttl work

* split out fileresponse and xmlresponse into utils

* lint

* remove log

* fix tests

* some pr comments

* update function naming and lint

* adding back needed response for frontend

* use fsp

* handle different content-disposition and potential path traversal

* add test container for s3 / minio

* add test case for filename* and ascii filenames

* move tests into separate describe

* remove log

* up timeout

* switch to minio image instead of localstack

* use minio image instead of s3 for testing

* stream file upload instead

* use streamUpload and update signatures

* update bucketcreate return

* throw real error

* tidy up

* pro

* pro ref fix?

* pro fix

* pro fix?

* move minio test provider to backend-core

* update email builder to allow attachments

* testing for sending files via smtp

* use backend-core minio test container in server

* handle different types of url

* fix minio test provider

* test with container host

* lint

* try different hostname?

* Revert "try different hostname?"

This reverts commit cfefdb8ded.

* fix issue with fetching of signed url with test minio

* update autoamtion attachments to take filename and url

* fix tests

* pro ref

* fix parsing of url object

* pr comments and linting

* pro ref

* fix pro again

* fix pro

* account-portal

* fix null issue

* fix ref

* ref

* When sending a file attachment in email fetch it directly from our object store

* add more checks to ensure we're working with a signed url

* update test to account for direct object store read

* formatting

* fix time issues within test

* update bucket and path extraction to regex

* use const in regex

* pro

* Updating TTL handling in upload functions (#13539)

* Updating TTL handling in upload functions

* describe ttl type

* account for ttl creation in existing buckets and update types

* fix tests

* pro

* pro
2024-04-22 15:30:57 +00:00
Sam Rose 193d40f86c
Fix some tests. 2024-04-03 15:40:10 +01:00
Sam Rose 5e6a9d2176
Convert executeQuery.spec.js to TypeScript and make it hit real databases. 2024-03-22 14:41:09 +00:00
Sam Rose 217b39c232
Reenable no-unused-vars 2024-03-20 11:46:39 +00:00
Sam Rose 5d42804020
Migrate some of RowAPI, WIP 2024-03-01 15:20:07 +00:00
Gerard Burns de0414afbe
Update Svelte Major Version to 4 (#13036)
* update svelte versions

* temporarilly disable svelte warnings

* change bbap version pointed to

* remove sub module specifying svelte version

* point at updated account-portal

* add type declaration for svelte in the server

* add svelte transformer for server jest tests

* remove svelte from bbui package.json

* get builder tests working

* linting fixes

* prettier fixes

* fix server test

* fix another server test

* fix server serverlog test

* account-portal-version

* pin master version of pro

* revert hbs doc file in server to use triple braces, ensures nothing gets escaped
2024-02-22 13:19:29 +00:00
Michael Drury e03cd4af56
Merge branch 'master' into fix/budi-8010 2024-02-15 13:28:07 +00:00
melohagan 649dafba47
n8n automation action integration (#12992)
* Add n8n automation action

* Add authorization header support

* add unit tests

* Replace test.com with example.com

* Add HttpMethod enum to types

* fix unit test

* Add required field label asterisk
2024-02-15 13:05:03 +00:00
mike12345567 ea5d04e1d3 Addressing PR comments. 2024-02-14 17:15:42 +00:00
mike12345567 cfd1c98c85 Updating timeouts for automations, making it easier to manage/find the various timeout limits. Also adding a new environment variable AUTOMATION_THREAD_TIMEOUT which can be used to control how long automations can run for. 2024-02-14 11:44:07 +00:00
Adria Navarro 573096e869
Merge branch 'master' into revert-12934-revert-12930-revert-12929-revert-12769-isolated-vm 2024-02-08 18:15:36 +01:00
Sam Rose 8e9db069e5
Remove all uses of test.com in the code, replace them with example.com and create a lint rule to prevent this in future. 2024-02-08 16:32:14 +00:00
Adria Navarro 8dfcc3aeb1
Revert "Revert "Migrate from `vm` to `isolated-vm`"" 2024-02-02 12:02:09 +01:00
Sam Rose 332a201ae7
Revert "Migrate from `vm` to `isolated-vm`" 2024-02-02 09:51:46 +00:00
mike12345567 2ec4fd5d67 Fixing executeScript test cases to cover the issue we experienced, make sure context is correctly accessible. 2024-02-01 16:11:44 +00:00
Sam Rose b3c949b091
Fix case where if a binding returned an int it would throw an error. 2024-01-30 11:06:09 +00:00
Sam Rose 669b0743ac
Typing improvements around automation loop tests. 2024-01-30 10:00:44 +00:00
Adria Navarro cb53d31833 Renames 2024-01-26 10:56:38 +01:00
Peter Clement 61b34b3ead mock out pro call 2024-01-16 16:58:13 +00:00
Peter Clement 2b73bf381e fix tests 2024-01-16 16:22:11 +00:00
Peter Clement 601ec35549 rename instance of trigger step to triggerAutomationRun 2024-01-15 10:00:37 +00:00
Peter Clement 72c2f6577c fix tests oncemore 2024-01-11 15:41:41 +00:00
Peter Clement 021eb58ea7 fix tests 2024-01-11 14:13:59 +00:00
Peter Clement e99a7672a7 test and pr comments 2024-01-05 16:12:31 +00:00
Adria Navarro db2c20e3ae eslint import/newline-after-import 2023-11-20 21:52:29 +01:00
Adria Navarro 742eb4ff46 Lint fix 2023-11-20 15:36:55 +01:00
Sam Rose f21addeb71
Add another test to make sure relationships are cleared when asked. 2023-11-06 17:34:30 +00:00