mirror of
https://github.com/noodlapp/noodl-cloudservice.git
synced 2026-01-09 22:02:54 +01:00
Tests
In the project folder we have a Noodl project that includes a few tests for Cloud Functions. To run the tests, you have to open the project and deploy it to your Cloud Service and frontend.
Data
Here is a step by step guide on how to setup the data required to be able to run the tests.
- Import the schema
- Create a
Testrecord where theTextcolumn iswagga(required for "Simple Function node" test) - Create 2 configs parameters:
If the Cloud Service is running on "localhost":
- name:
TestParameter, type:String, value:woff, master key only:false - name:
TestProtected, type:String, value:buff, master key only:true
Otherwise:
- name:
TestParameter, type:String, value:wagga, master key only:false - name:
TestProtected, type:String, value:buff, master key only:true
- Create a
Testrecord where the columns are (required for Test Record API):
ANumber: 15
ADate: 2022-11-07T10:23:52.301Z
AString: Test
ABoolean: true
AnObject: {"hej":"ho"}
AnArray: ["a", "b"]
Text: fetch-test
-
Import TestQuery data
-
Change the
Parentpointer of "Lisa" to "Marge" (might have to empty the field before updating it) -
Add "Lisa", "Bart" and "Maggie" as Children to "Homer"
-
Disable Class Level Protection (CLP) for Create on the User class. (required for Disable sign up)
-
Create a user with:
username: test
password: test