SimplyStaking / panic

PANIC Monitoring and Alerting For Blockchains
Apache License 2.0
82 stars 31 forks source link

Repository form validation for name field #340

Closed itsciccio closed 1 year ago

itsciccio commented 1 year ago

Technical Story

As the Repositories form, I want the name field to satisfy a specific format, so that it can be parsed as a namespace and name accordingly if needed.

Description

The legacy installer allows for repository name input validation, something not yet implemented in the new UI installer.

As-is there is no constraint on the name input within the Repositories modal.

A future UIKit upgrade will be adding the pattern and title attributes to svc-input, allowing us to add regex validation and display error messages accordingly.

We need to satisfy the following constraints:

For Dockerhub:

For GitHub:

Requirements

Blocked by

336

Acceptance criteria

Scenario: User inputs testnamespace/test to the Dockerhub form When: The add/edit Repo form modal is present Then: The form is allowed to be submitted.

Scenario: User inputs test to the Dockerhub form When: The add/edit Repo form modal is present Then: The form is allowed to be submitted, with namespace set to library and name set to test.

Scenario: User inputs testnamespace/ to the Dockerhub form When: The add/edit Repo form modal is present Then: The form is not allowed to be submitted, with an error message.

Scenario: User inputs testnamespace/test/test1 to the Dockerhub form When: The add/edit Repo form modal is present Then: The form is not allowed to be submitted, with an error message.