Editing data files
Test data files are where you change the names, IDs, and other values that tests use when they interact with PACE. This page shows you how to open one safely, what all the pieces mean, and how to confirm your change is valid before you hand it off.
What is a .jsonc file?
A .jsonc file is ordinary JSON with one extra feature: you can write comments
using //. This makes it easier to explain why a value is there, not just what
it is.
{
// This is a comment — the reader ignores it
"project_name": "Highway Expansion Phase 2",
}
Apart from comments (and trailing commas, which are also allowed), .jsonc follows
the exact same rules as JSON:
- Every key and string value must be wrapped in double quotes
"like this". - Entries in the same object are separated by commas.
- The file begins with
{and ends with}.
Where the files live
All test data is in the tests/data/ folder. There is one file per area of the
application:
| File | What it holds |
|---|---|
tests/data/projects.jsonc | Project IDs, names, and settings |
tests/data/clients.jsonc | Client names and IDs |
tests/data/team.jsonc | Key-member roles and people |
tests/data/estimates.jsonc | Estimate names and line-item data |
tests/data/change_orders.jsonc | Change-order values |
tests/data/programs.jsonc | Program-level data |
tests/data/common.jsonc | Shared credentials references and config |
To update a value that affects team-member tests, open team.jsonc. To change
something used in project tests, open projects.jsonc. You will rarely need more
than one file at a time.
The $schema line
Every data file starts with a line like this:
"$schema": "../schemas/generated/team.schema.json",
This line tells VS Code (and other editors that support JSON Schema) what the valid structure of the file looks like. With it in place:
- Autocomplete — start typing a field name and the editor suggests valid options.
- Red squiggles — if you mistype a key or use the wrong type, the editor marks it immediately, before any test is run.
Do not delete this line. It is the first safety net. If you accidentally remove it, the editor loses its ability to warn you about mistakes.
A walkthrough: editing tests/data/team.jsonc
Here is the complete file as it exists in the repo:
{
"$schema": "../schemas/generated/team.schema.json",
"team": {
"account_manager_smith": {
"role_id": "Account Manager",
"person_id": "Smith, Ms. Elizabeth (126)",
},
},
}
Let's break it down:
| Part | What it means |
|---|---|
"$schema": "…" | Enables editor validation and autocomplete. Leave it alone. |
"team": { … } | The top-level namespace. Every entry in this file belongs to the team group. |
"account_manager_smith" | A human-readable name for this data object. Tests refer to it as team.account_manager_smith. |
"role_id" | The value the test selects in the Role dropdown — exactly as it appears in the PACE UI. |
"person_id" | The value the test picks from the Person dropdown, including the numeric ID in parentheses. |
Making a safe edit
Suppose the account manager has changed and you need to update the person. Here is the before and after:
Before:
"person_id": "Smith, Ms. Elizabeth (126)",
After:
"person_id": "Jones, Mr. David (204)",
That is the entire change. The quotes, the comma, and the surrounding structure stay exactly as they were. Only the value inside the quotes changes.
What not to do
- Do not remove the
$schemaline. The editor validation depends on it. - Do not add or remove commas between items — that changes the file's structure and can make it unreadable. A trailing comma after the last item is fine in JSONC and can be left as-is.
- Do not rename a key (like
account_manager_smith) unless you also update every spec that references it. Renaming a key breaks every test that uses it.
Validating your change
After editing, always run the data validator before committing:
pnpm run test:validate-data
If everything is fine, you will see a success message. If there is a problem — a missing required field, a value of the wrong type, an unrecognized key — the validator prints a clear error that points to the file and the problem field. Fix it and run again.
It does not start a browser or run any tests. It just checks the file structure. Get in the habit of running it every time you touch a data file.
Next steps
- Per-environment overrides — change a value for one environment without affecting others.
- Data references & placeholders — understand the
{{env:…}}and{{timestamp:short}}tokens you may see in data files.