EasyDynamics / oscal-react-library

A library of React components and an example user interface application that provides a direct UI into NIST's Open Security Controls Assessment Language (OSCAL) data in JSON format.
https://viewer.oscal.io
MIT License
49 stars 12 forks source link

`url` query string parameter is broken #544

Closed kylelaker closed 1 year ago

kylelaker commented 1 year ago

Description

The OSCAL Viewer application supports a ?url query string parameter to pass a URL to an OSCAL document directly. This was described in #134 and implemented in #143.

Environment

No response

Steps to Reproduce

  1. Go to any of:

Expected behavior

The document specified from the url parameter is loaded.

Actual Behavior

The default document URL from the application configuration is loaded.

Additional Notes

I am not sure exactly when this broke but it was some time in the last few weeks. This is an important functionality to have working. Regression tests must be added in EasyDynamics/oscal-editor-deployment to ensure this isn't unexpectedly broken again.

tuckerzp commented 1 year ago

What would the expected functionality be if we used the url param in the editor? Im guessing that it would open this in a Viewer mode rather than the Editor mode, right? I have not actually tested using the url param when we had implemented #478, so we will need to be sure those two features work as intended.

kylelaker commented 1 year ago

What would the expected functionality be if we used the url param in the editor

It should be ignored. So I guess testing this in the end-to-end tests may actually be kinda challenging...