-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(console): editing a component definition (#648)
* feat!(tui): initial commit * chore(deps): update actions/upload-artifact action to v4.3.6 (#575) | datasource | package | from | to | | ----------- | ----------------------- | ------ | ------ | | github-tags | actions/upload-artifact | v4.3.4 | v4.3.6 | Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update module github.com/open-policy-agent/opa to v0.67.1 (#577) | datasource | package | from | to | | ---------- | -------------------------------- | ------- | ------- | | go | github.com/open-policy-agent/opa | v0.67.0 | v0.67.1 | Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Megan Wolf <[email protected]> * chore(deps): update github/codeql-action action to v3.26.0 (#582) | datasource | package | from | to | | ----------- | -------------------- | -------- | ------- | | github-tags | github/codeql-action | v3.25.15 | v3.26.0 | Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(generate): proposed transition of generation annotation to props (#574) * fix(generate): generation annotation in a prop * fix(generate): introduce framework flag to generate * chore(docs): add generation ns docs * feat(validation-result)!: bump to go-oscal v0.6.0 jsonschema v6 update (#544) * feat(validation-result)!: remove validation-result in favor of new go-oscal behavior chore(go-oscal): update w/ go-oscal jsonschema v6 changes * docs(reference): update jsonschema url, run go mod tidy to remove lingering jsonschemav5 inderect dep * test: update w/ current branch sha from go-oscal * chore(deps): bump go-oscal to v0.6.0 * fix(unit): cleanup whitespaces for composed artifact --------- Co-authored-by: Brandt Keller <[email protected]> * fix(validate): get non-namespace scoped resources (#585) * fix(validate): get non-namespace scoped resources * fix(validate): alternate cluster-scoped resource get, schema mods * fix: updated conditional statement * docs: updated k8s domain doc * chore(deps): update dependency commitlint to v19.4.0 (#583) | datasource | package | from | to | | ---------- | ---------- | ------ | ------ | | npm | commitlint | 19.3.0 | 19.4.0 | Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(docs): initial SSP generation research docs (#548) * feat: initial-ssp-generate-doc * updated some wording * split ssp docs, updated some assessment result spellings. * ssp doc updates * broke assessment results at somepoint * updated note location * chore(docs): minor adjustments to intent and terms * chore(docs): cleanup testing artifacts * chore(docs): fix typos and add to dict --------- Co-authored-by: Brandt Keller <[email protected]> Co-authored-by: Brandt Keller <[email protected]> * chore(main): release 0.5.0 (#578) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore(docs): update issue template with expected deliverables line item (#590) * chore(deps): update anchore/sbom-action action to v0.17.1 (#593) | datasource | package | from | to | | ----------- | ------------------- | ------- | ------- | | github-tags | anchore/sbom-action | v0.17.0 | v0.17.1 | Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update github/codeql-action action to v3.26.1 (#595) | datasource | package | from | to | | ----------- | -------------------- | ------- | ------- | | github-tags | github/codeql-action | v3.26.0 | v3.26.1 | Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(docs): updated namespace doc locations and associated prop namespace url (#602) * fix: updated ns docs, ns prop * fix: remove test file feat: more tui design feat: more tui design feat: more tui design feat: more tui design * fix: removed debug bin * fix: removed rest files * fix: removed rest files * fix: fixed test expectations * feat: tui sizing, fixes * feat: updated keybindings, help * docs: tui docs * docs: updated tui docs * fix: nil handling for empty control * fix: additional nil pointer errors * fix: renamed to console * fix: overlay focus navigation * fix: updating keys/help * feat(console): adding edit fcns * feat(console): edit functionality updates updates to edit, plus other housekeeping/tech-debt modifications to try and simplify update functions * fix: go deps, removed debug.log * fix: updated testdata, redundant fcns * fix: updating model_test * fix: trying tempfile * fix: key-maps/help updates * fix: updated test files, increased timeout * fix: msgs, keys * test(console): additional console edit tests, testhelpers * fix: removed inject changes, dead code comment * docs(console): updated docs, gifs; added vhs tapes * fix: doc change, removed comments * fix: updated teatest * fix: save then close --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Brandt Keller <[email protected]> Co-authored-by: Cole (Mike) Winberry <[email protected]> Co-authored-by: Brandt Keller <[email protected]> Co-authored-by: Andy Mills <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
e30a824
commit ae06e27
Showing
38 changed files
with
2,233 additions
and
498 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Output images/component-defn-console-edit.gif | ||
|
||
Require lula | ||
Set FontSize 14 | ||
Set Width 1850 | ||
Set Height 925 | ||
Set Framerate 24 | ||
Set Padding 5 | ||
|
||
Hide | ||
Type "lula console -f ./src/test/unit/common/oscal/valid-multi-component-validations.yaml" Enter | ||
Sleep 1s | ||
Show | ||
|
||
# Navigate and select a control | ||
Right | ||
Sleep 500ms | ||
Right | ||
Sleep 500ms | ||
Right | ||
Sleep 1s | ||
Enter | ||
Sleep 1s | ||
|
||
# Navigate to description | ||
Right | ||
Sleep 500ms | ||
Right | ||
Sleep 500ms | ||
Type "e" | ||
Sleep 1s | ||
|
||
# Add new line and write some text | ||
Ctrl+E | ||
Sleep 500ms | ||
Type "Here is some text" | ||
Sleep 500ms | ||
Enter | ||
Sleep 2s | ||
|
||
# Show save dialog | ||
Ctrl+S | ||
Sleep 2s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
Output images/component-defn-console-read.gif | ||
|
||
Require lula | ||
Set FontSize 14 | ||
Set Width 1850 | ||
Set Height 925 | ||
Set Framerate 24 | ||
Set Padding 5 | ||
|
||
Hide | ||
Type "lula console -f ./src/test/unit/common/oscal/valid-multi-component-validations.yaml" Enter | ||
Sleep 1s | ||
Show | ||
|
||
# Show the component picker | ||
Right | ||
Sleep 500ms | ||
Enter | ||
Sleep 500ms | ||
Down | ||
Sleep 500ms | ||
Up | ||
Sleep 1s | ||
Enter | ||
Sleep 1s | ||
|
||
# Show the framework picker | ||
Right | ||
Sleep 500ms | ||
Enter | ||
Sleep 1s | ||
Enter | ||
Sleep 1s | ||
|
||
# Navigate to a control and toggle though fields | ||
Right | ||
Sleep 500ms | ||
Down | ||
Sleep 500ms | ||
Enter | ||
Sleep 1s | ||
Right | ||
Sleep 500ms | ||
Down | ||
Sleep 500ms | ||
Down | ||
Sleep 500ms | ||
Up | ||
Sleep 500ms | ||
Up | ||
Sleep 500ms | ||
Right | ||
Sleep 1s | ||
Right | ||
Sleep 2s | ||
|
||
# Quit + confirm | ||
Ctrl+c | ||
Sleep 2s | ||
Enter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package testhelpers | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
"testing" | ||
|
||
oscalTypes_1_1_2 "github.com/defenseunicorns/go-oscal/src/types/oscal-1-1-2" | ||
"github.com/defenseunicorns/lula/src/pkg/common/oscal" | ||
) | ||
|
||
func OscalFromPath(t *testing.T, path string) *oscalTypes_1_1_2.OscalCompleteSchema { | ||
t.Helper() | ||
data, err := os.ReadFile(path) | ||
if err != nil { | ||
t.Fatalf("error reading file: %v", err) | ||
} | ||
oscalModel, err := oscal.NewOscalModel(data) | ||
if err != nil { | ||
t.Fatalf("error creating oscal model from file: %v", err) | ||
} | ||
|
||
return oscalModel | ||
} | ||
|
||
func CreateTempFile(t *testing.T, ext string) *os.File { | ||
t.Helper() | ||
tempFile, err := os.CreateTemp("", fmt.Sprintf("tmp-*.%s", ext)) | ||
if err != nil { | ||
t.Fatalf("failed to create temp file: %v", err) | ||
} | ||
|
||
return tempFile | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.