Skip to content

feat: add test app and component to check all platform features#9

Merged
agviegas merged 2 commits into
mainfrom
tests
Mar 13, 2026
Merged

feat: add test app and component to check all platform features#9
agviegas merged 2 commits into
mainfrom
tests

Conversation

@agviegas

@agviegas agviegas commented Mar 4, 2026

Copy link
Copy Markdown
Contributor
  • New test templates: Added test and cloud-test templates that scaffold a browser test app and a cloud component test suite, respectively. Both exercise every EngineServicesClient API endpoint (Files, Folders, Components, Apps, Execution, Hidden Files, Icons, Permissions, Built-in Components).
  • Test app features: The test template generates a full BIM app with a 3D viewport, model loading pipeline (GitHub → Storage → Scene), and a side panel displaying test results with pass/fail/skip icons, colors, and durations — grouped by API area.
  • Execution output integration: Execution progress messages from the cloud-test component are parsed back into structured test groups and rendered in the same Results panel with identical formatting, prefixed with "Local Component:" or "Deployed Component:" to distinguish them.
  • New CLI commands: Added thatopen create-tests [directory] (scaffolds both test projects, deletes the target directory first for a clean slate) and thatopen serve-tests [directory] (runs both the test app dev server and the component's local execution server in parallel with prefixed output).
  • New npm scripts: Added test:cli-build-tests and test:cli-serve-tests to package.json for one-command test suite scaffolding and serving.
  • Windows compatibility: Fixed ENOENT errors on Windows/Git Bash by replacing execSync/shell-based spawn with spawnSync(process.execPath, ...) and removing shell: true.
  • Documentation: Updated README.md and CONTEXT.md with the new templates, CLI commands, npm scripts, and a full "Running the platform API test suite" guide.

Comment thread src/cli/templates/main-cloud-test.ts Outdated
Comment on lines +51 to +52
' let groupsDone = 0;',
' const totalGroups = 12;',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick:
This is hardcoded — progress bar will silently break if you add or remove test groups. Consider deriving it from the actual number of report() calls so we don't need to worry about possible changes in the future

// Clean up previous test suite if it exists
if (existsSync(parentDir)) {
console.log(`Removing existing directory "${directory}"...`);
rmSync(parentDir, { recursive: true, force: true });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: I believe if someone calls thatopen create-tests without any arguments in their repo root this would nuke the repository. Deleting the subdirectories only could be safer in this case or we could force the argument to make it a bit safer.

@agviegas agviegas merged commit 62f8952 into main Mar 13, 2026
1 check passed
@agviegas agviegas deleted the tests branch June 4, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants