Skip to content

Specialty can be added with only blank character as name #141

@Holger-Mayer

Description

@Holger-Mayer
Contributor

When creating a new Specialty I add one space character in the name field and press save.
Then a Specialty with blank name is displayed in the Specialties list.

image

Correct behavior should be

Display a warning message that a not blank name should be entered
and the save button should be enabled only with valid names entered.

Activity

arey

arey commented on Aug 15, 2024

@arey
Member

Hi @Holger-Mayer thank you for the report.
Do you want to contribute to this fix?

Holger-Mayer

Holger-Mayer commented on Aug 15, 2024

@Holger-Mayer
ContributorAuthor

Hey arey,

I got no experience with Angular.

I use your project as an example test object while learning Cypress. And during writing the test cases I found this defect.

If you are interested I will write more defect reports if I find something during testing. Maybe we find someone who can fix them later.

And I plan to release the Cypress/Cucumber test suite as an open source project later for others to use.

best regards,
Holger

arey

arey commented on Aug 15, 2024

@arey
Member

I'm interested in any other bugs you find via Cypress.
If you're interested, this repository could host your end-to-end tests. The package.json file has an e2e script but I'm not sure we have any test associated.

Holger-Mayer

Holger-Mayer commented on Aug 16, 2024

@Holger-Mayer
ContributorAuthor

Hi Antoine,
I will report them as soon as I find some.

Integrating the stable test suite into the project would be great.
As soon as I am satisfied with the test suite I will look into how to integrate it.

Holger-Mayer

Holger-Mayer commented on Aug 16, 2024

@Holger-Mayer
ContributorAuthor

Hi Antoine,

I looked into the problem and found that this is a consistent problem with all entry fields.

The underlying reason is, that the validation rules in the component html files are not aligned with the validation rules of the openapi.yaml from the rest server.

It should be quite easy to correct this by adding the minlength , maxlength and pattern from the openapi file and enter them in the field definitions of the component files.

I will try it next week and will report the result.

Have a nice weekend,
Holger

Holger-Mayer

Holger-Mayer commented on Sep 11, 2024

@Holger-Mayer
ContributorAuthor

There is currently still one error in the application.

The veterinarian edit form should require 1 or more characters for first name and last name according to the html template but requires 2.
The reason is that while all other components use template validation the vet-edit component implements validation rules for first name and last name.

vet-edit.components.ts line 55 and 56.

I will correct this during the implementation of some more tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @arey@Holger-Mayer

        Issue actions

          Specialty can be added with only blank character as name · Issue #141 · spring-petclinic/spring-petclinic-angular