nds-org / workbench-webui

Web UI for the Workbench platform
0 stars 1 forks source link

feat: Validation in MyCatalog + import/export specs, consistency for helpers #24

Closed bodom0015 closed 1 year ago

bodom0015 commented 1 year ago

Problem

Errors encountered during clone/copy/edit

No way to quickly share specs with other users

Approach

How to Test

Test Setup:

  1. From workbench-helm-chart, run make dev
  2. cd src/webui/ && git fetch --all && git checkout my-catalog-bugfixes-import-export-spec to checkout this branch locally

Import Spec:

  1. From the MyCatalog page, click Import spec at the top-right
    • You should see the ImportExportSpecDialog open (in "Import" mode)
    • You should see a basic spec skeleton is provided here
  2. Click on Import
    • You should see a validation message pop up here saying: "key" is required
  3. Enter a values for key and click Import again
    • You should see a new validation message appear: "image.name" is required
  4. Enter a unique value for image.name and click Import one more time
    • You should see the new spec is created
    • You should be redirected to the AddEditSpec page for this new spec

Validation:

  1. From Add/Edit Spec, you should immediately see the validation messages
    • e.g. "key" is required, "image.name" is required, etc

Export Spec:

  1. From the MyCatalog page, click Import spec at the top-right
    • You should see the ImportExportSpecDialog open (in "Import" mode)
    • You should see a button to copy the spec to your clipboard
  2. Click "Copy to Clipboard"
  3. Paste the spec into your address bar, or share it with someone else so they can import it :D