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

added validation for CreateCustomReceiptForm and test. #13420

Conversation

JamalAlabdullah
Copy link
Contributor

@JamalAlabdullah JamalAlabdullah commented Aug 23, 2024

Description

  • Added a validation for CreateCustomReceiptForm component to show the error message as long as the user types just one character.
  • Added test for it.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

@github-actions github-actions bot added area/process Area: Related to app process (e.g. signing, receipt, fill inn, payment, etc). solution/studio/designer Issues related to the Altinn Studio Designer solution. labels Aug 23, 2024
…ion-when-giving-a-custom-receipt-a-name-with-only-one-character
Copy link

codecov bot commented Aug 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.72%. Comparing base (0ca075b) to head (e8cccfc).
Report is 15 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13420   +/-   ##
=======================================
  Coverage   93.72%   93.72%           
=======================================
  Files        1438     1438           
  Lines       19929    19930    +1     
  Branches     2417     2418    +1     
=======================================
+ Hits        18679    18680    +1     
  Misses       1002     1002           
  Partials      248      248           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@lassopicasso lassopicasso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job @JamalAlabdullah 💪

Copy link
Contributor

@standeren standeren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When testing I see that that validation message is removed when clicking the Opprett button when allows me to post the request to backend with the single-letter-name anyway.
Maybe we should disable the Opprett button until there is a valid input?

Skjermopptak.2024-08-30.kl.11.13.37.mov

@JamalAlabdullah
Copy link
Contributor Author

When testing I see that that validation message is removed when clicking the Opprett button when allows me to post the request to backend with the single-letter-name anyway. Maybe we should disable the Opprett button until there is a valid input?

Skjermopptak.2024-08-30.kl.11.13.37.mov

@standeren have you tested in my branch? I tested it before and tested now it works

validation.mp4

Copy link
Contributor

@standeren standeren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested OK in dev

@JamalAlabdullah JamalAlabdullah merged commit c03cfbe into main Sep 2, 2024
22 checks passed
@JamalAlabdullah JamalAlabdullah deleted the 13414-improve-validation-when-giving-a-custom-receipt-a-name-with-only-one-character branch September 2, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/process Area: Related to app process (e.g. signing, receipt, fill inn, payment, etc). solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve validation when giving a custom receipt a name with only one character
3 participants