Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLVUU-129: Fix Application Layouts Data Contract #135

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

pling-scottlogic
Copy link

@pling-scottlogic pling-scottlogic commented Jan 9, 2024

Description

Fixes the data contract for the application-layouts resource on the layout server. Also introduces end-to-end Cypress tests to ensure the data contract holds.

Change List

  • Backend:
    • Replace ApplicationLayoutDto with ObjectNode to allow for arbitrary JSON structure
    • Rename "definition" fields to match the frontend model
    • Synchronise default application layout JSON with local equivalent
    • Adjust server tests to reflect changes
  • Frontend:
    • Replace GetApplicationResponseDto with ApplicationJSON
    • Add Cypress tests to ensure API contract does not get violated
    • Add api.utils.ts to abstract API calls for testing
    • Rename field on ApplicationJSON interface
  • CI/CD
    • Add script to run layout server
    • Run layout server script as part of Cypress setup

Testing

Changes manually tested using the remote implementation from both showcase and sample app.

start: npm run showcase:preview
wait-on: "http://localhost:4173"
start: npm run showcase:preview, npm run layout-server
wait-on: http://localhost:4173, http://localhost:8081/api/swagger-ui/index.html
Copy link
Author

Choose a reason for hiding this comment

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

Not sure if the Swagger page is most appropriate for checking the API status. We could use one of our GET endpoints, or implement a separate endpoint just for status checking.

Copy link

@vferraro-scottlogic vferraro-scottlogic left a comment

Choose a reason for hiding this comment

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

Looks good for most part just a question and a couple of suggestions for possible improvements

@pling-scottlogic
Copy link
Author

PR raised to Finos

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.

add applicationLayout settings to ApplicationLayoutDto
3 participants