Skip to content

test: convert AppDirectory test to Jest and run in CI#1720

Open
adityashirsatrao007 wants to merge 5 commits intofinos:mainfrom
adityashirsatrao007:test/1716-app-directory-tests
Open

test: convert AppDirectory test to Jest and run in CI#1720
adityashirsatrao007 wants to merge 5 commits intofinos:mainfrom
adityashirsatrao007:test/1716-app-directory-tests

Conversation

@adityashirsatrao007
Copy link

Summary

Converts the standalone app-directory specification test from \src/app-directory/specification/test/\ into a proper Jest test that runs as part of CI.

Changes

  • Added \ est/AppDirectory.test.ts\ with tests for:
    • Valid API name and version
    • \myApplication.json\ example validation against Application schema
    • \ dc3-workbench.json\ example validation against Application schema
  • Added @apidevtools/swagger-parser\ and \jsonschema\ to devDependencies
  • Removed \src/app-directory/specification/test/\ directory

Testing

Run the tests:
\\�ash
npm run test --workspace=@finos/fdc3-standard
\\

Closes #1716

Copilot AI review requested due to automatic review settings December 10, 2025 18:17
@adityashirsatrao007 adityashirsatrao007 requested a review from a team as a code owner December 10, 2025 18:17
@netlify
Copy link

netlify bot commented Dec 10, 2025

Deploy Preview for fdc3 ready!

Name Link
🔨 Latest commit bdc1e0e
🔍 Latest deploy log https://app.netlify.com/projects/fdc3/deploys/69987ae4fb4cae00084c022a
😎 Deploy Preview https://deploy-preview-1720.preview-fdc3.finos.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 10, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR successfully migrates the standalone App Directory specification tests into the main Jest test suite, enabling automated validation in CI. The migration converts a node.js script-based test into a proper Jest test suite that validates the App Directory OpenAPI schema and example application files.

  • Adds a new Jest test file that validates the App Directory schema and example files
  • Moves test dependencies from a standalone package to the main package's devDependencies
  • Removes the legacy standalone test directory and its configuration files

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/fdc3-standard/test/AppDirectory.test.ts New Jest test suite that validates the App Directory OpenAPI schema and example application JSON files (myApplication.json and fdc3-workbench.json)
packages/fdc3-standard/package.json Adds @apidevtools/swagger-parser and jsonschema as devDependencies for schema validation
packages/fdc3-standard/src/app-directory/specification/test/package.json Removes standalone test package.json that is no longer needed
packages/fdc3-standard/src/app-directory/specification/test/package-lock.json Removes standalone test package-lock.json that is no longer needed
packages/fdc3-standard/src/app-directory/specification/test/index.js Removes legacy node.js test script replaced by the new Jest test
Files not reviewed (1)
  • packages/fdc3-standard/src/app-directory/specification/test/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adityashirsatrao007
Copy link
Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Contributor

@kriswest kriswest left a comment

Choose a reason for hiding this comment

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

Thanks for this - revealed a small bug in the appD schema.

Copy link
Contributor

@kriswest kriswest left a comment

Choose a reason for hiding this comment

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

Oops - forgot to check for a CHANEGELOG.md entry. Could you add one to the Unreleased -> CHANGED section of CHANGELOG.md. I suggest:

Converted the standalone app-directory specification test from "src/app-directory/specification/test/" into a proper Jest test that runs as part of CI. ([#1720](https://github.com/finos/FDC3/pull/1720))

@kriswest
Copy link
Contributor

kriswest commented Feb 4, 2026

If you git rebase main the CI check should pass now. Then deal with the CHANGELOG entry that's needed and I'll be able to merge this.

@kriswest
Copy link
Contributor

@adityashirsatrao007 could you:

  • Add the following entry to the Unreleased -> CHANGED section of CHANGELOG.md:

    Converted the standalone app-directory specification test from "src/app-directory/specification/test/" into a proper Jest test that runs as part of CI. (#1720)

  • rebase onto main git rebase main

Converts the standalone app-directory specification test into a proper
Jest test that runs as part of CI.

Changes:
- Added test/AppDirectory.test.ts with tests for:
  - Valid API name and version
  - myApplication.json example validation
  - fdc3-workbench.json example validation
- Added @apidevtools/swagger-parser and jsonschema to devDependencies
- Removed src/app-directory/specification/test/ directory

Closes finos#1716
@kriswest
Copy link
Contributor

@adityashirsatrao007 the CI tasks is still failing as there are some items missing from the package-lock.json file for the new dependencies you added. Could you run npm install in your branch and then commit the updated package-lock.json file? That should resolve it.

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.

Convert AppDirectory test application into a test

3 participants