Mock
The “Mock” data source contains a dummy code. You can use this dummy code for the testing purpose. When you test the dummy code, you ensure that the dummy code is invoked correctly. In multiple scenarios, the application developer uses the dummy code to test the component and observe how the component will look after the data is added to it.
Note:- In the dummy code, the data must be in string format.
To use the Mock data source:
- On the vFlow 2.0 module’s dashboard, see the left navigation panel.
- On the left navigation panel, click the Configurator icon (), and the middle panel displays the list of different pages.
- In the list of pages, find the page where you want to configure the data source.
- After you find the page, move to the right in the same row, and then find the Edit icon () to the left of the three-dots icon.
- Click the Edit icon (), and the middle panel displays the <<Page Name>> page (for example, the Data Submisssion page).
- On the Data Submission page, under Config, click Data, and the middle panel displays the Data Type list.
- Click the Data Type list and then select Mock, and the JSON box comes into view.
- In the JSON box, enter the dummy code, as shown in the following screen capture:
[{“name”: “Ashi”, “company”: “Decimal”, “designation”: “software engineer”}, {“name”: “Varsha”, “company”: “Decimal”, “designation”: “software engineer”}, {“name”: “Nikunj”, “company”: “Decimal”, “designation”: “Senior software engineer”}]
- After you enter the dummy code, click Save to configure the “Mock” data source.
Note:- You cannot add the data source to the FieldSet component. To add the data source to the FieldSet component, you need to add the data source to the Form component.