Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Holger-Mayer opened this issue Aug 13, 2024 · 6 comments
Open

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

Holger-Mayer opened this issue Aug 13, 2024 · 6 comments

Comments

@Holger-Mayer
Copy link
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.

@arey arey added the bug label Aug 15, 2024
@arey
Copy link
Member

arey commented Aug 15, 2024

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

@Holger-Mayer
Copy link
Contributor Author

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
Copy link
Member

arey commented Aug 15, 2024

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Projects
None yet
Development

No branches or pull requests

2 participants