Skip to main content
This guide explains how to create a fake preset to test the linking feature in a calculator without having to upload it to the testing environment. This approach significantly reduces development time by avoiding the time-consuming process of uploading to the testing environment.

Creating a Preset

Create a fake preset that simulates the data required from the linked calculator. This allows for testing without needing to go through the time-consuming process of uploading to the testing environment.

Steps to Test Linking

1. Inspecting and Copying Data

The process involves inspecting the element in the browser, copying the necessary data structure, and pasting it into VS Code. Follow these steps:
  1. Open the browser developer tools
  2. Inspect the relevant element containing the data structure
  3. Copy the necessary data structure from the browser
  4. Paste it into VS Code for modification

2. Cleaning Up the Code

After copying the data:
  1. Remove unnecessary spans from the copied code
  2. Format the code using a beautifier to improve readability
  3. Ensure the structure matches the expected linking format

3. Running the Test

To complete the testing process:
  1. Create a new preset with the cleaned-up code
  2. Adjust the preset code as needed for your specific use case
  3. Run the test to verify the linking functionality works correctly
This method provides an efficient way to test linking features during development without the overhead of uploading and testing in the full environment.
This tutorial approach helps streamline the development workflow by providing immediate feedback on linking functionality.